pax_global_header00006660000000000000000000000064134127605330014516gustar00rootroot0000000000000052 comment=1baa9fef3d487e9ac8b29b2bd64e467aa1690b39 transmission-remote-gtk-1.4.1/000077500000000000000000000000001341276053300163265ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/.gitignore000066400000000000000000000016021341276053300203150ustar00rootroot00000000000000*.o *.stamp *.la *.so *.dll *.a *.exe *.lo *.log *.trs *.test .deps/ .libs/ Makefile.in.in Makefile.in Makefile config.h.in tags /autom4te.cache /aclocal.m4 /compile /configure /configure.sub /config.* /depcomp /install-sh /ltmain.sh /missing /ar-lib /libtool /test-driver stamp-h1 .dirstamp /gtk-doc.make __pycache__/ /po/POTFILES /po/stamp-it /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 /docs/*.prerequisites /docs/*.interfaces /docs/*.hierarchy /docs/*.args /docs/*-decl* /docs/*undocumented.txt /docs/*unused.txt /docs/*undeclared.txt /docs/xml/ /docs/html/ /docs/*.c /m4 !/m4/desktop.m4 !/m4/leak-supp.txt !/m4/tap-test *.appdata.xml *.desktop *.gschema.xml *.gschema.valid *.desktop.valid *.vapi *.gir *.deps *.typelib *~ /src/transmission-remote-gtk /src/transmission-remote-gtk.1 transmission-remote-gtk-1.4.1/AUTHORS000066400000000000000000000012341341276053300173760ustar00rootroot00000000000000 transmission-remote-gtk authors =============================== transmission-remote-gtk is developed by: Alan Fitton translations ============ translations kindly contributed by * Rafael Neri (Brazilian Portuguese) * Jan Žárský (Czech) * Pierre Rudloff (French) * Julian Held (German) * Dénes Sávoli (Hungarian) * Enrico G, Milo Casagrande, Carlo Micheli (Italian) * Youn sok Choi (Korean) * sieks (Latvian) * Algimantas Margevičius (Lithuanian) * Piotr (Polish) * Y3AVD (Russian) * nisalup (Sinhalese) * aspidzent (Spanish) * webbake (Swedish) * Ebubekir Karul (Turkish) * ROR191 (Ukranian) transmission-remote-gtk-1.4.1/COPYING000066400000000000000000000432541341276053300173710ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. transmission-remote-gtk-1.4.1/ChangeLog000066400000000000000000000163541341276053300201110ustar00rootroot00000000000000* 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 - Change line endings to unix for data files - Add Simplified Chinese translation * Thu Aug 11 2016 1.3.0 - Add more information to general panel - Redesign and fix destination combobox - Fix building with modern GCC - Fix starting minimized - Fix various compile warnings - Clean up build system - Translate desktop and appdata file - Update translations * Wed Jun 11 2014 1.2 - A basic RSS reader which uses libmrss. - Fix some 32bit platforms reporting 0 connected peers and unknown ETA. - Resolve some GTK deprecations. - Fix a crash in port test callback. - Fix decimal marker in status bar version. - Support for GeoIPCity.dat. - Fix a crash when removing lots of columns (something changed in GTK). - Optional and non-default support for validating SSL certs. - Remove all GTK2 support. - Allow alt-speed limits to override global speed limits in the statusbar display. * Sun Jun 9 2013 1.1.1 - fix file lists relying on being sorted (sometimes they are not) to fix the tree being messed up with duplicate directories. - fix using markup in comment. - translations updated from launchpad. (NEW: Latvian, Sinhalese) * Wed Sep 5 2012 1.1 - new Transmission display style - handle downloading metadata state better, don't make incorrect completion notifications - win32: build reverted to GTK2 because of empty progress bar in GTK3 - use g_idle_add instead of gdk_thread_enter/leave for reverse DNS - fix compilation error for debian - issue 210: fix crash when encountering empty benc dict in .torrent - fix concurrency issue when populating large files model and changing - translation updates from launchpad * Fri Jun 29 2012 1.0.2 - win32: update to gtk3 (also fixes blank tray icon) - win32: GeoIP support - fix minimise to tray - fix units in status icon text - truncate magnet links in add dialog - ctrl+k to focus on search entry like firefox - only use libappindicator if using unity - use gtk_box_new instead of gtk_{h,v}box_new (deprecated) on gtk3 - Swedish translation - translation updates from launchpad - fix 'make test' due to file missing in POTFILES.in - update free space (session) after delete - URL links in comment field - reorder buttons for actions and directories * Tue Jan 31 2012 1.0.1 - Fix a crash when toggling turtle mode or setting remote preferences. - Update Russian translation. * Sun Jan 15 2011 1.0 - Show files in a tree. - Consistency/code share in files tree view and add dialog tree view. - A lot of optimisation for building either files tree view. - Optimise changes to the torrent tree view (suspend sorting during). - Remember last add destination. - Fix a bug causing scrolled window position to be lost during maximise from system tray. - Experimental GTK3 support (--enable-gtk3). - Expand/collapse all, selection based changes for add dialog tree view. - Counts for filters. - Some update efficiency improvements. - Put general panel in a scrolled window. - Reorganise/cleanup local preferences dialog. - Keyboard accelerators. - Use IEC standard for expressing base2 units - KiB not KB etc. - Configurable timeout/retries. - Add the "turtle" mode icon, which enables alternative speed limits. - Remote preferences for configuring a time range for alternative speed limits. - Lithuanian translation contributed. - French translation contributed. - Updates for translations from launchpad.net. - Priority torrent right click menu. * Sun Dec 11 2011 0.8 - Define labels for directories. - Use labels in filters. - Use labels in destination combo box (add/move). - Shorten filters relative to the default download directory. - Fix a crash when filtering with selections in the torrent treeview. - Speed up filtering. - Allow remote preferences variables to be used in actions. - Update filters if torrent is moved. - Add a man page. - Rename "remote commands" feature to "actions". - Notifications without a system tray icon. - libappindicator support for Ubuntu. - Status info in status icon for consistency with libappindicator icon. - Builds/runs on GTK3 (without graph/libunique for now). - Remember last move destination. - Use Win32 mailslots as alternative to libunique. - Working debian packaging. - Handle URLs/files in first instance. - Last scrape time trackers column. * Tue Oct 11 2011 0.7 - Remote exec. - Win32 Support. - Connect button menus for profiles. - Fix a memory leak on disconnect. - Use icon for wanted/unwanted files. - Handle URLs and non-existing files in file handler. - IPv6 GeoIP support. - Upload files on app open. - Display public/private tracker status. - Show file icons based on MIME types. - Shortern tracker filters. - Hide state selector if no error torrents. - Fix warning caused by zero length files in torrents. - Bencoder crash fix. - Detect and drop requests from previous connections. - Toolbar tooltips. - Spanish translation. * Sat Aug 27 2011 0.6 - Profiles support. - New JSON based configuration backend. - Support new Transmission torrent status values. - Populate destination combo in move dialog. - Ukranian translation from ROR191. - Lots of new columns and info. - More options in view menu. - Supports for queues. - Improved status bar and add a free space indicator. - Persist/restore filter selection, + notebook/selector visibility. - Reuse http clients and keep sessions open. - Start in tray argument (-m --minimized) - Fix timezone display issue. - Fix bencoder parser bug (parsing empty lists). - Make columns fully shrinkable. - Many other fixes/improvements. * Fri May 6 2011 - 0.5.1 - Use libproxy pkg-config CFLAGS in build, for older versions. - Fix updates inside the GtkNotebook. - Fix crash reported by atommixz. * Fri Apr 22 2011 - 0.5 - Fix a few of small memory leaks. - Sync single torrent when file/trackers are changed. - Update efficiency improvement. - Customisable columns, new optional columns. * Tue Apr 12 2011 - 0.4 - Torrent add dialog. - Support for active only updates. - Other update performance improvements. - Pause/Resume all. - Polish and Russian translation. - Torrent added date/time column. - Fix gconf ints defaulting to one in prefs dialog. - Fix crash disconnecting with graph disabled. - Fix crash disabling tracker/dir filters while disconnected. * Sat Mar 11 2011 - 0.3 - Case insensitive text filtering. - Speed graph. - i18n support (currently German and Korean). - Use table layout instead of fixed for general panel. - libproxy support. - Fix torrent bandwidth priority setting. - Better suspending of tracker/files update until ack. - Put versions in some spec/configure deps. - Include libcurl.m4. - Better (easier) FreeBSD compilation. - Remove 5px window border (much better on some dark themes). - Fix hardcoded path to Transmission icon in about dialog. - Fix a leak from gtk_tree_selection_get_selected_rows(). - TRG_NOUNIQUE env variable to start multiple instances. * Mon Feb 21 2011 - 0.2.1 - Fix crash in update-blocklist/port-test callbacks. - Menu bar mnemonics. * Sat Feb 19 2011 - 0.2 - SSL support. - Statistics dialog. - Fix for setting low priority files. - Port testing. - Blocklist settings and updates. - Torrent reannounce. - Tracker add/edit/delete. * Mon Feb 07 2011 - 0.1.1 - Fix some major first release bugs. * Sun Jan 30 2011 - 0.1.0 - Hello world. transmission-remote-gtk-1.4.1/Makefile.am000066400000000000000000000017301341276053300203630ustar00rootroot00000000000000# # transmission-remote-gtk - A GTK RPC client to Transmission # Copyright (C) 2011 Alan Fitton # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = foreign DISTCHECK_CONFIGURE_FLAGS = --disable-desktop-database-update SUBDIRS = extern src data po EXTRA_DIST = config.rpath README.md transmission-remote-gtk-1.4.1/README.md000066400000000000000000000015211341276053300176040ustar00rootroot00000000000000# ABOUT transmission-remote-gtk is a GTK client for remote management of the Transmission BitTorrent client, using its HTTP RPC protocol. # DEPENDENCIES The following packages are required dependencies: ```bash autoconf-archive appstream-glib intltool ``` # BUILDING Optionally install `libgeoip` and its headers to see the country origin of peers. ## Building a transmission-remote-gtk release from the command line: ```bash $ tar zxfv transmission-remote-gtk-1.2.tar.gz $ cd transmission-remote-gtk-1.2 $ ./configure $ make # make install ``` ## Building from git clone: ```bash $ git clone https://github.com/transmission-remote-gtk/transmission-remote-gtk.git $ ./autogen.sh $ ./configure $ make # make install ``` ## LICENSE transmission-remote-gtk is released under GNU GPLv2. See the [COPYING](./COPYING) file for details. transmission-remote-gtk-1.4.1/autogen.sh000077500000000000000000000011641341276053300203310ustar00rootroot00000000000000#!/bin/sh # Run this to generate all the initial makefiles, etc. srcdir=`dirname $0` test -z "$srcdir" && srcdir=. (test -f $srcdir/configure.ac) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the top-level directory" exit 1 } aclocal --install -I m4 || exit 1 libtoolize --quiet --copy || exit 1 autoreconf --install -Wno-portability || exit 1 if [ "$NOCONFIGURE" = "" ]; then $srcdir/configure "$@" || exit 1 if [ "$1" = "--help" ]; then exit 0 else echo "Now type \`make\' to compile" || exit 1 fi else echo "Skipping configure process." fi set +x transmission-remote-gtk-1.4.1/configure.ac000066400000000000000000000136411341276053300206210ustar00rootroot00000000000000dnl dnl transmission-remote-gtk - A GTK RPC client to Transmission dnl Copyright (C) 2011 Alan Fitton dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl You should have received a copy of the GNU General Public License along dnl with this program; if not, write to the Free Software Foundation, Inc., dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. dnl AC_PREREQ([2.69]) AC_INIT([transmission-remote-gtk], [1.4.1], [https://github.com/transmission-remote-gtk/transmission-remote-gtk/issues]) AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([1.12 tar-pax dist-xz no-dist-gzip subdir-objects no-define foreign -Wall -Wno-portability]) AM_SILENT_RULES([yes]) AM_MAINTAINER_MODE([enable]) AC_DEFUN([TRG_CHECK_MACRO], [m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined. Is ]$2[ installed?])])]) TRG_CHECK_MACRO([AX_IS_RELEASE], [autoconf-archive]) TRG_CHECK_MACRO([APPSTREAM_XML], [appstream-glib]) AX_IS_RELEASE([git-directory]) AX_CHECK_ENABLE_DEBUG([yes], [G_ENABLE_DEBUG], [DEBUG G_DISABLE_ASSERT G_DISABLE_CHECKS G_DISABLE_CAST_CHECKS]) AC_PROG_CC AC_PROG_CC_C99 AC_PROG_INSTALL AC_PATH_PROG([POD2MAN], [pod2man]) LT_PREREQ([2.2.0]) LT_INIT LT_LIB_M AM_GNU_GETTEXT_VERSION([0.19.6]) AM_GNU_GETTEXT([external]) PKG_PROG_PKG_CONFIG([0.28]) DESKTOP_FILE APPSTREAM_XML GETTEXT_PACKAGE=AC_PACKAGE_NAME AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package name]) dnl ---- win32 ---- case "${host_os}" in *mingw32*) WIN32="yes" ;; *cygwin*) WIN32="yes" ;; *freebsd*) WIN32="no"; CPPFLAGS="$CPPFLAGS -I/usr/local/include" ;; *) WIN32="no" ;; esac AM_CONDITIONAL([WIN32], test "$WIN32" = "yes") dnl ---- required deps ---- AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_44], [Dont warn using older APIs]) AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_44], [Prevents using newer APIs]) PKG_CHECK_MODULES([TRG], [ json-glib-1.0 >= 0.8 gthread-2.0 libcurl gio-2.0 >= 2.44 gtk+-3.0 >= 3.16 ]) dnl ---- optional deps ---- AC_ARG_WITH([libgeoip], AC_HELP_STRING([--without-libgeoip], [disable GeoIP support])) 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]) ]) ]) AM_CONDITIONAL([HAVE_GEOIP], [test "x$have_geoip" = "xyes"]) AC_ARG_WITH([libnotify], AC_HELP_STRING([--without-libnotify], [disable libnotify])) have_libnotify=no AS_IF([test x$with_libnotify != xno], [ PKG_CHECK_MODULES([NOTIFY], [libnotify], [ have_libnotify=yes AC_DEFINE(HAVE_LIBNOTIFY, 1, [Define if libnotify is available]) ], [ AC_MSG_WARN([libnotify is required for popup desktop notifications]) ]) ]) AC_ARG_WITH([libmrss], AC_HELP_STRING([--without-libmrss], [disable RSS support])) have_libmrss=no AS_IF([test x$with_libmrss != xno], [ PKG_CHECK_MODULES([MRSS], [mrss >= 0.18], [ have_libmrss="yes" AC_DEFINE(HAVE_RSS, 1, [Define if RSS features available]) ], [ AC_MSG_WARN([libmrss is required for RSS reader]) ]) ]) AM_CONDITIONAL([HAVE_RSS], [test x$have_libmrss == xyes ]) AC_ARG_WITH([libproxy], AC_HELP_STRING([--without-libproxy], [disable libproxy])) have_libproxy=no AS_IF([test x$with_libproxy != xno], [ PKG_CHECK_MODULES([PROXY], [libproxy-1.0], [ have_libproxy=yes AC_DEFINE(HAVE_LIBPROXY, 1, [Define if libproxy is available]) ], [ AC_MSG_WARN([libproxy is required for HTTP proxy support]) ]) ]) AC_ARG_WITH([libappindicator], AC_HELP_STRING([--without-libappindicator], [disable libappindicator])) have_libappindicator=no AS_IF([test x$with_libappindicator != xno], [ PKG_CHECK_MODULES([APPINDICATOR], [appindicator3-0.1], [ AC_DEFINE(HAVE_LIBAPPINDICATOR, 1, [Define if libappindicator is available]) ], [ AC_MSG_WARN([Ubuntu Unity users should consider building with libappindicator]) ]) ]) 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([ \ -std=gnu99 \ -funsigned-char \ -fstack-protector-strong \ -fPIE \ -fPIC \ -Wall \ -Wextra \ -Winline \ -Wno-padded \ -Wno-unused-parameter \ -Wstrict-prototypes \ -Wmissing-prototypes \ -Werror=format=2 \ -Werror=implicit-function-declaration \ -Werror=pointer-arith \ -Werror=init-self \ -Werror=format-security \ -Werror=missing-include-dirs \ -Werror=date-time \ -Wno-conversion \ -Wno-sign-compare \ -Wno-deprecated-declarations \ -Wno-error=format-nonliteral \ ]) dnl TODO: Fix last two hidden warnings AS_IF([test "$enable_debug" = "no"], [ AX_APPEND_COMPILE_FLAGS([-O2]) ]) AX_APPEND_LINK_FLAGS([ \ -pie \ -Wl,-z,relro \ -Wl,-z,now \ ]) AC_CONFIG_FILES([ Makefile po/Makefile.in src/Makefile extern/Makefile extern/rss-glib/Makefile data/Makefile data/icons/Makefile ]) AC_OUTPUT echo " $PACKAGE $VERSION prefix ........: $prefix debug .........: $enable_debug geoip .........: $have_geoip libnotify .....: $have_libnotify libmrss .......: $have_libmrss libproxy ......: $have_libproxy libappindicator: $have_libappindicator nl_langinfo....: $enable_nl_langinfo " transmission-remote-gtk-1.4.1/data/000077500000000000000000000000001341276053300172375ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/Makefile.am000066400000000000000000000011311341276053300212670ustar00rootroot00000000000000SUBDIRS = 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) @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) @APPSTREAM_XML_RULES@ EXTRA_DIST = $(desktop_in_files) $(appstream_in_files) CLEANFILES = $(desktop_FILES) $(appstream_XML) transmission-remote-gtk-1.4.1/data/icons/000077500000000000000000000000001341276053300203525ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/icons/Makefile.am000066400000000000000000000014151341276053300224070ustar00rootroot00000000000000 icondir = $(datadir)/icons nobase_icon_DATA = \ hicolor/16x16/apps/transmission-remote-gtk.png \ hicolor/22x22/apps/transmission-remote-gtk.png \ hicolor/24x24/apps/transmission-remote-gtk.png \ hicolor/32x32/apps/transmission-remote-gtk.png \ hicolor/48x48/apps/transmission-remote-gtk.png \ hicolor/scalable/apps/transmission-remote-gtk.svg EXTRA_DIST = $(nobase_icon_DATA) gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor install-data-hook: update-icon-cache uninstall-hook: update-icon-cache update-icon-cache: @-if test -z "$(DESTDIR)"; then \ echo "Updating Gtk icon cache."; \ $(gtk_update_icon_cache); \ else \ echo "*** Icon cache not updated. After (un)install, run this:"; \ echo "*** $(gtk_update_icon_cache)"; \ fi transmission-remote-gtk-1.4.1/data/icons/hicolor/000077500000000000000000000000001341276053300220115ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/icons/hicolor/16x16/000077500000000000000000000000001341276053300225765ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/icons/hicolor/16x16/apps/000077500000000000000000000000001341276053300235415ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/icons/hicolor/16x16/apps/transmission-remote-gtk.png000066400000000000000000000015061341276053300310560ustar00rootroot00000000000000PNG  IHDR(-SPLTEVXTUWSbd`:KIVXTWXUTVSXZVUWSVXTXZVUWSY[WUWSUWSZ\XUWSUWSUWSxLIzHEmokUWSnpl{}yUWSUWS}{UWS^`\Z\XZ\X]_[\^Z[]YZ\XXZVWYUWYUUWSUWSWYUEEUWSfhdgie~XZVoqmfhe.46ҽ½iie}9>@VXT179txsAAX\Zihdmrp4:<6;=hnm΀~~|hhdY[WHKIDIHAGGlnkvxt]_[ormEJH@DDUZZžFF]`[@FGsxvkojgif[]YEE|z~6<=Z][Y\XZ\Xu` j4!#&6\$ыG^ƃQ0Dh$Ұm݅B۝y+7 d*5m]RRɻ鍮_*LOΜ>uui{ѣ< +ARۿpD2Asss8;M\PXYɩ8CZu]{1F`a!i废X  ДCvd5jn;Gw6va51 AGF7AW,$"Kຂ㺈yth) BddtjǛʵZ-7hIc6Z\:FIJ߹{> D*ъeF5sj Bb o6 S6--\1c:N(hD@)!}~xs3"ʕ eb}m$Zl{T2ŹsrU**JA:p~oG$L$ fgu雾3MS a2:K.qu|g:H&ZطeL^p:&xihɉ |>j zC)}}tu`n" Pm6nuyE[V>;)NA)b|||eN:@ ]Ƣ@khkO%K jkuujssSJ)Zӭ)pacjSy*ՊޙN-g2)"Rsof҆7)\tyVDOBN)IENDB`transmission-remote-gtk-1.4.1/data/icons/hicolor/24x24/000077500000000000000000000000001341276053300225745ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/icons/hicolor/24x24/apps/000077500000000000000000000000001341276053300235375ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/icons/hicolor/24x24/apps/transmission-remote-gtk.png000066400000000000000000000022601341276053300310520ustar00rootroot00000000000000PNG  IHDRw=bKGD pHYs B(xtIME 49=IDATHǵMlTU{of:3JK wMS ƥ. эKl;`01JND$%ӖF;L{E0LAM w޹{/Q+8 w`; ~.ܓS} m2|p#+oj۵KAڣ{H) >*8KRRr"CVOP3.ˤCE 6̃,C C<{,-_%\ Y༄p;ղ#y|>V ? (rx:>qӭ'774W <ݷy.@oFQ(챘W7wSg>(P(z(C:F:⼣bPѽuVinn%wϋF x}'ugm۔JDp6waH[2uC C'Ju=k<^/PxmI:^\|fY6ut_~Hg׸\.GJ0 ۃ0#)aMMT 4BdYt]hxuԙb 74;j"h4|eir}N&hp3qRjx|.\uC --\6Źa ]^c !y91B)rMgY^$222B*P(Q,b|ҳe DE'9ܸ"uuuawi 5!@ ŋ{26mD-޽0+bRIKӴ+~&'&PUR rFx^zz\,q[Zףj UM6G?.366VpۻnoA q Olf2 ׻mUk!@6\.o3YK[̰8=f38(V_Dr@60ݰ6vWL@*ғBrOA:l?de`?bkZRf\4|9~ūIENDB`transmission-remote-gtk-1.4.1/data/icons/hicolor/32x32/000077500000000000000000000000001341276053300225725ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/icons/hicolor/32x32/apps/000077500000000000000000000000001341276053300235355ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/icons/hicolor/32x32/apps/transmission-remote-gtk.png000066400000000000000000000035311341276053300310520ustar00rootroot00000000000000PNG  IHDR szz IDATx^[lgw{رv㦉8CbMBRA#!EMx<xG"T xB,H`MHĮx^gfOfYU~gYH)ɫBt $hѦu g `̽6@KJ.KZ =)7 ҁ c*#33HR`pEP܄yYaU˗K-(X/b1*:q~}L 0,_u&`=g߼j|XRbP mpV+S.è7ET*޾𰛀mZPH(vn B[F{or+ņFcZ7t@L# j9* id*^P@@@eH컻 mS\ D7l۶F Va9O? ,RZ𰻀bl^/~"ǁ`P;J@6ҝW.h_񭯛4taj qLbssOz(;oo6W7\mdžeY`a.-_aO~gRgWt:#-:< Z-^~Ryrp`@k4X_ϡQsZJ`K2L>0R FFC| 'MtTOV`:~b .ej0LqFCPN c8}퇗b¿t;;ElA{ ݀i-*C;:]BW. VlZךTt:dT <78Mx4**! QLOOZF+h;cNRkPt:Ş,nܸ+W.#/Y=bKfSٳ4F> d:K$-T7{ VD2/0<<+k,LvhǏq<̳Tw߃ʈdڼ{ Wf4Hȥ֫4^/xEtW^}s(kt#Ccxk%@uNBV=5BT*,/avvgN?e?Ҏ~|q:a;3?8Ho_zav*=+\Ho\) uDǕX, Ąy衡ZB9Su !Z˧/z ^Z%kPWVUlN A;vl|xIL7(G^6TQgk{֏FU0kjmͭtG,AcccZ4E(n٦0$qĉ|[O\t{TaUWo+#{PhN.ӳ<77mc=wIENDB`transmission-remote-gtk-1.4.1/data/icons/hicolor/48x48/000077500000000000000000000000001341276053300226105ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/icons/hicolor/48x48/apps/000077500000000000000000000000001341276053300235535ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/icons/hicolor/48x48/apps/transmission-remote-gtk.png000066400000000000000000000051731341276053300310740ustar00rootroot00000000000000PNG  IHDR00W BIDATx^Xkli N f?e`oc#-LgalAwfk3Ơb*_gZLΑpرBbfs5I?p5>v4E(eKҠ84)(m{/~yZz@INrEӂe[եV88 \FS> w7T]wR`MŊD`R@98DlXV5)st4cP.\.e& )󧦧 y-{VYζlK؊ .(+WLm#7=cQk"M~';p 04 `؎]#!dSNY&0c6os>Z!crАAZ@RJHl@׋[oF}饏e~dQUѣG=`88w҇Ǔ$v$91OZw}^EQ资b0ưsDZ}''u!:EtUSe2bS2[IF`*Nep/#g΢ITՃ޾GtM' z |~VM @%ȂlLٌ 6mĉQ@@%[WM_4)~`Y:w">&S*gaLEP@"E3ZQ( 뛟a<5-_4B^/BF*BA| ʌkzn 06|>dsmD7lܥ|6O~/!`xTH!O["-ҩ8W 'xUؖ6h>L! ܍=I0-i6r\DEBplk6 IkVйxU8dB@">H$JV#)etvvM@ǦME.PR;J/d4U匵\ +L2E܀~xL=B$$FD= lP(dqa+&OM1@YPD"!7kՕ/ ɩ)uZ\+s"eTcc |6D4" ؊0C@QUx2+C(SV!)5Vgn&R|%u%pW"6L&-L(!#+H8SkxQL[u2&rԤb 1`*C|˽_TG`5}~pFոf`((7%e ,r '䌨uI!LJ[O~$N}v _!m#)x. u>} .^"Y#zK _^}EoS9X, 18{NSh/" lقp ^ %'VO]x "Ibㆍp8C$x>57lh᳻7ՉI%hP жa+ׇ^#zƛ'0OP0@dž6tߏ就co 5jK (@GzS* X!v8xgkZxtv\; }?|n@:10fض&K.[e0\)6o@ǟ_}-% g1mmmh,nFa7RBfsۏxܲEv8͞ 2hJnattf?6Ŏ9 3@-dͶ[]Н2d Wi -T08wzăit^MDg` U;ErAB:mY޹s{*5gQb1HTl6? S)x] w ,)Bҩ.}|I\u,K5Ql!ef{Ze37? Pjo{(pǩBaL~p=퇽]]lr "I)źO0K&<ԿAЅ#d-RB; 2cfvqNpwޱP(/W?IENDB`transmission-remote-gtk-1.4.1/data/icons/hicolor/scalable/000077500000000000000000000000001341276053300235575ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/icons/hicolor/scalable/apps/000077500000000000000000000000001341276053300245225ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/data/icons/hicolor/scalable/apps/transmission-remote-gtk.svg000066400000000000000000000410001341276053300320430ustar00rootroot00000000000000 image/svg+xml transmission-remote-gtk-1.4.1/data/io.github.TransmissionRemoteGtk.appdata.xml.in000066400000000000000000000050751341276053300302100ustar00rootroot00000000000000 io.github.TransmissionRemoteGtk CC0-1.0 GPL-2.0+ transmission-remote-gtk Transmission Remote 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

Transmission Remote Gtk allows you to remotely manage the Transmission BitTorrent client using its RPC interface.

Features:

  • 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
http://eth0.org.uk/~alan/transmission-remote-gtk-1.1.1.png

This is a minor release with one bugfix:

  • Fix error when connecting to daemon behind a proxy, specifically nginx

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 tingping_at_fedoraproject.org
transmission-remote-gtk-1.4.1/data/io.github.TransmissionRemoteGtk.desktop.in000066400000000000000000000005171341276053300274440ustar00rootroot00000000000000[Desktop Entry] Name=Transmission Remote Comment=Remotely manage the Transmission BitTorrent client Exec=transmission-remote-gtk %U Icon=transmission-remote-gtk Terminal=false Type=Application MimeType=application/x-bittorrent;x-scheme-handler/magnet; Categories=Network;FileTransfer;P2P;GTK; Keywords=p2p;bittorrent;transmission;rpc; transmission-remote-gtk-1.4.1/extern/000077500000000000000000000000001341276053300176335ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/extern/Makefile.am000066400000000000000000000000451341276053300216660ustar00rootroot00000000000000if HAVE_RSS SUBDIRS = rss-glib endif transmission-remote-gtk-1.4.1/extern/rss-glib/000077500000000000000000000000001341276053300213555ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/extern/rss-glib/Makefile.am000066400000000000000000000006421341276053300234130ustar00rootroot00000000000000 noinst_LTLIBRARIES = librss.la librss_la_CPPFLAGS = \ -DG_LOG_DOMAIN=\"Rss\" librss_la_CFLAGS = \ $(TRG_CFLAGS) \ $(MRSS_CFLAGS) librss_la_LIBADD = \ $(MRSS_LIBS) librss_la_SOURCES = \ rss-parser.c \ rss-document.c \ rss-item.c noinst_HEADERS = \ rss-document-private.h \ rss-item-private.h \ rss-parser-private.h \ rss-parser.h \ rss-document.h \ rss-item.h \ rss-version.h \ rss-glib.h transmission-remote-gtk-1.4.1/extern/rss-glib/rss-document-private.h000066400000000000000000000027361341276053300256310ustar00rootroot00000000000000/* rss-document-private.h * * This file is part of RSS-GLib. * Copyright (C) 2008 Christian Hergert * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * Author: * Christian Hergert */ #ifndef __RSS_DOCUMENT_PRIVATE_H__ #define __RSS_DOCUMENT_PRIVATE_H__ #include struct _RssDocumentPrivate { gchar *encoding; gchar *guid; gchar *title; gchar *description; gchar *link; gchar *language; gchar *rating; gchar *copyright; gchar *pub_date; gchar *editor; gchar *editor_email; gchar *editor_uri; gint ttl; gchar *about; gchar *contributor; gchar *contributor_email; gchar *contributor_uri; gchar *generator; gchar *generator_uri; gchar *generator_version; gchar *image_title; gchar *image_url; gchar *image_link; GList *items; GList *categories; }; #endif /* __RSS_DOCUMENT_PRIVATE_H__ */ transmission-remote-gtk-1.4.1/extern/rss-glib/rss-document.c000066400000000000000000000725101341276053300241510ustar00rootroot00000000000000/* rss-document.c * * This file is part of RSS-GLib. * Copyright (C) 2008 Christian Hergert * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * Author: * Christian Hergert */ /** * SECTION:rss-document * @short_description: a RSS document representation * @see_also: rss_parser_get_document() * * #RssDocument is the representation of the resource that was parsed. It * contains a list of #RssItems which in turn contain article information. */ #include "rss-document.h" #include "rss-document-private.h" G_DEFINE_TYPE (RssDocument, rss_document, G_TYPE_OBJECT); enum { PROP_0, PROP_ENCODING, PROP_GUID, PROP_TITLE, PROP_DESCRIPTION, PROP_LINK, PROP_LANGUAGE, PROP_RATING, PROP_COPYRIGHT, PROP_PUB_DATE, PROP_PUB_DATE_PARSED, PROP_EDITOR, PROP_EDITOR_EMAIL, PROP_EDITOR_URI, PROP_TTL, PROP_ABOUT, PROP_CONTRIBUTOR, PROP_CONTRIBUTOR_EMAIL, PROP_CONTRIBUTOR_URI, PROP_GENERATOR, PROP_GENERATOR_URI, PROP_GENERATOR_VERSION, PROP_IMAGE_TITLE, PROP_IMAGE_URL, PROP_IMAGE_LINK }; static void rss_document_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RssDocumentPrivate *priv = RSS_DOCUMENT (object)->priv; switch (property_id) { case PROP_ENCODING: g_value_set_string (value, priv->encoding); break; case PROP_GUID: g_value_set_string (value, priv->guid); break; case PROP_TITLE: g_value_set_string (value, priv->title); break; case PROP_DESCRIPTION: g_value_set_string (value, priv->description); break; case PROP_LINK: g_value_set_string (value, priv->link); break; case PROP_LANGUAGE: g_value_set_string (value, priv->language); break; case PROP_RATING: g_value_set_string (value, priv->rating); break; case PROP_COPYRIGHT: g_value_set_string (value, priv->copyright); break; case PROP_PUB_DATE: g_value_set_string (value, priv->pub_date); break; case PROP_EDITOR: g_value_set_string (value, priv->editor); break; case PROP_EDITOR_EMAIL: g_value_set_string (value, priv->editor_email); break; case PROP_EDITOR_URI: g_value_set_string (value, priv->editor_uri); break; case PROP_ABOUT: g_value_set_string (value, priv->about); break; case PROP_CONTRIBUTOR: g_value_set_string (value, priv->contributor); break; case PROP_CONTRIBUTOR_EMAIL: g_value_set_string (value, priv->contributor_email); break; case PROP_CONTRIBUTOR_URI: g_value_set_string (value, priv->contributor_uri); break; case PROP_GENERATOR: g_value_set_string (value, priv->generator); break; case PROP_GENERATOR_URI: g_value_set_string (value, priv->generator_uri); break; case PROP_GENERATOR_VERSION: g_value_set_string (value, priv->generator_version); break; case PROP_IMAGE_TITLE: g_value_set_string (value, priv->image_title); break; case PROP_IMAGE_URL: g_value_set_string (value, priv->image_url); break; case PROP_IMAGE_LINK: g_value_set_string (value, priv->image_link); break; case PROP_TTL: g_value_set_int (value, priv->ttl); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void rss_document_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RssDocumentPrivate *priv = RSS_DOCUMENT (object)->priv; switch (property_id) { case PROP_ENCODING: g_free (priv->encoding); priv->encoding = g_value_dup_string (value); break; case PROP_GUID: g_free (priv->guid); priv->guid = g_value_dup_string (value); break; case PROP_TITLE: g_free (priv->title); priv->title = g_value_dup_string (value); break; case PROP_DESCRIPTION: g_free (priv->description); priv->description = g_value_dup_string (value); break; case PROP_LINK: g_free (priv->link); priv->link = g_value_dup_string (value); break; case PROP_LANGUAGE: g_free (priv->language); priv->language = g_value_dup_string (value); break; case PROP_RATING: g_free (priv->rating); priv->rating = g_value_dup_string (value); break; case PROP_COPYRIGHT: g_free (priv->copyright); priv->copyright = g_value_dup_string (value); break; case PROP_PUB_DATE: g_free (priv->pub_date); priv->pub_date = g_value_dup_string (value); break; case PROP_EDITOR: g_free (priv->editor); priv->editor = g_value_dup_string (value); break; case PROP_EDITOR_EMAIL: g_free (priv->editor_email); priv->editor_email = g_value_dup_string (value); break; case PROP_EDITOR_URI: g_free (priv->editor_uri); priv->editor_uri = g_value_dup_string (value); break; case PROP_ABOUT: g_free (priv->about); priv->about = g_value_dup_string (value); break; case PROP_CONTRIBUTOR: g_free (priv->contributor); priv->contributor = g_value_dup_string (value); break; case PROP_CONTRIBUTOR_EMAIL: g_free (priv->contributor_email); priv->contributor_email = g_value_dup_string (value); break; case PROP_CONTRIBUTOR_URI: g_free (priv->contributor_uri); priv->contributor_uri = g_value_dup_string (value); break; case PROP_GENERATOR: g_free (priv->generator); priv->generator = g_value_dup_string (value); break; case PROP_GENERATOR_URI: g_free (priv->generator_uri); priv->generator_uri = g_value_dup_string (value); break; case PROP_GENERATOR_VERSION: g_free (priv->generator_version); priv->generator_version = g_value_dup_string (value); break; case PROP_IMAGE_TITLE: g_free (priv->image_title); priv->image_title = g_value_dup_string (value); break; case PROP_IMAGE_URL: g_free (priv->image_url); priv->image_url = g_value_dup_string (value); break; case PROP_IMAGE_LINK: g_free (priv->image_link); priv->image_link = g_value_dup_string (value); break; case PROP_TTL: priv->ttl = g_value_get_int (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void rss_document_dispose (GObject *object) { RssDocumentPrivate *priv = RSS_DOCUMENT (object)->priv; g_free (priv->encoding); g_free (priv->guid); g_free (priv->title); g_free (priv->description); g_free (priv->link); g_free (priv->language); g_free (priv->rating); g_free (priv->copyright); g_free (priv->pub_date); g_free (priv->editor); g_free (priv->editor_email); g_free (priv->editor_uri); g_free (priv->about); g_free (priv->contributor); g_free (priv->contributor_email); g_free (priv->contributor_uri); g_free (priv->generator); g_free (priv->generator_uri); g_free (priv->generator_version); g_free (priv->image_title); g_free (priv->image_url); g_free (priv->image_link); /* free the items */ g_list_foreach (priv->items, (GFunc) g_object_unref, NULL); g_list_free (priv->items); /* free the category strings */ g_list_foreach (priv->categories, (GFunc) g_free, NULL); g_list_free (priv->categories); G_OBJECT_CLASS (rss_document_parent_class)->dispose (object); } static void rss_document_class_init (RssDocumentClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GParamSpec *pspec; g_type_class_add_private (klass, sizeof (RssDocumentPrivate)); gobject_class->get_property = rss_document_get_property; gobject_class->set_property = rss_document_set_property; gobject_class->dispose = rss_document_dispose; /** * RssDocument:encoding: * * The encoding of the #RssDocument. */ pspec = g_param_spec_string ("encoding", "Encoding", "Encoding of the document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_ENCODING, pspec); /** * RssDocument:guid: * * The guid associated with the feed. This is often the url of the * feed. */ pspec = g_param_spec_string ("guid", "GUID", "The GUID of the document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_GUID, pspec); /** * RssDocument:title: * * The title of the #RssDocument. */ pspec = g_param_spec_string ("title", "Title", "Title of the document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_TITLE, pspec); /** * RssDocument:description: * * The description of the #RssDocument. */ pspec = g_param_spec_string ("description", "Description", "Description of the document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_DESCRIPTION, pspec); /** * RssDocument:link: * * The link to the source document. This is parsed from the actual * document and can point to whatever the source publisher choses. */ pspec = g_param_spec_string ("link", "Link", "The link to the source document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_LINK, pspec); /** * RssDocument:language: * * The language the #RssDocument was published in. */ pspec = g_param_spec_string ("language", "Language", "Language of the document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_LANGUAGE, pspec); /** * RssDocument:rating: * * The rating associated with the #RssDocument. */ pspec = g_param_spec_string ("rating", "Rating", "Rating of the document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_RATING, pspec); /** * RssDocument:copyright: * * The copyright of the #RssDocument. */ pspec = g_param_spec_string ("copyright", "Copyright", "Copyright of the document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_COPYRIGHT, pspec); /** * RssDocument:pub-date: * * The string representation of the date the document was published. */ pspec = g_param_spec_string ("pub-date", "Publication Date", "Publication date of the document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_PUB_DATE, pspec); /** * RssDocument:editor: * * The name of the editor. */ pspec = g_param_spec_string ("editor", "Editor", "Editor of the document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_EDITOR, pspec); /** * RssDocument:editor-email: * * The email address of the editor. */ pspec = g_param_spec_string ("editor-email", "Editor Email", "Email of the editor", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_EDITOR_EMAIL, pspec); /** * RssDocument:editor-uri: * * The uri for more information about the editor. */ pspec = g_param_spec_string ("editor-uri", "Editor URI", "The URI of the editor", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_EDITOR_URI, pspec); /** * RssDocument:about: * * Information about the #RssDocument. */ pspec = g_param_spec_string ("about", "About", "Information about the document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_ABOUT, pspec); /** * RssDocument:contributor: * * The name of the particular contributor. */ pspec = g_param_spec_string ("contributor", "Contributor", "Name of the contributor", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_CONTRIBUTOR, pspec); /** * RssDocument:contributor-email: * * The email of the particular contributor. */ pspec = g_param_spec_string ("contributor-email", "Contributor Email", "Email of the contributor", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_CONTRIBUTOR_EMAIL, pspec); /** * RssDocument:contributor-uri: * * The uri to more information on the particular contributer. */ pspec = g_param_spec_string ("contributor-uri", "Contributor URI", "URI of the contributor", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_CONTRIBUTOR_URI, pspec); /** * RssDocument:generator: * * The name of the generator on the server side. */ pspec = g_param_spec_string ("generator", "Generator", "Name of the document generator", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_GENERATOR, pspec); /** * RssDocument:generator-uri: * * Url to more information about the generator on the server side. */ pspec = g_param_spec_string ("generator-uri", "Generator URI", "URI of the document generator", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_GENERATOR_URI, pspec); /** * RssDocument:generator-version: * * The version of the server side generator. */ pspec = g_param_spec_string ("generator-version", "Generator Version", "Version of the document generator", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_GENERATOR_VERSION, pspec); /** * RssDocument:image-title: * * The title for the image. This is often the alt="" tag in HTML. */ pspec = g_param_spec_string ("image-title", "Image Title", "Title of the image for the document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_IMAGE_TITLE, pspec); /** * RssDocument:image-url: * * A url to the image for the RssDocument. Use this before checking * for a favicon.ico. */ pspec = g_param_spec_string ("image-url", "Image URL", "URL of the image for the document", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_IMAGE_URL, pspec); /** * RssDocument:image-link: * * The url a user should be redirected to when clicking on the image * for the #RssDocument. Of course, its up to UI designers if they * wish to implement this in any sort of way. */ pspec = g_param_spec_string ("image-link", "Image Link", "URL for document image link", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_IMAGE_LINK, pspec); /** * RssDocument:ttl: * * The publisher determined TTL for the source. Readers should try * to respect this value and not update feeds any more often than * necessary. */ pspec = g_param_spec_int ("ttl", "TTL", "Time to live for the document", 0, G_MAXINT32, 0, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_TTL, pspec); } static void rss_document_init (RssDocument *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, RSS_TYPE_DOCUMENT, RssDocumentPrivate); } /** * rss_document_new: * * Creates a new instance of #RssDocument. This isn't incredibly useful * currently, but is here none-the-less. The desire is to create an * RSS generator that will allow for building RSS streams out of the * document hierarchy. * * Returns: a new #RssDocument. Use g_object_unref() when you are done. */ RssDocument* rss_document_new (void) { return g_object_new (RSS_TYPE_DOCUMENT, NULL); } /** * rss_document_get_items: * @self: a #RssDocument * * Creates a #GList of #RssItems that were found in the syndication. The objects * in the list are weak references. Consumers of those objects should ref * them with g_object_ref. * * Returns: a new #GList owned by the caller. */ GList* rss_document_get_items (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return g_list_copy (self->priv->items); } /** * rss_document_get_categories: * @self: a #RssDocument * * Creates a #GList of categories found in the syndication. The strings * in the list are weak references. Consumers should duplicate them * with g_strdup(). * * Returns: a new #GList owned by the caller */ GList* rss_document_get_categories (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return g_list_copy (self->priv->categories); } /** * rss_document_get_guid: * @self: a #RssDocument * * Retrieves the #RssDocument:guid field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_guid (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->guid; } /** * rss_document_get_about: * @self: a #RssDocument * * Retrieves the #RssDocument:about field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_about (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->about; } /** * rss_document_get_title: * @self: a #RssDocument * * Retrieves the #RssDocument:title field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_title (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->title; } /** * rss_document_get_description: * @self: a #RssDocument * * Retrieves the #RssDocument:description field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_description (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->description; } /** * rss_document_get_link: * @self: a #RssDocument * * Retrieves the #RssDocument:link field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_link (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->link; } /** * rss_document_get_encoding: * @self: a #RssDocument * * Retrieves the #RssDocument:encoding field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_encoding (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->encoding; } /** * rss_document_get_language: * @self: a #RssDocument * * Retrieves the #RssDocument:language field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_language (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->language; } /** * rss_document_get_rating: * @self: a #RssDocument * * Retrieves the #RssDocument:rating field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_rating (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->rating; } /** * rss_document_get_copyright: * @self: a #RssDocument * * Retrieves the #RssDocument:copyright field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_copyright (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->copyright; } /** * rss_document_get_pub_date: * @self: a #RssDocument * * Retrieves the #RssDocument:pub-date field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_pub_date (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->pub_date; } /** * rss_document_get_editor_name: * @self: a #RssDocument * * Retrieves the #RssDocument:editor field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_editor_name (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->editor; } /** * rss_document_get_editor_email: * @self: a #RssDocument * * Retrieves the #RssDocument:editor-email field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_editor_email (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->editor_email; } /** * rss_document_get_editor_uri: * @self: a #RssDocument * * Retrieves the #RssDocument:editor-uri field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_editor_uri (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->editor_uri; } /** * rss_document_get_contributor: * @self: a #RssDocument * * Retrieves the #RssDocument:contributor field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_contributor_name (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->contributor; } /** * rss_document_get_contributor_email: * @self: a #RssDocument * * Retrieves the #RssDocument:contributor-email field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_contributor_email (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->contributor_email; } /** * rss_document_get_contributor_uri: * @self: a #RssDocument * * Retrieves the #RssDocument:contributor-uri field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_contributor_uri (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->contributor_uri; } /** * rss_document_get_generator_name: * @self: a #RssDocument * * Retrieves the #RssDocument:generator-name field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_generator_name (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->generator; } /** * rss_document_get_generator_uri: * @self: a #RssDocument * * Retrieves the #RssDocument:generator-uri field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_generator_uri (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->generator_uri; } /** * rss_document_get_generator_version: * @self: a #RssDocument * * Retrieves the #RssDocument:generator-version field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_generator_version (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->generator_version; } /** * rss_document_get_image_title: * @self: a #RssDocument * * Retrieves the #RssDocument:image-title field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_image_title (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->image_title; } /** * rss_document_get_image_url: * @self: a #RssDocument * * Retrieves the #RssDocument:image-url field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_image_url (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->image_url; } /** * rss_document_get_image_link: * @self: a #RssDocument * * Retrieves the #RssDocument:image-link field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ const gchar * rss_document_get_image_link (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), NULL); return self->priv->image_link; } /** * rss_document_get_ttl: * @self: a #RssDocument * * Retrieves the #RssDocument:ttl field. * * Return value: the contents of the field. The returned string is * owned by the #RssDocument and should never be modified of freed */ gint rss_document_get_ttl (RssDocument *self) { g_return_val_if_fail (RSS_IS_DOCUMENT (self), 0); return self->priv->ttl; } transmission-remote-gtk-1.4.1/extern/rss-glib/rss-document.h000066400000000000000000000074171341276053300241620ustar00rootroot00000000000000/* rss-document.h * * This file is part of RSS-GLib. * Copyright (C) 2008 Christian Hergert * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * Author: * Christian Hergert */ #ifndef __RSS_DOCUMENT_H__ #define __RSS_DOCUMENT_H__ #include G_BEGIN_DECLS #define RSS_TYPE_DOCUMENT rss_document_get_type() #define RSS_DOCUMENT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ RSS_TYPE_DOCUMENT, \ RssDocument)) #define RSS_DOCUMENT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), \ RSS_TYPE_DOCUMENT, \ RssDocumentClass)) #define RSS_IS_DOCUMENT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ RSS_TYPE_DOCUMENT)) #define RSS_IS_DOCUMENT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), \ RSS_TYPE_DOCUMENT)) #define RSS_DOCUMENT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), \ RSS_TYPE_DOCUMENT, \ RssDocumentClass)) typedef struct _RssDocument RssDocument; typedef struct _RssDocumentPrivate RssDocumentPrivate; typedef struct _RssDocumentClass RssDocumentClass; struct _RssDocument { /*< private >*/ GObject parent_instance; RssDocumentPrivate *priv; }; struct _RssDocumentClass { /*< private >*/ GObjectClass parent_class; }; GType rss_document_get_type (void); RssDocument* rss_document_new (void); const gchar *rss_document_get_guid (RssDocument *self); const gchar *rss_document_get_about (RssDocument *self); const gchar *rss_document_get_title (RssDocument *self); const gchar *rss_document_get_description (RssDocument *self); const gchar *rss_document_get_link (RssDocument *self); const gchar *rss_document_get_encoding (RssDocument *self); const gchar *rss_document_get_language (RssDocument *self); const gchar *rss_document_get_rating (RssDocument *self); const gchar *rss_document_get_copyright (RssDocument *self); const gchar *rss_document_get_pub_date (RssDocument *self); const gchar *rss_document_get_editor_name (RssDocument *self); const gchar *rss_document_get_editor_email (RssDocument *self); const gchar *rss_document_get_editor_uri (RssDocument *self); const gchar *rss_document_get_contributor_name (RssDocument *self); const gchar *rss_document_get_contributor_email (RssDocument *self); const gchar *rss_document_get_contributor_uri (RssDocument *self); const gchar *rss_document_get_generator_name (RssDocument *self); const gchar *rss_document_get_generator_uri (RssDocument *self); const gchar *rss_document_get_generator_version (RssDocument *self); const gchar *rss_document_get_image_title (RssDocument *self); const gchar *rss_document_get_image_url (RssDocument *self); const gchar *rss_document_get_image_link (RssDocument *self); gint rss_document_get_ttl (RssDocument *self); GList * rss_document_get_items (RssDocument *self); GList * rss_document_get_categories (RssDocument *self); G_END_DECLS #endif /* __RSS_DOCUMENT_H__ */ transmission-remote-gtk-1.4.1/extern/rss-glib/rss-glib.h000066400000000000000000000003211341276053300232440ustar00rootroot00000000000000#ifndef __RSS_GLIB_H__ #define __RSS_GLIB_H__ #include #include #include #include #endif /* __RSS_GLIB_H__ */ transmission-remote-gtk-1.4.1/extern/rss-glib/rss-item-private.h000066400000000000000000000024151341276053300247430ustar00rootroot00000000000000/* rss-item-private.h * * This file is part of RSS-GLib. * Copyright (C) 2008 Christian Hergert * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * Author: * Christian Hergert */ #ifndef __RSS_ITEM_PRIVATE_H__ #define __RSS_ITEM_PRIVATE_H__ struct _RssItemPrivate { gchar *guid; gchar *title; gchar *link; gchar *description; gchar *copyright; gchar *author; gchar *author_uri; gchar *author_email; gchar *contributor; gchar *contributor_uri; gchar *contributor_email; gchar *comments; gchar *pub_date; gchar *source; gchar *source_url; GList *categories; }; #endif /* __RSS_ITEM_PRIVATE_H__ */ transmission-remote-gtk-1.4.1/extern/rss-glib/rss-item.c000066400000000000000000000462531341276053300232760ustar00rootroot00000000000000/* rss-item.c * * This file is part of RSS-GLib. * Copyright (C) 2008 Christian Hergert * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * Author: * Christian Hergert */ /** * SECTION:rss-item * @short_description: a RSS entry representation * * #RssItem is the representation of an individual item parsed from a * #RssDocument. This would mean an individual article, or note within * the source feed. */ #include "rss-item.h" #include "rss-item-private.h" G_DEFINE_TYPE (RssItem, rss_item, G_TYPE_OBJECT); enum { PROP_0, PROP_TITLE, PROP_LINK, PROP_DESCRIPTION, PROP_COPYRIGHT, PROP_AUTHOR, PROP_AUTHOR_URI, PROP_AUTHOR_EMAIL, PROP_CONTRIBUTOR, PROP_CONTRIBUTOR_URI, PROP_CONTRIBUTOR_EMAIL, PROP_COMMENTS, PROP_PUB_DATE, PROP_GUID, PROP_SOURCE, PROP_SOURCE_URL }; static void rss_item_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RssItemPrivate *priv = RSS_ITEM (object)->priv; switch (property_id) { case PROP_TITLE: g_value_set_string (value, priv->title); break; case PROP_LINK: g_value_set_string (value, priv->link); break; case PROP_DESCRIPTION: g_value_set_string (value, priv->description); break; case PROP_COPYRIGHT: g_value_set_string (value, priv->copyright); break; case PROP_AUTHOR: g_value_set_string (value, priv->author); break; case PROP_AUTHOR_URI: g_value_set_string (value, priv->author_uri); break; case PROP_AUTHOR_EMAIL: g_value_set_string (value, priv->author_email); break; case PROP_CONTRIBUTOR: g_value_set_string (value, priv->contributor); break; case PROP_CONTRIBUTOR_URI: g_value_set_string (value, priv->contributor_uri); break; case PROP_CONTRIBUTOR_EMAIL: g_value_set_string (value, priv->contributor_email); break; case PROP_COMMENTS: g_value_set_string (value, priv->comments); break; case PROP_PUB_DATE: g_value_set_string (value, priv->pub_date); break; case PROP_GUID: g_value_set_string (value, priv->guid); break; case PROP_SOURCE: g_value_set_string (value, priv->source); break; case PROP_SOURCE_URL: g_value_set_string (value, priv->source_url); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void rss_item_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RssItemPrivate *priv = RSS_ITEM (object)->priv; switch (property_id) { case PROP_TITLE: g_free (priv->title); priv->title = g_value_dup_string (value); break; case PROP_LINK: g_free (priv->link); priv->link = g_value_dup_string (value); break; case PROP_DESCRIPTION: g_free (priv->description); priv->description = g_value_dup_string (value); break; case PROP_COPYRIGHT: g_free (priv->copyright); priv->copyright = g_value_dup_string (value); break; case PROP_AUTHOR: g_free (priv->author); priv->author = g_value_dup_string (value); break; case PROP_AUTHOR_URI: g_free (priv->author_uri); priv->author_uri = g_value_dup_string (value); break; case PROP_AUTHOR_EMAIL: g_free (priv->author_email); priv->author_email = g_value_dup_string (value); break; case PROP_CONTRIBUTOR: g_free (priv->contributor); priv->contributor = g_value_dup_string (value); break; case PROP_CONTRIBUTOR_URI: g_free (priv->contributor_uri); priv->contributor_uri = g_value_dup_string (value); break; case PROP_CONTRIBUTOR_EMAIL: g_free (priv->contributor_email); priv->contributor_email = g_value_dup_string (value); break; case PROP_COMMENTS: g_free (priv->comments); priv->comments = g_value_dup_string (value); break; case PROP_PUB_DATE: g_free (priv->pub_date); priv->pub_date = g_value_dup_string (value); break; case PROP_GUID: g_free (priv->guid); priv->guid = g_value_dup_string (value); break; case PROP_SOURCE: g_free (priv->source); priv->source = g_value_dup_string (value); break; case PROP_SOURCE_URL: g_free (priv->source_url); priv->source_url = g_value_dup_string (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void rss_item_finalize (GObject *object) { RssItemPrivate *priv = RSS_ITEM (object)->priv; g_free (priv->guid); g_free (priv->title); g_free (priv->link); g_free (priv->description); g_free (priv->copyright); g_free (priv->author); g_free (priv->author_uri); g_free (priv->author_email); g_free (priv->contributor); g_free (priv->contributor_uri); g_free (priv->contributor_email); g_free (priv->comments); g_free (priv->pub_date); g_free (priv->source); g_free (priv->source_url); g_list_foreach (priv->categories, (GFunc) g_free, NULL); g_list_free (priv->categories); G_OBJECT_CLASS (rss_item_parent_class)->finalize (object); } static void rss_item_class_init (RssItemClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GParamSpec *pspec; g_type_class_add_private (klass, sizeof (RssItemPrivate)); gobject_class->get_property = rss_item_get_property; gobject_class->set_property = rss_item_set_property; gobject_class->finalize = rss_item_finalize; /** * RssItem:title: * * The title of the item. */ pspec = g_param_spec_string ("title", "Title", "Title of the item", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_TITLE, pspec); /** * RssItem:link: * * The link to the upstream source of the item. */ pspec = g_param_spec_string ("link", "Link", "Link to the upstream source", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_LINK, pspec); /** * RssItem:description: * * The description of the item. This is often where the actual * content for the item is stored. */ pspec = g_param_spec_string ("description", "Description", "Description of the item", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_DESCRIPTION, pspec); /** * RssItem:copyright: * * Any associated copyright that may exist for the content. */ pspec = g_param_spec_string ("copyright", "Copyright", "Any associated copyright for " "the content", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_COPYRIGHT, pspec); /** * RssItem:author: * * The author's name. */ pspec = g_param_spec_string ("author", "Author", "The name of the author", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_AUTHOR, pspec); /** * RssItem:author-uri: * * The authors uri, often a website. */ pspec = g_param_spec_string ("author-uri", "Author URI", "The URI of the author", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_AUTHOR_URI, pspec); /** * RssItem:author-email: * * The authors email. */ pspec = g_param_spec_string ("author-email", "Author Email", "The email address of the author", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_AUTHOR_EMAIL, pspec); /** * RssItem:contributor: * * The contributors name. */ pspec = g_param_spec_string ("contributor", "Contributor", "The name of the contributor", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_CONTRIBUTOR, pspec); /** * RssItem:contributor-uri: * * The contributors uri, often a website. */ pspec = g_param_spec_string ("contributor-uri", "Contributor URI", "The URI of the contributor", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_CONTRIBUTOR_URI, pspec); /** * RssItem:contributor-email: * * The contributors email. */ pspec = g_param_spec_string ("contributor-email", "Contributor Email", "The email of the contributor", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_CONTRIBUTOR_EMAIL, pspec); /** * RssItem:comments: * * Any comments that may have been associated with the item. */ pspec = g_param_spec_string ("comments", "Comments", "Any comment associated to the item", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_COMMENTS, pspec); /** * RssItem:pub-date: * * The string representation of the publish date. */ pspec = g_param_spec_string ("pub-date", "Publication Date", "The date of publication", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_PUB_DATE, pspec); /** * RssItem:guid: * * The guid of the item. Many feed engines will use the url here * plus some tag metadata. */ pspec = g_param_spec_string ("guid", "GUID", "The guid of the item", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_GUID, pspec); /** * RssItem:source: * * The name of the source of the item. */ pspec = g_param_spec_string ("source", "Source", "Source of the item", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_SOURCE, pspec); /** * RssItem:source-url: * * The url of the source of the item. */ pspec = g_param_spec_string ("source-url", "Source URL", "URL of the source", NULL, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_SOURCE_URL, pspec); } static void rss_item_init (RssItem *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, RSS_TYPE_ITEM, RssItemPrivate); } /** * rss_item_new: * * Creates a new #RssItem. This isn't incredibly useful yet as we do not * have an RssGenerator written. However, that will come eventuall and * make creating feeds much simpler. * * Returns: a new #RssItem which should be unref'd with g_object_unref(). */ RssItem* rss_item_new (void) { return g_object_new (RSS_TYPE_ITEM, NULL); } /** * rss_item_get_guid: * @self: a #RssItem * * Retrieves the #RssItem:guid field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_guid (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->guid; } /** * rss_item_get_title: * @self: a #RssItem * * Retrieves the #RssItem:title field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_title (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->title; } /** * rss_item_get_link: * @self: a #RssItem * * Retrieves the #RssItem:link field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_link (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->link; } /** * rss_item_get_description: * @self: a #RssItem * * Retrieves the #RssItem:description field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_description (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->description; } /** * rss_item_get_copyright: * @self: a #RssItem * * Retrieves the #RssItem:copyright field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_copyright (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->copyright; } /** * rss_item_get_author_name: * @self: a #RssItem * * Retrieves the #RssItem:author field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_author_name (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->author; } /** * rss_item_get_author_uri: * @self: a #RssItem * * Retrieves the #RssItem:author-uri field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_author_uri (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->author_uri; } /** * rss_item_get_author_email: * @self: a #RssItem * * Retrieves the #RssItem:author-email field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_author_email (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->author_email; } /** * rss_item_get_contributor_name: * @self: a #RssItem * * Retrieves the #RssItem:contributor field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_contributor_name (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->contributor; } /** * rss_item_get_contributor_uri: * @self: a #RssItem * * Retrieves the #RssItem:contributor-uri field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_contributor_uri (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->contributor_uri; } /** * rss_item_get_contributor_email: * @self: a #RssItem * * Retrieves the #RssItem:contributor-email field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_contributor_email (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->contributor_email; } /** * rss_item_get_comments: * @self: a #RssItem * * Retrieves the #RssItem:comments field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_comments (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->comments; } /** * rss_item_get_pub_date: * @self: a #RssItem * * Retrieves the #RssItem:pub-date field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_pub_date (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->pub_date; } /** * rss_item_get_source: * @self: a #RssItem * * Retrieves the #RssItem:source field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_source (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->source; } /** * rss_item_get_source_url: * @self: a #RssItem * * Retrieves the #RssItem:source-url field. * * Return value: the value of the field. The returned string is * owned by the #RssItem and should never be modified or freed. */ const gchar * rss_item_get_source_url (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return self->priv->source_url; } /** * rss_item_get_categories: * @self: a #RssItem * * Returns a copy of the list of categories for the #RssItem. The data * in the linked list are pointers to strings (char*). They are owned * by the #RssItem and should not be modified. Use g_strdup() to copy * the individual strings. * * Returns: a new #GList which should be freed with g_list_free(). */ GList* rss_item_get_categories (RssItem *self) { g_return_val_if_fail (RSS_IS_ITEM (self), NULL); return g_list_copy (self->priv->categories); } transmission-remote-gtk-1.4.1/extern/rss-glib/rss-item.h000066400000000000000000000055341341276053300233000ustar00rootroot00000000000000/* rss-item.h * * This file is part of RSS-GLib. * Copyright (C) 2008 Christian Hergert * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * Author: * Christian Hergert */ #ifndef __RSS_ITEM_H__ #define __RSS_ITEM_H__ #include G_BEGIN_DECLS #define RSS_TYPE_ITEM rss_item_get_type() #define RSS_ITEM(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ RSS_TYPE_ITEM, \ RssItem)) #define RSS_ITEM_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), \ RSS_TYPE_ITEM, \ RssItemClass)) #define RSS_IS_ITEM(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ RSS_TYPE_ITEM)) #define RSS_IS_ITEM_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), \ RSS_TYPE_ITEM)) #define RSS_ITEM_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), \ RSS_TYPE_ITEM, \ RssItemClass)) typedef struct _RssItem RssItem; typedef struct _RssItemPrivate RssItemPrivate; typedef struct _RssItemClass RssItemClass; struct _RssItem { /*< private >*/ GObject parent_instance; RssItemPrivate *priv; }; struct _RssItemClass { /*< private >*/ GObjectClass parent_class; }; GType rss_item_get_type (void); RssItem* rss_item_new (void); const gchar *rss_item_get_guid (RssItem *self); const gchar *rss_item_get_title (RssItem *self); const gchar *rss_item_get_link (RssItem *self); const gchar *rss_item_get_description (RssItem *self); const gchar *rss_item_get_copyright (RssItem *self); const gchar *rss_item_get_author_name (RssItem *self); const gchar *rss_item_get_author_uri (RssItem *self); const gchar *rss_item_get_author_email (RssItem *self); const gchar *rss_item_get_contributor_name (RssItem *self); const gchar *rss_item_get_contributor_uri (RssItem *self); const gchar *rss_item_get_contributor_email (RssItem *self); const gchar *rss_item_get_comments (RssItem *self); const gchar *rss_item_get_pub_date (RssItem *self); const gchar *rss_item_get_source (RssItem *self); const gchar *rss_item_get_source_url (RssItem *self); GList* rss_item_get_categories (RssItem *self); G_END_DECLS #endif /* __RSS_ITEM_H__ */ transmission-remote-gtk-1.4.1/extern/rss-glib/rss-parser-private.h000066400000000000000000000023151341276053300253000ustar00rootroot00000000000000/* rss-parser-private.h * * This file is part of RSS-GLib. * Copyright (C) 2008 Christian Hergert * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * Author: * Christian Hergert */ #ifndef __RSS_PARSER_PRIVATE_H__ #define __RSS_PARSER_PRIVATE_H__ #include G_BEGIN_DECLS struct _RssParserPrivate { RssDocument *document; }; typedef enum { RSS_PARSER_ERROR_INVALID_DATA, } RssParserError; #define RSS_PARSER_ERROR rss_parser_error_quark() GQuark rss_parser_error_quark (void); G_END_DECLS #endif /* __RSS_PARSER_PRIVATE_H__ */ transmission-remote-gtk-1.4.1/extern/rss-glib/rss-parser.c000066400000000000000000000226061341276053300236300ustar00rootroot00000000000000/* rss-generator.c * * This file is part of RSS-GLib. * Copyright (C) 2008 Christian Hergert * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * Author: * Christian Hergert */ /** * SECTION:rss-parser * @short_description: Parse RSS data streams * * #RssParser provides an object for parsing a RSS data stream, either * inside a file or inside a static buffer. */ #include "rss-parser.h" #include "rss-parser-private.h" #include "rss-item.h" #include "rss-item-private.h" #include "rss-document.h" #include "rss-document-private.h" GQuark rss_parser_error_quark (void) { return g_quark_from_static_string ("rss_parser_error"); } enum { PARSE_START, PARSE_END, LAST_SIGNAL }; static guint parser_signals[LAST_SIGNAL] = { 0, }; G_DEFINE_TYPE (RssParser, rss_parser, G_TYPE_OBJECT); static void rss_parser_dispose (GObject *object) { RssParserPrivate *priv = RSS_PARSER (object)->priv; if (priv->document) { g_object_unref (priv->document); priv->document = NULL; } G_OBJECT_CLASS (rss_parser_parent_class)->dispose (object); } static void rss_parser_class_init (RssParserClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (klass, sizeof (RssParserPrivate)); object_class->dispose = rss_parser_dispose; /** * RssParser::parse-start: * @parser: the #RssParser that received the signal * * The ::parse-signal is emitted when the parser began parsing * a RSS data stream. */ parser_signals[PARSE_START] = g_signal_new ("parse-start", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RssParserClass, parse_start), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * RssParser::parse-end: * @parser: the #RssParser that received the signal * * The ::parse-end signal is emitted when the parser successfully * finished parsing a RSS data stream. */ parser_signals[PARSE_END] = g_signal_new ("parse-end", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RssParserClass, parse_end), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } static void rss_parser_init (RssParser *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, RSS_TYPE_PARSER, RssParserPrivate); } /** * rss_parser_new: * * Creates a new #RssParser instance. You can use the #RssParser to * load a RSS stream from either a file or a buffer and then walk the * items discovered through the resulting RssDocument. * * Return value: the new created #RssParser. Use g_object_unref() to * release all the memory it allocates. */ RssParser* rss_parser_new (void) { return g_object_new (RSS_TYPE_PARSER, NULL); } static RssDocument* rss_parser_parse (RssParser *self, mrss_t *mrss) { RssDocument *document; RssItem *rss_item; GList *list, *list2; mrss_category_t *cat; mrss_item_t *item; g_return_val_if_fail (RSS_IS_PARSER (self), NULL); g_return_val_if_fail (mrss != NULL, NULL); /* create our document object */ document = rss_document_new (); /* set our document level properties */ g_object_set (document, "encoding", mrss->encoding, "guid", mrss->id, "title", mrss->title, "description", mrss->description, "link", mrss->link, "language", mrss->language, "rating", mrss->rating, "copyright", mrss->copyright, "pub-date", mrss->pubDate, "ttl", mrss->ttl, "about", mrss->about, "contributor", mrss->contributor, "contributor-email", mrss->contributor_email, "contributor-uri", mrss->contributor_uri, "generator", mrss->generator, "generator-uri", mrss->generator_uri, "generator-version", mrss->generator_version, "image-title", mrss->image_title, "image-url", mrss->image_url, "image-link", mrss->image_link, NULL); /* build the list of categories */ if (NULL != (cat = mrss->category)) { list = NULL; do { list = g_list_prepend (list, g_strdup (cat->category)); } while (NULL != (cat = cat->next)); document->priv->categories = list; } /* build the list of items */ if (NULL != (item = mrss->item)) { list = NULL; do { rss_item = rss_item_new (); /* set the rss item properties */ g_object_set (rss_item, "guid", item->guid, "title", item->title, "link", item->link, "description", item->description, "copyright", item->copyright, "author", item->author, "author-uri", item->author_uri, "author-email", item->author_email, "contributor", item->contributor, "contributor-uri", item->contributor_uri, "contributor-email", item->contributor_email, "comments", item->comments, "pub-date", item->pubDate, "source", item->source, "source-url", item->source_url, NULL); /* parse the items categories */ if (NULL != (cat = item->category)) { list2 = NULL; do { list2 = g_list_prepend (list2, g_strdup (cat->category)); } while (NULL != (cat = cat->next)); rss_item->priv->categories = list2; } list = g_list_prepend (list, rss_item); } while (NULL != (item = item->next)); document->priv->items = list; } return document; } /** * rss_parser_load_from_data: * @self: a #RssParser * @data: a buffer containing the syndication data * @length: the length of the buffer * @error: a location to place a newly created GError in case of error * * Parses the contents found at @data as an rss file. You can retrieve * the parsed document with rss_parser_get_document(). * * Returns: TRUE on success. */ gboolean rss_parser_load_from_data (RssParser *self, const gchar *data, gsize length, GError **error) { mrss_t *mrss; mrss_error_t res; g_signal_emit (self, parser_signals[PARSE_START], 0); /* parse the buffer */ res = mrss_parse_buffer ((char*)data, length, &mrss); /* if there was an error parsing, set the error and return false */ if (MRSS_OK != res) { if (error) { g_set_error (error, RSS_PARSER_ERROR, RSS_PARSER_ERROR_INVALID_DATA, "Could not parse data contents"); } return FALSE; } /* keep a copy of our parsed document */ self->priv->document = rss_parser_parse (self, mrss); /* free our mrss data */ mrss_free (mrss); g_signal_emit (self, parser_signals[PARSE_END], 0); return TRUE; } /** * rss_parser_load_from_file: * @self: a #RssParser * @filename: the path to the file to parse * @error: a location for a newly created #GError * * Parses the file found at @filename as an rss file. You can retrieve * the parsed document with rss_parser_get_document(). * * Returns: TRUE if the parse was successful */ gboolean rss_parser_load_from_file (RssParser *self, gchar *filename, GError **error) { mrss_t *mrss; mrss_error_t res; g_signal_emit (self, parser_signals[PARSE_START], 0); /* parse the buffer */ res = mrss_parse_file (filename, &mrss); /* if there was an error parsing, set the error and return false */ if (MRSS_OK != res) { if (error) { g_set_error (error, RSS_PARSER_ERROR, RSS_PARSER_ERROR_INVALID_DATA, "Could not parse file contents"); } return FALSE; } /* keep a copy of our parsed document */ self->priv->document = rss_parser_parse (self, mrss); /* free our mrss data */ mrss_free (mrss); g_signal_emit (self, parser_signals[PARSE_END], 0); return TRUE; } /** * rss_parser_get_document: * @self: a #RssParser * * Retreives the document result from parsing rss data from either * a buffer or a file. The document's ref-count is increased, so * call g_object_unref when you are done. * * Returns: a #RssDocument */ RssDocument* rss_parser_get_document (RssParser *self) { g_return_val_if_fail (RSS_IS_PARSER (self), NULL); return g_object_ref (self->priv->document); } transmission-remote-gtk-1.4.1/extern/rss-glib/rss-parser.h000066400000000000000000000055161341276053300236360ustar00rootroot00000000000000/* rss-parser.h * * This file is part of RSS-GLib. * Copyright (C) 2008 Christian Hergert * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * Author: * Christian Hergert */ #ifndef __RSS_PARSER_H__ #define __RSS_PARSER_H__ #include #include "rss-document.h" G_BEGIN_DECLS #define RSS_TYPE_PARSER rss_parser_get_type() #define RSS_PARSER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ RSS_TYPE_PARSER, \ RssParser)) #define RSS_PARSER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), \ RSS_TYPE_PARSER, \ RssParserClass)) #define RSS_IS_PARSER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ RSS_TYPE_PARSER)) #define RSS_IS_PARSER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), \ RSS_TYPE_PARSER)) #define RSS_PARSER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), \ RSS_TYPE_PARSER, \ RssParserClass)) typedef struct _RssParser RssParser; typedef struct _RssParserPrivate RssParserPrivate; typedef struct _RssParserClass RssParserClass; struct _RssParser { /*< private >*/ GObject parent_instance; RssParserPrivate *priv; }; struct _RssParserClass { /*< private >*/ GObjectClass parent_class; /*< public >*/ void (* parse_start) (RssParser *parser); void (* parse_end) (RssParser *parser); /*< private >*/ /* padding for future expansion */ void (* _rss_reserved1) (void); void (* _rss_reserved2) (void); void (* _rss_reserved3) (void); void (* _rss_reserved4) (void); void (* _rss_reserved5) (void); void (* _rss_reserved6) (void); void (* _rss_reserved7) (void); void (* _rss_reserved8) (void); }; GType rss_parser_get_type (void); RssParser* rss_parser_new (void); gboolean rss_parser_load_from_data (RssParser * self, const gchar *data, gsize length, GError **error); gboolean rss_parser_load_from_file (RssParser *self, gchar *filename, GError **error); RssDocument* rss_parser_get_document (RssParser *self); G_END_DECLS #endif /* __RSS_PARSER_H__ */ transmission-remote-gtk-1.4.1/extern/rss-glib/rss-version.h000066400000000000000000000052601341276053300240230ustar00rootroot00000000000000/* rss-version.h - RSS-GLib versioning information * * This file is part of RSS-GLib. * Copyright (C) 2008 Christian Hergert * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * Author: * Christian Hergert */ #ifndef __RSS_VERSION_H__ #define __RSS_VERSION_H__ /** * SECTION:rss-version * @title: Versioning * @short_description: RSS-GLib version checking * * RSS-GLib provides macros to check the version of the library * at compile-time */ /** * RSS_MAJOR_VERSION: * * Rss major version component (e.g. 1 if %RSS_VERSION is 1.2.3) */ #define RSS_MAJOR_VERSION (0) /** * RSS_MINOR_VERSION: * * Rss minor version component (e.g. 2 if %RSS_VERSION is 1.2.3) */ #define RSS_MINOR_VERSION (2) /** * RSS_MICRO_VERSION: * * Rss micro version component (e.g. 3 if %RSS_VERSION is 1.2.3) */ #define RSS_MICRO_VERSION (3) /** * RSS_VERSION * * Rss version. */ #define RSS_VERSION (0.2.3) /** * RSS_VERSION_S: * * Rss version, encoded as a string, useful for printing and * concatenation. */ #define RSS_VERSION_S "0.2.3" /** * RSS_VERSION_HEX: * * Rss version, encoded as an hexadecimal number, useful for * integer comparisons. */ #define RSS_VERSION_HEX (RSS_MAJOR_VERSION << 24 | \ RSS_MINOR_VERSION << 16 | \ RSS_MICRO_VERSION << 8) /** * RSS_CHECK_VERSION: * @major: required major version * @minor: required minor version * @micro: required micro version * * Compile-time version checking. Evaluates to %TRUE if the version * of Rss is greater than the required one. */ #define RSS_CHECK_VERSION(major,minor,micro) \ (RSS_MAJOR_VERSION > (major) || \ (RSS_MAJOR_VERSION == (major) && RSS_MINOR_VERSION > (minor)) || \ (RSS_MAJOR_VERSION == (major) && RSS_MINOR_VERSION == (minor) && \ RSS_MICRO_VERSION >= (micro))) #endif /* __RSS_VERSION_H__ */ transmission-remote-gtk-1.4.1/extra/000077500000000000000000000000001341276053300174515ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/extra/eclipse-paths-gtk3.xml000066400000000000000000000017501341276053300236050ustar00rootroot00000000000000
/usr/include/glib-2.0 /usr/lib64/glib-2.0/include /usr/include/json-glib-1.0 /usr/include/atk-1.0 /usr/include/pango-1.0 /usr/include/cairo /usr/include/libnotify /usr/include/gtk-3.0 /usr/lib64/gtk-3.0/include
transmission-remote-gtk-1.4.1/extra/tpull.sh000066400000000000000000000020601341276053300211430ustar00rootroot00000000000000#!/bin/bash # This is a really simple script intended to be run as an action # from transmission-remote-gtk. It uses rsync to fetch # a torrent/torrents to a local directory (or put it somewhere # remote and run it using ssh to there). # It also shows how we can call transmission-remote with # connection details to find information about a torrent or # manipulate it. # Example # gnome-terminal -e "tpull.sh %{hostname} %{port} %{username}:%{password} %{id}[,] /srv/incoming/" if [ -z "$5" ]; then echo "usage: " exit 1 fi HOST=$1 TPORT=$2 TAUTH=$3 IDS=$4 DEST=$5 echo $IDS | sed "s/,/\n/g" | while read id; do DETAILS=$(transmission-remote $HOST:$TPORT -n $TAUTH -t $id -i) if [ $? -ne 0 ]; then read exit 1 fi LOCATION=$(echo "$DETAILS" | egrep '^\s+Location:' | cut -c 13-) NAME=$(echo "$DETAILS" | egrep '^\s+Name:' | cut -c 9-) if [ -z "$LOCATION" -o -z "$NAME" ]; then continue fi FULLPATH="$LOCATION/$NAME" echo "Syncing $FULLPATH ..." rsync -avPs "$HOST:$FULLPATH" "$DEST" done transmission-remote-gtk-1.4.1/m4/000077500000000000000000000000001341276053300166465ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/m4/desktop.m4000066400000000000000000000077471341276053300206000ustar00rootroot00000000000000# desktop.m4 # # serial 4 dnl DESKTOP_VALIDATE dnl Validates and installs desktop files. dnl dnl To use: dnl 1. Call DESKTOP_FILE in configure.ac to check for the desktop-file-utils tools. dnl 2. Add @DESKTOP_FILE_RULES@ to a Makefile.am to substitute the make rules. dnl 3. Add .desktop files to desktop_FILES in Makefile.am and they will be validated dnl at make check time and installed on make install. dnl 4. Add --enable-desktop-validate to DISTCHECK_CONFIGURE_FLAGS dnl in Makefile.am to require valid desktop file when doing a distcheck. dnl dnl On installation desktop-file-install will be used when available which also dnl rebuilds the mime info cache. After install update-desktop-database is called. dnl dnl Author: TingPing dnl Based upon appdata-xml.m4 AC_DEFUN([DESKTOP_FILE], [ m4_pattern_allow([AM_V_GEN]) AC_ARG_ENABLE([desktop-validate], [AS_HELP_STRING([--disable-desktop-validate], [Disable validating desktop files during check phase])]) AS_IF([test "x$enable_desktop_validate" != "xno"], [AC_PATH_PROG([DESKTOP_FILE_VALIDATE], [desktop-file-validate]) AS_IF([test "x$DESKTOP_FILE_VALIDATE" = "x"], [have_desktop_validate=no], [have_desktop_validate=yes AC_SUBST([DESKTOP_FILE_VALIDATE])])], [have_desktop_validate=no]) AC_ARG_ENABLE([desktop-database-update], [AS_HELP_STRING([--disable-desktop-database-update], [Disable generating the desktop database, useful for packaging])]) AS_IF([test "x$enable_desktop_database_update" != "xno"], [ AC_PATH_PROG([UPDATE_DESKTOP_DATABASE], [update-desktop-database]) AS_IF([test "x$UPDATE_DESKTOP_DATABASE" != "x"], [AC_SUBST([UPDATE_DESKTOP_DATABASE])]) ]) AC_PATH_PROG([DESKTOP_FILE_INSTALL], [desktop-file-install]) AS_IF([test "x$DESKTOP_FILE_INSTALL" != "x"], [AC_SUBST([DESKTOP_FILE_INSTALL])]) AS_IF([test "x$have_desktop_validate" != "xno"], [desktop_validate=yes], [desktop_validate=no AS_IF([test "x$enable_desktop_validate" = "xyes"], [AC_MSG_ERROR([Desktop validation was requested but desktop-file-validate was not found])])]) AC_SUBST([desktopfiledir], [${datadir}/applications]) DESKTOP_FILE_RULES=' .PHONY : uninstall-desktop-file install-desktop-file clean-desktop-file mostlyclean-am: clean-desktop-file %.desktop.valid: %.desktop $(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; \ if test -n "$(DESKTOP_FILE_VALIDATE)"; \ then $(DESKTOP_FILE_VALIDATE) $${d}$<; fi \ && touch [$]@ check-am: $(desktop_FILES:.desktop=.desktop.valid) uninstall-am: uninstall-desktop-file install-data-am: install-desktop-file .SECONDARY: $(desktop_FILES) install-desktop-file: $(desktop_FILES) @$(NORMAL_INSTALL) if test -n "$^"; then \ test -z "$(desktopfiledir)" || $(MKDIR_P) "$(DESTDIR)$(desktopfiledir)"; \ if test -n "$(DESKTOP_FILE_INSTALL)"; then \ $(DESKTOP_FILE_INSTALL) --dir="$(DESTDIR)$(desktopfiledir)" --mode=644 $^; \ else \ $(INSTALL_DATA) $^ "$(DESTDIR)$(desktopfiledir)"; \ fi; \ test -z "$(UPDATE_DESKTOP_DATABASE)" || $(UPDATE_DESKTOP_DATABASE) -q "$(DESTDIR)$(desktopfiledir)"; \ fi uninstall-desktop-file: @$(NORMAL_UNINSTALL) @list='\''$(desktop_FILES)'\''; test -n "$(desktopfiledir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \ test -n "$$files" || exit 0; \ echo " ( cd '\''$(DESTDIR)$(desktopfiledir)'\'' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(desktopfiledir)" && rm -f $$files; \ test -z "$(UPDATE_DESKTOP_DATABASE)" || $(UPDATE_DESKTOP_DATABASE) -q "$(DESTDIR)$(desktopfiledir)" clean-desktop-file: rm -f $(desktop_FILES:.desktop=.desktop.valid) ' _DESKTOP_FILE_SUBST(DESKTOP_FILE_RULES) ]) dnl _DESKTOP_FILE_SUBST(VARIABLE) dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST AC_DEFUN([_DESKTOP_FILE_SUBST], [ AC_SUBST([$1]) m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) ] ) transmission-remote-gtk-1.4.1/po/000077500000000000000000000000001341276053300167445ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/po/LINGUAS000066400000000000000000000001101341276053300177610ustar00rootroot00000000000000bg ca cs de el es fr hu it ko lt lv pl pt_BR ru si sv tr uk zh_TW zh_CN transmission-remote-gtk-1.4.1/po/Makevars000066400000000000000000000065611341276053300204500ustar00rootroot00000000000000# 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 transmission-remote-gtk-1.4.1/po/POTFILES.in000066400000000000000000000023571341276053300205300ustar00rootroot00000000000000data/io.github.TransmissionRemoteGtk.desktop.in data/io.github.TransmissionRemoteGtk.appdata.xml.in src/bencode.c src/hig.c src/json.c src/main.c src/remote-exec.c src/requests.c src/session-get.c src/torrent.c src/torrent-cell-renderer.c src/trg-about-window.c src/trg-cell-renderer-epoch.c src/trg-cell-renderer-eta.c src/trg-cell-renderer-numgteqthan.c src/trg-cell-renderer-priority.c src/trg-cell-renderer-ratio.c src/trg-cell-renderer-size.c src/trg-cell-renderer-speed.c src/trg-client.c src/trg-destination-combo.c src/trg-file-parser.c src/trg-files-model.c src/trg-files-tree-view.c src/trg-general-panel.c src/trg-gtk-app.c src/trg-json-widgets.c src/trg-main-window.c src/trg-menu-bar.c src/trg-model.c src/trg-peers-model.c src/trg-peers-tree-view.c src/trg-preferences-dialog.c src/trg-prefs.c src/trg-remote-prefs-dialog.c src/trg-rss-window.c src/trg-state-selector.c src/trg-stats-dialog.c src/trg-status-bar.c src/trg-toolbar.c src/trg-torrent-add-dialog.c src/trg-torrent-add-url-dialog.c src/trg-torrent-graph.c src/trg-torrent-model.c src/trg-torrent-move-dialog.c src/trg-torrent-props-dialog.c src/trg-torrent-tree-view.c src/trg-trackers-model.c src/trg-trackers-tree-view.c src/trg-tree-view.c src/trg-files-tree-view-common.c src/util.c transmission-remote-gtk-1.4.1/po/bg.po000066400000000000000000001113741341276053300177030ustar00rootroot00000000000000# Bulgarian translation for transmission-remote-gtk # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the transmission-remote-gtk package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2014-04-06 18:29+0000\n" "Last-Translator: Radoslav Petrov \n" "Language-Team: Bulgarian \n" "Language: bg\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 msgid "transmission-remote-gtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 msgid "Transmission Remote Gtk Team" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "Изтегляне на метаданните" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Изтегляне" #: src/torrent.c:378 msgid "Queued download" msgstr "Изтегляне, чакащо в опашката" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "Чакащ за проверка" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Проверяване" #: src/torrent.c:384 msgid "Queued seed" msgstr "" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Разпространяване" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Паузиран" #: src/torrent.c:408 msgid "Unknown" msgstr "Неизвестно" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s от %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Оставащото време е неизвестно" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "Оставащо време %s" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "Бездействие" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "Завършен" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "На опашката за проверка" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "На опашката за изтегляне" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "На опашката за разпространение" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "Проверяване на данни (%1$s проверени)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "Коефициент %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Посредници от тракера" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Грешка:" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "Изтегляне" msgstr[1] "Изтегляне" #: src/torrent-cell-renderer.c:337 #, fuzzy msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "Изтегляне на метаданните от %1$li посредник (%2$s получени)" msgstr[1] "Изтегляне на метаданните от %1$li посредници (%2$s получени)" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "Разпространяване" msgstr[1] "Разпространяване" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Отдалечен клиент за transmission-daemon" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Нисък" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Коефициент %s" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "" #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "" #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "" #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 msgid "Remove and delete data" msgstr "" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "" #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 msgid "Directories first" msgstr "" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "Разпространители" #: src/trg-preferences-dialog.c:656 msgid "URL" msgstr "" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "" #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Състояние:" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "" #: src/trg-remote-prefs-dialog.c:403 msgid "Alternate days" msgstr "" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "" #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 msgid "Blocklist (%" msgstr "" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "Заявката е неуспешна с HTTP код %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "" #: src/trg-state-selector.c:700 msgid "Active" msgstr "" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "" #: src/trg-status-bar.c:145 #, c-format msgid "Connected: %s :: Transmission %s" msgstr "" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "" #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr "" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "По подразбиране" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Местоположение:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "Дейност" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "Размер:" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "Налични:" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "Изтеглени:" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "Разпространено:" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "Състояние:" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "Продължителност:" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "Оставащо време:" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "Последна дейност:" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "Грешка:" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "Подробно" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "Хеш:" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "Поверителност:" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "Произход:" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "Коментар:" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "Само за този тракер — DHT и PEX са изключени" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "Публичен торент" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "Създаден от %1$s на %2$s" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "Създаден на %1$s" #: src/trg-torrent-props-dialog.c:342 #, fuzzy, c-format msgid "Created by %1$s" msgstr "Създаден на %1$s" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "Няма грешки" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "Сега е активен" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Спазване на общите ограничения" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "Позиция в опашката:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Ограничаване скоростта на сваляне (КиБ/с)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Ограничаване скоростта на разпространение (КиБ/с)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Използвай общите настройки" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Прекрати разпространяването при коефициент" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Разпространявай независимо от коефициента" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "Информация" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Завършен" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Разпространители" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Изпраща се" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Изтегляния" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "Получава се" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "Свързаност" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "PEX Посредници" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "DHT Посредници" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Посредници от тракера" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "LTEP посредници" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "Възстановени посредници" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Входящи посредници" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "Посредници T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Добавен" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "Първи тракер" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ИД" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Място в опашката" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Последна активност" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "Редица" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "Адрес на обявяване" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "Брой разпространители" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "Брой консуматори" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "Последно обявяване" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Последен резултат" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Премахни" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "Възходящо" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "Низходящо" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "грешка при извличане от JSON формат" #: src/util.c:347 msgid "Server responded, but with no result." msgstr "Сървърът отговори, но без данни." #: src/util.c:385 msgid "None" msgstr "Без" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d ден" msgstr[1] "%d дни" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d час" msgstr[1] "%d часа" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d минута" msgstr[1] "%d минути" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld секунда" msgstr[1] "%ld секунди" #~ msgid "Downloading from %1$li of %2$li connected peer" #~ msgid_plural "Downloading from %1$li of %2$li connected peers" #~ msgstr[0] "Изтегляне от %1$li от общо %2$li свързан посредник" #~ msgstr[1] "Изтегляне от %1$li от общо %2$li свързани посредници" #~ msgid "Seeding to %1$li of %2$li connected peer" #~ msgid_plural "Seeding to %1$li of %2$li connected peers" #~ msgstr[0] "Изпращане на метаданните от %1$li посредник ( %2$li изпратени)" #~ msgstr[1] "Изпращане на метаданните от %1$li посредници (%2$li изпратени)" transmission-remote-gtk-1.4.1/po/ca.po000066400000000000000000001033631341276053300176750ustar00rootroot00000000000000# Catalan translation for transmission-remote-gtk # Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 # This file is distributed under the same license as the transmission-remote-gtk package. # FIRST AUTHOR , 2012. # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2013-06-11 12:21+0000\n" "Last-Translator: pataquets \n" "Language-Team: Catalan \n" "Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 msgid "transmission-remote-gtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 msgid "Transmission Remote Gtk Team" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Descarregant" #: src/torrent.c:378 msgid "Queued download" msgstr "" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Comprovant" #: src/torrent.c:384 msgid "Queued seed" msgstr "" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "En pausa" #: src/torrent.c:408 msgid "Unknown" msgstr "Desconegut" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Temps restant desconegut" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "%s restant" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, c-format msgid "Tracker gave an error: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Error" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "Descarregant" msgstr[1] "Descarregant" #: src/torrent-cell-renderer.c:337 msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "" msgstr[1] "" #: src/torrent-cell-renderer.c:348 msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "" msgstr[1] "" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Baixa" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Alta" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Normal" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Mida" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Progrés" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Descarrega" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Prioritat" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "N/D" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Error" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Sense límit" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Ubicació" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Comentari" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "" #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "" #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "" #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "General" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Rastrejadors" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Fitxers" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Parells" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Sense límit" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Propietats" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Mou" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 msgid "Remove and delete data" msgstr "" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Accions" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "" #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Connecta" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Desconnecta" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Pausa-ho tot" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Surt" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Gràfica" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Visualitza" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 msgid "Directories first" msgstr "" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Detalls del torrent" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "E_stadístiques" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Opcions" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_Fitxer" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Desconnecta" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_Surt" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torrent" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Mou" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_Ajuda" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_Quant a" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Actualitzacions" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Interval d'actualització:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torrents" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "Etiqueta" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 msgid "RSS Feeds" msgstr "" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "URL:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Visualitza" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Notificacions" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "" #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Nom:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Nom d'usuari:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Sat" msgstr "" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "" #: src/trg-remote-prefs-dialog.c:403 msgid "Alternate days" msgstr "" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "" #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 msgid "Blocklist (%" msgstr "" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Comportament" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Amplada de banda" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Límits" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Tot" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "" #: src/trg-state-selector.c:700 msgid "Active" msgstr "" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Estadístiques" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Versió" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Estadística" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Sessió" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Cumulatiu" #: src/trg-status-bar.c:145 #, c-format msgid "Connected: %s :: Transmission %s" msgstr "" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "" #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Espai lliure: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr "" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Fitxers torrent" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Tots els fitxers" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Prioritat alta" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Prioritat normal" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Prioritat baixa" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "Fitxer _torrent:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "Carpeta de _destinació:" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "_Prioritat del torrent:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "Mostra el diàleg de les _opcions" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "URL:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Predeterminat" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Ubicació:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:342 #, c-format msgid "Created by %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Expansiona-ho tot" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Colapsa-ho tot" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "" #: src/util.c:347 msgid "Server responded, but with no result." msgstr "" #: src/util.c:385 msgid "None" msgstr "" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "" msgstr[1] "" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "" msgstr[1] "" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "" msgstr[1] "" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "" msgstr[1] "" transmission-remote-gtk-1.4.1/po/cs.po000066400000000000000000001137611341276053300177220ustar00rootroot00000000000000# Czech translation for transmission-remote-gtk # Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 # This file is distributed under the same license as the transmission-remote-gtk package. # FIRST AUTHOR , 2012. # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2012-11-04 13:28+0000\n" "Last-Translator: Jan Žárský \n" "Language-Team: Czech \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "Stahování metadat" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Stahuje se" #: src/torrent.c:378 msgid "Queued download" msgstr "" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "Čekání na kontrolu" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Kontrola" #: src/torrent.c:384 msgid "Queued seed" msgstr "" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Sdílení" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Pozastaveno" #: src/torrent.c:408 msgid "Unknown" msgstr "Neznámý" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s z %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Neznámý zbývající čas" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "zbývá %s" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "%1$s %2$s, %3$s %4$s" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "%1$s %2$s" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "Hotovo" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "Zařazeno do fronty k ověření" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "Zařazeno pro stažení" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "Zařazeno do fronty pro sdílení" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "Ověřování dat (%1$s otestováno)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "Poměr %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Peery trackeru" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Chyba" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "Stahuje se" msgstr[1] "Stahuje se" msgstr[2] "Stahuje se" #: src/torrent-cell-renderer.c:337 msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "" msgstr[1] "" msgstr[2] "" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "Sdílení" msgstr[1] "Sdílení" msgstr[2] "Sdílení" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Vzdálený klient k transmission-daemon." #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Nízká" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Vysoká" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Normální" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Smíšená" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Jméno" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Velikost" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Postup" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Stáhnout" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Priorita" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "Neznáme" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(Soukromé)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(Veřejné)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Chyba" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Dokončeno" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "ETA" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Staženo" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Protějšky" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Poměr" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Odesláno" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "Stahující" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Poměr %s" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Stav" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "Dokončeno v" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Umístění" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Komentář" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Klient" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Tento torrent je dokončený." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Tento torrent byl přidán." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Připojování..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Odstranit torrent \"%s\"?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "Odstranit %d torrentů?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "Odstranit a smazat torrent \"%s\"?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "Odstranit a smazat %d torrentů?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "Obecné" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Trackery" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Soubory" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Peery" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "Tato aplikace podporuje Transmission %g a novější, vy máte %g." #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Odpojeno" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "Požadavek %d/%d selhal: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Bez omezení" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Vlastnosti" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Pokračovat" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Pozastavit" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Ověřit" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Přesunout" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Odstranit" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "Odstranit a smazat" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Akce" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Začít teď" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "Limit stahování" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Limit odesílání" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Aktualizace..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Připojit" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Odpojit" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Přidat" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Přidat z URL" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Pokračovat ve všem" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Pozastavit vše" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Ukončit" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Graf" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Zobrazit" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "Seřadit" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "Filter adresářů" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Filter trackerů" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Adresáře" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Detaily torrentu" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_Statistiky" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Volby" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "_Místní nastavení" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_Soubor" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Odpojit" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Přidat" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "Přidat z _URL" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_Ukončit" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torrent" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "Pok_račovat" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Pozastavit" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "_Ověřit" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Přesunout" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "Pokračovat ve všem" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "_Pozastavit vše" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_Nápověda" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_O aplikaci" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Hostitel" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "Země" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Rychlost stahování" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Rychlost odesílání" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Příznaky" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Aktualizace" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Aktualizovat pouze aktivní torrenty" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Interval aktualizace:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "Interval aktualizace sezení:" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torrenty" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "Začátek pozastaven" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "Zobrazit dialog možností při přidání" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Smazat lokální soubor .torrent po přidání" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Příkazy" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "Popisek" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Příkaz" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "Seedy" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "URL:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Adresář" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Zobrazit" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Zobrazit graf" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "Systémová část panelu" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Zobrazit v systémové části panelu" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "Minimalizovat do systémové části panelu" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Oznámení" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Oznámení o přidání torrentu" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Oznámení o dokončení torrentu" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Profil: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Jméno:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "Připojení" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Hostitel:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Port:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Uživatelské jméno:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Heslo:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Připojit automaticky" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Místní předvolby" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "Adresáře" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Stav" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "Limity šířky pásma" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "Limit stahování (KiB/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Limit odesílání (KiB/s)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "Náhradní limity:" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "Náhradní rychlostní limity aktivní" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "Náhradní limity:" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "Náhradní limit stahování (KiB/s)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "Náhradní limit odesílání (KiB/s)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Fronty" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "Velikost fronty stahování" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "Velikost fronty seedování" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "Globální limit počtu peerů" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "Limit počtu peerů na torrent" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "Znovu otestovat" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" "Port je otevřený" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "Port je zavřený" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Test portu" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Testování..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Aktualizace" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Seznam blokovaných" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Připojení" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Port peeru" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Vyzkoušet" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Požadováno" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Preferováno" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "Tolerováno" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Šifrování" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "Náhodný port peeru na začátku" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "Přesměrování portu peeru" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Protokol" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "Objevování lokálních peerů" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Seznam blokovaných" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "URL seznamu blokovaných:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "Prostředí" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Adresář pro stahování" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Velikost cache (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Chování" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "Vyhodit do koše originální soubory torrentu" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Spustit přidané torrenty" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Šířka pásma" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Limity" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "Požadavek selhal s HTTP kódem %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Vše" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "Posunout dolů" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "Posunout nahoru" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Dokončený" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Nedokončený" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Aktivní" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Statistiky" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Verze" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Celkem staženo" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Celkem posláno" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Přidáno souborů" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "Počet sezení" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Statistika" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Sezení" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Souhrnně" #: src/trg-status-bar.c:145 #, c-format msgid "Connected: %s :: Transmission %s" msgstr "" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Aktualizace torrentů..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Volné místo: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "Zakázat náhradní rychlostní limity" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "Povolit náhradní rychlostní limity" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Limit: %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "Stahování: %s%s, Odesílání: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Soubory torrentu" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Všechny soubory" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" "Nelze analyzovat souboru torrentu. Předvolby souboru nejsou dostupné, ale " "pořád ho můžete zkusit odeslat." #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "Nelze otevřít soubor torrentu: %s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Žádný)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Přidat torrent" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Vysoká priorita" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Normální priorita" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Nízká priorita" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Přeskočit" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Přidat torrent" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "Spuštění pozastaveno" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "Soubor _torrent:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "_Cílová složka:" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "Použít na vše:" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "_Priorita torrentu:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "Zobrazit _okno s možnostmi" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "Pokoušíte se přidat magnet torrent, ale DHT je zakázáno. Distributed Hash " "Table (DHT) lze povolit v nastavení" #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "URL:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "Spuštění pozastaveno" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Přidat torrent z URL" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Výchozí" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Umístění:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Přesunout %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "Přesunout %d torrentů" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:342 #, c-format msgid "Created by %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Dodržovat globální limity" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Priorita torrentu:" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "Pozice ve frontě:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Limit rychlosti stahování (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Limit rychlosti odesílání (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Použít globální nastavení" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Přestat sdílet při poměru" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Sdílet bez ohledu na poměr" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Dokončeno" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Seedy" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Odesílání" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Stažené" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "Příjem" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "Připojeno" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "DHT peery" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Peery trackeru" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "LTEP peery" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Příchozí peery" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "Peery T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Přidáno" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "První tracker" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ID" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Pozice ve frontě" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Poslední aktivní" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Poslední výsledek" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Smazat" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Rozbalit vše" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Sbalit vše" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "" #: src/util.c:347 msgid "Server responded, but with no result." msgstr "Server odpověděl, ale bez výsledku." #: src/util.c:385 msgid "None" msgstr "Žádný" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d den" msgstr[1] "" msgstr[2] "%d dní" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d hodina" msgstr[1] "%d hodiny" msgstr[2] "%d hodin" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d minuta" msgstr[1] "%d minuty" msgstr[2] "%d minut" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld sekunda" msgstr[1] "%ld sekundy" msgstr[2] "%ld sekund" #~ msgid "Remove & Delete" #~ msgstr "Odstranit a smazat" #~ msgid "Blocklist (%ld entries)" #~ msgstr "Seznam blokovaných (%ld položek)" #~ msgid "Remove with data" #~ msgstr "Odstranit s daty" transmission-remote-gtk-1.4.1/po/de.po000066400000000000000000001127031341276053300177000ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2012-10-25 15:29+0000\n" "Last-Translator: Georg Engelmann \n" "Language-Team: none\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 msgid "transmission-remote-gtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 msgid "Transmission Remote Gtk Team" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "Metadaten herunterladen" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Runterladen" #: src/torrent.c:378 msgid "Queued download" msgstr "Warteschlange heruntergeladen" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "Warte auf Überprüfung" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Überprüfend" #: src/torrent.c:384 msgid "Queued seed" msgstr "" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Seeds" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Pausiert" #: src/torrent.c:408 msgid "Unknown" msgstr "Unbekannt" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s von %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Tracker Peers" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Fehlerhaft" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "Runterladen" msgstr[1] "Runterladen" #: src/torrent-cell-renderer.c:337 msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "" msgstr[1] "" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "Seeds" msgstr[1] "Seeds" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Ein Client für transmission-daemon" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Niedrig" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Hoch" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Normal" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Gemischt" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Name" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Größe" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Fertig" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Herunterladen" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Priorität" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "N/A" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(Privat)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(Öffentlich)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Fehlerhaft" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "DL Rate" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Vollendet" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "Restzeit" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "UL Rate" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Runtergeladen" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Seeder" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Ratio" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Hochgeladen" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "Leecher" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Ratio Limit" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Status" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Ort" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Programm" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Dieser Torrent ist fertig." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Dieser Torrent wurde hinzugefügt." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "Kein Host angegeben" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "Unbekannter Fehler beim Holen der Einstellungen" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Verbinde..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Torrent entfernen \"%s\"?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "Entferne %d torrents?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "Torrent entfernen und löschen \"%s\"?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "%d Torrents entfernen und löschen?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "Allgemein" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Tracker" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Dateien" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Peers" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Nicht verbunden" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "Anfrage %d/%d fehlgeschlagen: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Keine Beschränkungen" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Eigenschaften" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Weiter" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Pause" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Überprüfen" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "Neu announcen" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Verschieben" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Entfernen" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "Entfernen und löschen" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Aktionen" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Jetzt starten" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "Ende der Warteschlange" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "Anfang der Warteschlange" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "DL Limit" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "UL Limit" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Aktualisierung läuft …" #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Verbinden" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Trennen" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Hinzufügen" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Aus URL hinzufügen" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Alle fortsetzen" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Alle pausieren" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Beenden" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Grafik" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Ansicht" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "Statusauswahl" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Trackerfilter" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Ordner" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Torrent-Details" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_Statistik" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Einstellungen" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "_Clienteinstellungen" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "_Servereinstellungen" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_Datei" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Trennen" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Hinzufügen" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "Aus _URL Hinzufügen" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_Beenden" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torrent" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "_Fortsetzen" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Pause" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "_Überprüfen" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "Neu _announcen" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Verschieben" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "Alle _fortsetzen" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "Alle _pausieren" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_Hilfe" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_Über" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Host" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "Land" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Down Rate" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Up Rate" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Flags" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Aktualisierungen" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Nur aktive Torrents aktualisieren" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Aktualisierungsintervall" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torrents" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "Pausiert hinzufügen" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "Optionen beim Einfügen anzeigen" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Lokale .torrent Datei nach dem hinzufügen löschen" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Befehle" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Befehl" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "Seeds" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "URL:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Ordner" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Ansicht" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Zeigen graph" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "Benachrichtigungsfeld" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Im Benachrichtigungsfeld anzeigen" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "In das Benachrichtigungsfeld minimieren" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Benachrichtigungen" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Torrent hinzugefügt Benachrichtigungen" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Download beendet Benachrichtigung" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Profil: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Name:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "Verbindung" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Host:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Port:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Benutzername" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Passwort:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Automatisch verbinden" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "Zeitüberschreitung:" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "Wiederholungen:" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Clienteinstellungen" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "Ordner" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Status" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "Bandbreitenbeschränkung" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "Downloadlimit (KiB/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Uploadlimit (KiB/s)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "Alternative Beschränkungen" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "Alternative Geschwindigkeitsbeschränkungen sind aktiv" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "Alternative Beschränkungen" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "Ratio Limit" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Warteschlangen" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "Max. Anzahl Peers (global)" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "Max. Anzahl Peers (pro torrent)" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "Erneut testen" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "Port ist offen" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "Port is geschlossen" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Port testen" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Teste..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Erneuern" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Sperrliste" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Verbindungen" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Peer Port" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Test" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Benötigt" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Bevorzugt" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "Toleriert" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Verschlüsselung" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "Zufälligen Port beim Start wählen" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "Portweiterleitung" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Protokoll" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "Peerlisten Tausch (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "Verteilte Hash-Tabelle (DHT)" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "Lokale Peers finden" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Sperrliste" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "Blockierlisten URL:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "Umgebung" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Download Verzeichnis" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Verzeichnis für Unvollendete Downloads" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "Skript nach Beendigung eines Torrents" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Cache Größe (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Verhalten" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "Unvollständige Dateien umbenennen" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "Original .torrent Dateien löschen" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Torrents sofort starten" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "Servereinstellungen" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Bandbreite" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Grenzen" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "Anfrage gescheitert. HTTP code: %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Alle" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "Nach unten" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "Nach oben" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Vollständig" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Unvollständig" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Aktiv" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Statistiken" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Version" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Gesammter Download" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Gesammter Upload" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Dateien Hinzugefügt" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "Anzahl Sitzungen" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "Zeit aktiv" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Statistiken" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Sitzung" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Gesammt" #: src/trg-status-bar.c:145 #, c-format msgid "Connected: %s :: Transmission %s" msgstr "" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Aktualisiere Torrents..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Freier Speicherplatz: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "Deaktiviere alternative Geschwindigkeitsbeschränkungen" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "Aktiviere alternative Geschwindigkeitsbeschränkungen" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Limit %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "Runter: %s%s, Hoch: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Torrentdateien" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Alle Dateien" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "Konnte torrent-Datei nicht öffnen: %s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Keine)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(Mehrere)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Torrent hinzufügen" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Hohe Priorität" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Normale Priorität" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Niedrige Priorität" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Überspringen" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Torrent hinzufügen" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "_Pausiert hinzufügen" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "_Torrentdatei" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "_Zielordner:" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "_Priorität" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "Zeige _Optionen" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "URL:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "Pausiert hinzufügen" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Torrent aus URL hinzufügen" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "Gesammter Upload" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "Gesammter Download" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Standard" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Ort:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Verschiebe %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "Verschiebe %d Torrents" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:342 #, c-format msgid "Created by %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Globale Beschränkungen beachten" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Torrent Priorität" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "Warteschlangenposition:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Download begrenzen (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Upload begrenzen (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Globale Einstellungen bennutzen" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Hochladen beenden wenn Ratio" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Unabhängig von der Ratio weiterseeden" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "Ratiomodus" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "Ratiolimit" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "Peerlimit:" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "Eigenschaften mehrerer (%d) Torrents" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Fertig" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Seeds" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Wird gesendet" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Downloads" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "Wird empfangen" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "Verbunden" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "PEX Peers" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "DHT Peers" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Tracker Peers" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "LTEP Peers" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Eingehende Verbindungen" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "Peers T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Hinzugefügt" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ID" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Warteschlangen-Positition" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Letzte Aktivität" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "Rang" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "Announce URL" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Letzes Ergebnis" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "Scrape URL" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Löschen" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Alle aufklappen" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Alle zuklappen" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "JSON decoding error" #: src/util.c:347 msgid "Server responded, but with no result." msgstr "Antwort vom Server erhalten, kein Ergebnis" #: src/util.c:385 msgid "None" msgstr "Nichts" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d Tag" msgstr[1] "%d Tage" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d Stunde" msgstr[1] "%d Stunden" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d Minute" msgstr[1] "%d Minuten" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld Sekunde" msgstr[1] "%ld Sekunden" #~ msgid "Remove & Delete" #~ msgstr "Entfernen und löschen" #~ msgid "Blocklist (%ld entries)" #~ msgstr "Blockierliste (%ld Einträge)" #~ msgid "Remove with data" #~ msgstr "Mit Daten entfernen" transmission-remote-gtk-1.4.1/po/el.po000066400000000000000000001051561341276053300177140ustar00rootroot00000000000000# Greek translation for transmission-remote-gtk # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the transmission-remote-gtk package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2014-06-04 07:29+0000\n" "Last-Translator: James Spentzos \n" "Language-Team: Greek \n" "Language: el\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 msgid "transmission-remote-gtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 msgid "Transmission Remote Gtk Team" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "Λήψη Μετα-δεδομένων" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Λήψη" #: src/torrent.c:378 msgid "Queued download" msgstr "" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Έλεγχος" #: src/torrent.c:384 msgid "Queued seed" msgstr "" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Διαμοιρασμός" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Σε παύση" #: src/torrent.c:408 msgid "Unknown" msgstr "Άγνωστο" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s από %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" "%1$s από %2$s (%3$s), μεταφορτώθηκαν %4$s (Αναλογία: %5$s Στόχος: %6$s)" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "%1$s από %2$s (%3$s), μεταφορτώθηκαν %4$s (Αναλογία: %5$s)" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "%1$s, μεταφορτώθηκαν %2$s (Αναλογία: %3$s Στόχος: %4$s)" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "%1$s, μεταφορτώθηκαν %2$s (Αναλογία: %3$s)" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Άγνωστος εναπομένων χρόνος" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "απομένουν %s" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "%1$s %2$s, %3$s %4$s" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "%1$s %2$s" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "Αδρανές" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "Ολοκληρώθηκε" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "Στη σειρά για επαλήθευση" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "Στη σειρά για λήψη" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "Σε σειρά διαμοιρασμό" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "Επαλήθευση δεδομένων (%1$s δοκιμάστηκαν)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "Αναλογία %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, c-format msgid "Tracker gave an error: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:315 #, c-format msgid "Error: %s" msgstr "" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "Λήψη" msgstr[1] "Λήψη" #: src/torrent-cell-renderer.c:337 #, fuzzy msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "Λήψη μετα-δεδομένων από %1$li peer (%2$s ολοκληρώθηκε)" msgstr[1] "Λήψη μετα-δεδομένων από %1$li peers (%2$s ολοκληρώθηκε)" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "Διαμοιρασμός" msgstr[1] "Διαμοιρασμός" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Χαμηλή" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Αναλογία %s" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "" #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "" #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "" #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 msgid "Remove and delete data" msgstr "" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "" #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 msgid "Directories first" msgstr "" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 msgid "RSS Feeds" msgstr "" #: src/trg-preferences-dialog.c:656 msgid "URL" msgstr "" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "" #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Sat" msgstr "" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "" #: src/trg-remote-prefs-dialog.c:403 msgid "Alternate days" msgstr "" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "" #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 msgid "Blocklist (%" msgstr "" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "" #: src/trg-state-selector.c:700 msgid "Active" msgstr "" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "" #: src/trg-status-bar.c:145 #, c-format msgid "Connected: %s :: Transmission %s" msgstr "" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "" #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr "" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:342 #, c-format msgid "Created by %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "" #: src/util.c:347 msgid "Server responded, but with no result." msgstr "" #: src/util.c:385 msgid "None" msgstr "" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "" msgstr[1] "" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "" msgstr[1] "" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "" msgstr[1] "" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld δευτερόλεπτο" msgstr[1] "%ld δευτερόλεπτα" #~ msgid "Downloading from %1$li of %2$li connected peer" #~ msgid_plural "Downloading from %1$li of %2$li connected peers" #~ msgstr[0] "Λήψη από %1$li από %2$li συνδεδεμένο peer" #~ msgstr[1] "Λήψη από %1$li από %2$li συνδεδεμένους peers" #~ msgid "Seeding to %1$li of %2$li connected peer" #~ msgid_plural "Seeding to %1$li of %2$li connected peers" #~ msgstr[0] "Διαμοιρασμός σε %1$li από %2$li συνδεδεμένο peer" #~ msgstr[1] "Διαμοιρασμός σε %1$li από %2$li συνδεδεμένους peers" transmission-remote-gtk-1.4.1/po/es.po000066400000000000000000001205751341276053300177250ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2014-03-24 03:13+0000\n" "Last-Translator: Adolfo Jayme \n" "Language-Team: LANGUAGE \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "Transmission Remoto" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "Transmission Remoto" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "Transmission Remoto" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "Descargando metadatos" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Descargando" #: src/torrent.c:378 msgid "Queued download" msgstr "Descarga en espera" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "Esperando para verificar" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Comprobando" #: src/torrent.c:384 msgid "Queued seed" msgstr "Esperando para servir" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Sirviendo" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Pausado" #: src/torrent.c:408 msgid "Unknown" msgstr "Desconocido" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s de %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" "%1$s de %2$s (%3$s), subido %4$s (Índice de compartición: %5$s Meta: %6$s)" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "%1$s de %2$s (%3$s), subido %4$s (Índice de compartición: %5$s)" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "%1$s, subido %2$s (Índice de compartición: %3$s Meta: %4$s)" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "%1$s, subido %2$s (Tasa: %3$s)" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Tiempo restante desconocido" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "%s restantes" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "%1$s %2$s, %3$s %4$s" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "%1$s %2$s" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "Inactivo" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "Finalizado" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "En cola para verificación" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "En cola para descargar" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "En cola para compartir" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "Verificando datos (%1$s comprobado)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "Proporción %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Pares del rastreador" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Error:" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "Descargando %d @ %s" msgstr[1] "Descargando %d @ %s" #: src/torrent-cell-renderer.c:337 #, fuzzy msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "Descargando metadata de %1$li par (%2$s listo)" msgstr[1] "Descargando metadata de %1$li pares (%2$s listo)" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "Sirviendo %d @ %s" msgstr[1] "Sirviendo %d @ %s" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Una interfaz remota para transmission-daemon." #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Baja" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Alta" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Normal" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Mixto" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Nombre" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Tamaño" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Progreso" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Descarga" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Prioridad" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "N/D" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(Privado)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(Público)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Error" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "Calificar negativamente" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Completado" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "Tiempo remanente estimado" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "Calificar positivamente" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Descargado" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Servidores" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Relación" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Subido" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "Clientes" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Límite de proporción de servicio" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Estado" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "Completado el" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Ubicación" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Comentario" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Cliente" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Este torrent ha sido completado." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Este torrent ha sido añadido." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "No se ha configurado un servidor" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "Error desconocido mientras se obtenía la configuración" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Conectando…" #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "¿Quitar el torrent «%s»?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "¿Quitar %d torrents?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "¿Quitar y eliminar el torrent «%s»?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "¿Quitar y eliminar %d torrents?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "General" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Rastreadores" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Archivos" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Pares" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" "Esta aplicación es compatible con Transmission %g y superior, tiene %g." #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Desconectado" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "Descargando %d @ %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "Sirviendo %d @ %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "Petición %d/%d fallida: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Sin límites" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Propiedades" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Reanudar" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Pausar" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Comprobar" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "Anunciar nuevamente" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Mover" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Quitar" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "Quitar y eliminar" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Acciones" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Iniciar ahora" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "Subir en la cola" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "Bajar en la cola" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "Final de la cola" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "Principio de la cola" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "Límite de descarga" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Límite de subida" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Actualizando…" #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Conectar" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Desconectar" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Añadir" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Añadir desde URL" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Reanudar todo" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Pausar todo" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Salir" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Gráfico" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Ver" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "Estilo de Transmission" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "Transmission estilo Compacto" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "Estilo clásico" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "Ordenar" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "Selector de estado" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "Filtros de directorio" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Filtros de rastreadores" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Directorios" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Detalles del torrent" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_Estadísticas" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Opciones" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "Preferencias _locales" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "Preferencias _remotas" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_Archivo" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Desconectar" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Añadir" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "Añadir desde _URL" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_Salir" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torrent" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "_Reanudar" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Pausar" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "_Comprobar" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "_Anunciar nuevamente" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Mover" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "_Reanudar todo" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "_Pausar todo" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "Ay_uda" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_Acerca de" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Anfitrión" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "País" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Velocidad de descarga" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Velocidad de subida" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Banderas" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Actualizaciones" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Actualizar torrents activos solamente" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "Actualización completa cada (?) actualizaciones" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Intervalo de actualización:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "Intervalo de actualización estando minimizado:" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "Intervalo de actualización de sesión:" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torrents" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "Iniciar pausado" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "Diálogo de opciones al añadir" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Eliminar el archivo .torrent despues de añadir" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Órdenes" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "Etiqueta" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Orden" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "Servidores" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "URL:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "Directorios de descarga remota" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Directorio" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Ver" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Mostrar gráfico" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "Área de notificación" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Mostrar en el área de notificación" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "Minimizar en el área de notificación" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Notificaciones" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Notificación de adición de torrents" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Notificación de torrents completados" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Perfil: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Nombre:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "Conexión" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Anfitrión:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Puerto:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Nombre de usuario:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Contraseña:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Conectar autómaticamente" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "Tiempo de espera:" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "Reintentos:" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Preferencias locales" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "Directorios" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Estado" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "Límites de ancho de banda" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "Límite de descarga (KiB/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Límite de subida (KiB/s)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "Límites alternativos" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "Límites de velocidad alternativos activados" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "Rango de tiempo alternativo" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "Límites alternativos" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "Límite de descarga alternativo (KiB/s)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "Límite de subida alternativo (KiB/s)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "Límite de proporción de servicio" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Colas" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "Tamaño de la cola de descarga" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "Tamaño de la cola de servicio" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "Ignorar demorados (minutos)" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "Límite de pares global" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "Límite de pares por torrent" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "Volver a comprobar" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" "El puerto está abierto" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "" "El puerto está cerrado" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Prueba de puerto" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Probando…" #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Actualizar" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Lista de bloqueos" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Conexiones" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Puerto del par" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Probar" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Requerido" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Preferido" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "Tolerado" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Cifrado" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "Puerto de pares aleatorio al iniciar" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "Redireccionamiento de puerto de pares" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Protocolo" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "Intercambio de pares (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "Tabla de hash distribuido (DHT)" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "Descubrimiento de pares locales" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Lista de bloqueos" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "URL de la lista de bloqueo:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "Entorno" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Directorio de descargas" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Directorio para descargas incompletas" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "Script de finalización de torrent" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Tamaño de caché (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Comportamiento" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "Renombrar archivos parciales" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "Eliminar los archivos de torrent originales" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Iniciar torrents añadidos" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "Preferencias remotas" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Ancho de banda" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Límites" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "La petición falló con error de HTTP número %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Todos" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "Bajar en la cola" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "Subir en la cola" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Completo" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Incompleto" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Activo" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Estadísticas" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Versión" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Total de descarga" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Total de subida" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Archivos añadidos" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "Contador de sesión" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "Tiempo activo" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Estadística" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Sesión" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Acumulativo" #: src/trg-status-bar.c:145 #, fuzzy, c-format msgid "Connected: %s :: Transmission %s" msgstr "Conectado: %s (Transmission %g)" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Actualizando torrents…" #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Espacio libre: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "Desactivar límites de velocidad alternativos" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "Activar límites de velocidad alternativos" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Límite: %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "Descarga: %s%s, Subida: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Archivos torrent" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Todos los archivos" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" "No es posible leer el archivo torrent. Las preferencias del archivo no están " "disponibles, sin embargo puede intentar subirlo de todos modos." #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "No se pudo abrir el archivo de torrent: %s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Ninguno)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(Múltiple)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Añadir un torrent" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Prioridad alta" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Prioridad normal" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Baja prioridad" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Omitir" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Añadir torrent" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "Iniciar _pausados" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "Archivo _torrent:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "Carpeta de _destino:" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "Aplicar a todo:" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "_Prioridad del torrent:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "Mostrar el diálogo de _opciones" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "Está intentando añadir un torrent magnético, pero DHT está desactivado. La " "tabla de hash distribuido (DHT) debería activarse en configuraciones remotas." #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "URL:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "Iniciar pausado" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Añadir torrent desde URL" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "Total de subida" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "Total de descarga" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Predeterminado" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Ubicación:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Mover %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "Mover %d torrents" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "Actividad" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "Tamaño del torrent:" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "Tengo:" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "Descargado:" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "Subido:" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "Estado:" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "Tiempo ejecutándose:" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "Tiempo restante:" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "Última actividad:" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "Error:" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "Detalles" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "Hash" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "Privacidad:" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "Origen:" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "Comentario:" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "Privado para este rastreador, DHT y PEX desactivados" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "Torrent público" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "Creado por %1$s el %2$s" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "Creado el %1$s" #: src/trg-torrent-props-dialog.c:342 #, fuzzy, c-format msgid "Created by %1$s" msgstr "Creado el %1$s" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "Sin errores" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "Activar ahora" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Respetar límites globales" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Prioridad del torrent:" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "Posición en la cola:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Limitar velocidad de descarga (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Limitar velocidad de subida (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Usar la configuración global" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Dejar de servir al llegar a la proporción" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Servir sin importar la proporción" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "Modo de proporción de subida:" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "Límite de proporción de servicio:" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "Límite de pares:" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "Propiedades de torrents múltiples (%d)" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "Información" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Terminado" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Servidores" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Enviando" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Descargas" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "Recibiendo" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "Conectado" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "Pares PEX" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "Pares DHT" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Pares del rastreador" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "Pares de LTEP" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "Pares reanudados" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Pares entrantes" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "Pares T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Agregado" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "Tracker primario" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ID" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Posición en la cola" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Últimos activos" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "Estrato" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "URL de anuncio" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "Cantidad de servidores" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "Cantidad de leechers" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "Ultimo anuncio" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Ultimo resultado" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "URL de revisión" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "Último raspón" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Borrar" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "Ascendente" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "Descendente" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Expandir todo" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Contraer todo" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "Error de codificado JSON" #: src/util.c:347 msgid "Server responded, but with no result." msgstr "El servidor respondió, pero la respuesta está vacía." #: src/util.c:385 msgid "None" msgstr "Ninguno" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d día" msgstr[1] "%d días" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d hora" msgstr[1] "%d horas" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d minuto" msgstr[1] "%d minutos" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld segundo" msgstr[1] "%ld segundos" #~ msgid "Downloading from %1$li of %2$li connected peer" #~ msgid_plural "Downloading from %1$li of %2$li connected peers" #~ msgstr[0] "Descargando de %1$li de %2$li par conectado" #~ msgstr[1] "Descargando de %1$li de %2$li pares conectados" #~ msgid "Seeding to %1$li of %2$li connected peer" #~ msgid_plural "Seeding to %1$li of %2$li connected peers" #~ msgstr[0] "Compartiendo con %1$li de %2$li par conectado" #~ msgstr[1] "Compartiendo con %1$li de %2$li pares conectados" #~ msgid "Remove & Delete" #~ msgstr "Quitar y eliminar" #~ msgid "Blocklist (%ld entries)" #~ msgstr "Lista de bloqueo (%ld entradas)" #~ msgid "Remove with data" #~ msgstr "Quitar con datos" transmission-remote-gtk-1.4.1/po/fr.po000066400000000000000000001213101341276053300177110ustar00rootroot00000000000000# French translation for transmission-remote-gtk # Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 # This file is distributed under the same license as the transmission-remote-gtk package. # FIRST AUTHOR , 2012. # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2016-05-09 19:34+0200\n" "Last-Translator: Thibaut Selingue \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Poedit 1.8.7.1\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "Téléchargement des métadonnées" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Téléchargement en cours" #: src/torrent.c:378 msgid "Queued download" msgstr "Téléchargement en attente" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "En attente de vérification" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "En cours de vérification" #: src/torrent.c:384 msgid "Queued seed" msgstr "Envoi en attente" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Envoi" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "En pause" #: src/torrent.c:408 msgid "Unknown" msgstr "Inconnu" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s sur %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "%1$s sur %2$s (%3$s), envoyé %4$s (ratio : %5$s objectif : %6$s)" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "%1$s sur %2$s (%3$s), envoyé %4$s (ratio : %5$s)" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "%1$s, envoyé %2$s (ratio : %3$s objectif : %4$s)" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "%1$s, envoyé %2$s (Ratio : %3$s)" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Temps restant inconnu" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "%s restants" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "%1$s %2$s, %3$s %4$s" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "%1$s %2$s" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "Inactif" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "Terminé" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "En attente de vérification" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "En attente de téléchargement" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "En attente de partage" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "Vérification des données (%1$s testés)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "Ratio %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Pairs du traqueurs" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Erreur :" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "%d Téléchargement @ %s" msgstr[1] "%d Téléchargement @ %s" #: src/torrent-cell-renderer.c:337 #, fuzzy msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "Téléchargement des métadonnées depuis %1$li pair (%2$s terminé)" msgstr[1] "Téléchargement des métadonnées depuis %1$li pairs (%2$s terminé)" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "%d Envoi @ %s" msgstr[1] "%d Envoi @ %s" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Un client distant pour transmission-daemon" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Bas" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Haut" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Normal" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Mixte" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Nom" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Taille" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Progression" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Télécharger" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Priorité" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "N/D" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(Privé)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(Public)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Erreur" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "Vitesse de téléchargement" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Terminé" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "Durée restante estimée" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "Vitesse d'envoi" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Téléchargé" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Sources" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Ratio" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Envoyé" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "Téléchargeurs" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Limite de ratio d'envoi" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "État" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "Terminé à" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Emplacement" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Commentaire" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Client" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Ce torrent est terminé." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Ce torrent a été ajouté." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "Aucun nom d'hôte défini" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "Erreur inconnue lors de l'obtention des paramètres" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Connexion…" #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Retirer le torrent \"%s\" ?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "Retirer %d torrents ?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "Retirer et supprimer le torrent \"%s\" ?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "Retirer et supprimer %d torrents ?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "Général" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Traqueurs" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Fichiers" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Pairs" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "Cette application supporte Transmission %g et ultérieur, vous avez %g." #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Déconnecté" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d Téléchargement @ %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d Envoi @ %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "Échec de la requête %d/%d : %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Pas de limite" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Propriétés" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Reprendre" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Pause" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Vérifier" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "Annoncer de nouveau" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Déplacer" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Retirer" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "Retirer et supprimer" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Actions" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Démarrer" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "Monter dans la file d'attente" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "Descendre dans la file d'attente" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "Bas de la file d'attente" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "Haut de la file d'attente" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "Limite de réception" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Limite d'envoi" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Mise à jour..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Se connecter" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Se déconnecter" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Ajouter" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Ajouter à partir d'une URL" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Tout reprendre" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Tout mettre en pause" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Quitter" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Graphique" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Affichage" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "Style Transmission" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "Style Transmission Compact" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "Style Classique" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "Trier" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "Sélecteur d'état" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "Filtres de répertoire" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Filtres de traqueurs" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Répertoires" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Détails du torrent" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_Statistiques" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Options" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "Préférences _locales" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "Préférences _distantes" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_Fichier" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "Se _déconnecter" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Ajouter" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "Ajouter à partir d'une _URL" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_Quitter" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torrent" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "_Reprendre" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Pause" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "_Vérifier" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "_Annoncer de nouveau" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Déplacer" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "Tout _reprendre" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "_Tout mettre en pause" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_Aide" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_À propos" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "Adresse IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Hôte" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "Pays" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Vitesse de téléchargement" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Vitesse d'envoi" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Drapeaux" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Mises à jour" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Actualiser uniquement les torrents actifs" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "Actualisation complète toutes les (?) actualisations" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Intervalle de mise à jour :" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "Interval de mise à jour minimal" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "Interval de mise à jour de session:" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torrents" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "Commencer en pause" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "Options à l'ajout" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Supprimer le fichier .torrent local après l'ajout" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Commandes" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "Label" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Commande" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "Seeds" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "URL :" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "Répertoires de téléchargement distants" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Répertoire" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Affichage" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Montrer le graphique" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "Zone de notification" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Afficher dans la zone de notification" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "Réduire dans la zone de notification" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Notifications" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Notifications lors de l'ajout d'un torrent" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Notifications lors de la fin d'un téléchargement" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Profil : " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Nom :" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "Connexion" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Hôte :" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Port :" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "Chemin RPC URL :" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Nom d'utilisateur :" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Mot de passe :" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Se connecter automatiquement" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "Délai :" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "Réessayer :" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Préférences locales" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "Répertoires" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "État" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "Limites de bande passante" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "Limite de réception (Kio/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Limite d'envoi (Kio/s)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "Limites alternatives" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "Limites de vitesse alternatives" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "Période alternative" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "Limites alternatives" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "Limite de réception alternative (Kio/s)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "Limite d'envoi alternative (Kio/s)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "Limite de ratio d'envoi" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Files d'attente" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "Taille de la file d'attente de téléchargement" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "Taille de la file d'attente d'envoi" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "Ignorer les blocages (minutes)" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "Limite de pairs globale" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "Limite de pairs par torrent" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "Tester de nouveau" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" "Le port est ouvert" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "Le porte est fermé" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Test du port" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Test..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Mettre à jour" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Liste d'exclusion" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Connexions" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Port des pairs" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Tester" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Requis" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Préféré" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "Toléré" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Chiffrement" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "Port aléatoire au lancement" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "Redirection du port des pairs" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Protocole" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "Échange de pairs (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "Table de hachage distribuée (DHT)" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "Découverte de pairs locaux" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Liste d'exclusion" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "URL de la liste d'exclusion :" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "Environnement" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Dossier des téléchargements" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Dossier des téléchargements incomplets" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "Script de fin de téléchargement" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Taille du cache (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Comportement" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "Renommer les fichiers incomplets" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "Mettre le fichier torrent original à la corbeille" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Démarrer les torrents ajoutés" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "Préférences distantes" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Bande passante" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Limites" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "Echec de la requète avec le code HTTP %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Tout" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "Déplacer vers le bas" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "Déplacer vers le haut" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Terminé" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Inachevé" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Actif" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Statistiques" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Version" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Téléchargement total" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Total des envois" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Fichiers ajoutés" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "Nombre de sessions" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "Temps d'activité" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Statistiques" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Session" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Cumulatif" #: src/trg-status-bar.c:145 #, fuzzy, c-format msgid "Connected: %s :: Transmission %s" msgstr "Connecté : %s (Transmission %g)" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Actualisation des torrents..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Espace libre : %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "Désactiver les limites de vitesse alternatives" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "Activer les limites de vitesse alternatives" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Limite : %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "Téléchargement : %s%s, Envoi : %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Fichiers torrents" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Tous les fichiers" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" "Impossible de lire le fichier torrent. Préférences du fichier indisponibles " "mais vous pouvez quand même essayer de l'ajouter." #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "Impossible d'ouvrir le fichier torrent : %s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Aucun)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(Multiple)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Ajouter un torrent" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Priorité élevée" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Priorité normale" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Priorité faible" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Passer" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Ajouter le torrent" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "Démarrer en _pause" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "Fichier _torrent :" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "Dossier de _destination :" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "Appliquer à tout :" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "_Priorité du torrent :" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "Afficher les _options" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "Vous essayez d'ajouter un torrent magnet mais la DHT est désactivée. La " "table de hachage distribuée (DHT) devrait être activée dans les préférences " "distantes." #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "URL :" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "Démarrer en pause" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Ajouter un torrent depuis une URL" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "Envoi total" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "Téléchargement total" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Par défaut" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Emplacement :" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Déplacer %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "Déplacer %d torrents" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "Activité" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "Taille du torrent :" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "Obtenu :" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "Téléchargé :" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "Envoyé :" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "État :" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "Temps d'exécution :" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "Temps restant :" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "Dernière activité :" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "Erreur :" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "Détails" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "Hachage :" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "Confidentialité :" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "Origine :" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "Commentaire :" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "Restreint à ce traqueur -- DHT et PEX désactivés" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "Torrent public" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "Créé par %1$s le %2$s" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "Créé le %1$s" #: src/trg-torrent-props-dialog.c:342 #, fuzzy, c-format msgid "Created by %1$s" msgstr "Créé le %1$s" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "Aucune erreur" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "Actif actuellement" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Honorer les limites globales" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Priorité du torrent :" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "Position dans la file d'attente :" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Limiter la vitesse de téléchargement (Kio/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Limiter la vitesse d'envoi (Kio/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Utiliser les paramètres globaux" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Arrêter l'envoi au ratio" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Partager quel que soit le ratio" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "Mode ratio de l'envoi :" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "Limite de ratio de l'envoi :" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "Limite de pairs :" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "Propriétés de torrents multiples (%d)" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "Information(s)" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Terminé" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Seeds" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Envoi" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Téléchargements" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "Réception" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "Connecté" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "Pairs PEX" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "Pairs DHT" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Pairs du traqueurs" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "Pairs LTEP" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "Pairs relancés" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Pairs entrants" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "Pairs T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Ajouté" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "Premier traqueur" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "Identifiant" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Position dans la file d'attente" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Dernière activité" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "Niveau" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "URL de l'annonce" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "Nombre d'envois" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "Nombre de téléchargements" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "Dernière annonce" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Dernier résultat" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "URL du scrape" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "Dernier scrape" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Supprimer" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "Croissant" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "Décroissant" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Tout afficher" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Tout réduire" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "Erreur du décodage du JSON" #: src/util.c:347 msgid "Server responded, but with no result." msgstr "Le serveur a répondu mais sans résultat" #: src/util.c:385 msgid "None" msgstr "Aucun" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d jour" msgstr[1] "%d jours" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d heure" msgstr[1] "%d heures" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d minute" msgstr[1] "%d minutes" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld seconde" msgstr[1] "%ld secondes" #~ msgid "Downloading from %1$li of %2$li connected peer" #~ msgid_plural "Downloading from %1$li of %2$li connected peers" #~ msgstr[0] "Téléchargement depuis %1$li sur %2$li pair connecté" #~ msgstr[1] "Téléchargement depuis %1$li sur %2$li pairs connectés" #~ msgid "Seeding to %1$li of %2$li connected peer" #~ msgid_plural "Seeding to %1$li of %2$li connected peers" #~ msgstr[0] "Envoi à %1$li sur %2$li pair connecté" #~ msgstr[1] "Envoi à %1$li sur %2$li pairs connectés" #~ msgid "Remove & Delete" #~ msgstr "Retirer et supprimer" #~ msgid "Blocklist (%ld entries)" #~ msgstr "Liste d'exclusion (%ld entrées)" #~ msgid "Remove with data" #~ msgstr "Supprimer les fichiers et enlever" transmission-remote-gtk-1.4.1/po/hu.po000066400000000000000000001171611341276053300177270ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2012-10-08 09:59+0000\n" "Last-Translator: Dnes Svoli \n" "Language-Team: Random Team \n" "Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-2\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "Transmission Remote - Hungarian" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "Transmission Remote - Hungarian" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "Transmission Remote - Hungarian" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "Metaadat Letltse" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Letlts" #: src/torrent.c:378 msgid "Queued download" msgstr "Sorban ll letltsre" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "Vrakozs ellenrzsre" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Ellenrzs" #: src/torrent.c:384 msgid "Queued seed" msgstr "Sorban ll feltltsre" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Feltlts" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Sznet" #: src/torrent.c:408 msgid "Unknown" msgstr "Ismeretlen" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s a %2$s-bl (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "%1$s / %2$s (%3$s), feltltve %4$s (Arny: %5$s Cl: %6$s)" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "%1$s / %2$s (%3$s), feltltve %4$s (Arny: %5$s)" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "%1$s, feltltve %2$s (Arny: %3$s Cl: %4$s)" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "%1$s, feltltve %2$s (Arny: %3$s)" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Htralv id ismeretlen" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "%s maradt" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "%1$s %2$s, %3$s %4$s" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "%1$s %2$s" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "Ttlen" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "Elkszlt" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "Ellenrzshez sorba lltva" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "Sorba lltva letltshez" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "Sorba lltva feltltsre" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "Adat ellenrzse (%1$s ellenrizve)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "Arny: %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Tracker Peerek" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Hiba:" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "%d Letlts @ %s" msgstr[1] "%d Letlts @ %s" #: src/torrent-cell-renderer.c:337 #, fuzzy msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "Metaadat letltse %1$li peertl (%2$s ksz)" msgstr[1] "Metaadat letltse %1$li peertl (%2$s ksz)" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "%d Feltlts @ %s" msgstr[1] "%d Feltlts @ %s" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Tvoli kliens a transmission-daemon-hoz" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Alacsony" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Magas" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Norml" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Kevert" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Nv" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Mret" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "llapot" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Letlts" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Priorits" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "N/A" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(Privt)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(Publikus)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Hiba" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "Letltsi seb." #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Befejezett" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "Htravan" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "Feltltsi seb." #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Letlttt" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Feltltk" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Arny" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Feltlttt" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "Letltk" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Feltltsi arny korlt" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Sttusz" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "Ksz ekkor" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Hely" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Megjegyzs" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Kliens" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Ez a torrent befejezdtt." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Ez a torrent hozzaddott." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "Nincs host nv belltva" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "Ismeretlen hiba a belltsok lekrdezse kzben" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Kapcsolds..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Trld ezt a torrentet: \"%s\"?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "Eltvoltod %d torrenteket?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "Eltvoltod s trld a kvetkez torrentet: \"%s\"?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "Eltvoltod s trld %d torrenteket?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "ltalnos" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Trackerek" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Fjlok" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Peerek" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" "Ez az alkalmazs Transmisson %g vagy ksbbi verzit tmogat, a te verzid " "%g." #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Sztkapcsolva" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d Letlts @ %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d Feltlts @ %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "Krs %d/%d sikertelen: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Nincs limit" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Belltsok" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Folytat" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Sznetel" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Ellenriz" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "Re-announce" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Mozgat" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Eltvolt" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "Eltvolt s trl" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Mveletek" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Indts Most" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "Feljebb a sorban" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "Lejjebb a sorban" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "Sor aljra" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "Sor elejre" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "Letltsi limit" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Feltltsi limit" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Frissts..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Kapcsolds" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Sztkapcsol" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Hozzad" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Hozzad URL-bl" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Mindet folytat" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Mindet szneteltet" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Kilp" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Grafikon" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Nzet" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "Transmission Tma" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "Transmission Kompakt Tma" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "Klasszikus Tma" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "Rendezs" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "Sttusz kivlaszt" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "Mappa szrk" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Tracker szrk" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Knyvtrak" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Torrent adatok" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_Statisztikk" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Belltsok" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "_Helyi belltsok" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "_Tvoli belltsok" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_Fjl" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Sztkapcsol" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Hozzad" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "Hozzad _URL-bl" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_Kilps" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torrent" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "_Folytat" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Sznetel" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "_Ellenriz" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "Re-_announce" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Mozgat" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "_Folytat MINDET" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "_Sznetel MINDET" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_Segtsg" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_Nvjegy" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Hoszt" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "Orszg" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Letltsi sebessg" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Feltltsi sebessg" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Flagek" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Frisstsek" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Csak aktv torrentek frisstse" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "Teljes frissts minden (?)" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Frisstsi intervallum:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "Frisstsi intervallum minimalizlva:" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "Munkamenet frissts intervalluma:" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torrentek" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "Szneteltek indtsa" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "Belltsok dialgos hozzadsnl" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Helyi .torrent fjlok trlse hozzadsnl" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Parancsok" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "Cimke" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Parancs" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "Seedek" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "URL:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "Tvoli letltsek knyvtrai" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Knyvtr" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Nzet" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Grafikon mutatsa" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "Rendszer ikon" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Mutats rendszer ikonknt" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "Minimalizls ra mell" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Figyelmeztetsek" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Torrent hozzadva figyelmeztetsek" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Torrent ksz figyelmeztetsek" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Profil: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Nv:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "Kapcsolat" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Hoszt:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Port:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Felh nv:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Jelsz" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Automatikus csatlakozs" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "Idtllps:" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "jraprblkozsok:" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Helyi Belltsok" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "Knyvtrak" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Sttusz" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "Svszl. korltok" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "Le. Korlt (KiB/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Fel. Korlt (KiB/s)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "Vltoz korltok" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "Vltoz sebessg korltok aktvak" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "Vltoz id intervallum" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "Vltoz korltok" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "Vltoz le. korlt (KiB/s)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "Vltoz fel. korlt (KiB/s)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "Feltltsi arny korlt" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Sorok" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "Letltsi sor hossza" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "Feltltsi sor hossza" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "Elakadtak elutastsa (perc)" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "Globlis peer korlt" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "Torrentenknti peer korlt" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "jratesztel" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "A port nyitva" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "A port zrva" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Port teszt" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Tesztels..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Frissts" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Blokkolt lista" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Kapcsolatok" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Peer port" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Teszt" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Ktelez" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Engedve" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "Tiltva" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Titkosts" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "Vletlenszer peer port indtsnl" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "Peer port tirnyts" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Protokol" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "Peer exchange (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "Distributed Hash Table (DHT)" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "Helyi peerek keresse" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Blokkolt lista" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "Blokkolt lista URL" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "Vltoz" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Letltsi knyvtr" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Befejezetlen letltsek knyvtra" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "Torrent befejezve script" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Cache mret (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Magatarts" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "Rszleges fjlok tnevezse" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "Eredeti torrent fjlok a lomtrba" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Hozzadott torrentek indtsa" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "Tvoli belltsok" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Svszlessg" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Korltok" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "Krs hiba. HTTP Kd: %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Mind" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "Sor Le" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "Sor Fel" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Ksz" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Befejezetlen" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Aktv" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Statisztikk" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Verzi" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Letltsek sszesen" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Feltltsek sszesen" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Fjlok Hozzadva" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "Munkamenet Szma" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "Aktv Id" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Statisztika" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Munkamenet" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Halmozott" #: src/trg-status-bar.c:145 #, fuzzy, c-format msgid "Connected: %s :: Transmission %s" msgstr "Kapcsoldva: %s (Transmission %g)" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Torrentek frisstse..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Szabad hely: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "Vltakoz sebessg korltok kikapcsolsa" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "Vltakoz sebessg korltok bekapcsolsa" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Korlt: %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "Le: %s%s, Fel: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Torrent fjlok" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Minden fjl" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" "Nem sikerlt feldolgozni a torrent fjlt. Fjl belltsok nem rhet el, de " "prblhatod feltlteni." #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "Nem sikerlt megnyitni a torrent fjlt: %s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Egyik sem)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(Tbbszrs)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Torrent hozzadsa" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Magas priorits" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Norml priorits" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Alacsony priorits" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Kihagy" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Torrent hozzadsa" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "_Szneteltek indtsa" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "_Torrent fjl:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "_Cl knyvtr:" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "Alkalmaz mindre:" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "Torrent _priorits:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "_Belltsok ablak mutatsa" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "Mgnes torrentet prbltl hozzadni, de a DHT le van tiltva. A Distributed " "Hash Table (DHT) belltsnak engedlyezve kell lennie a Tvoli " "belltsoknl." #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "URL:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "Szneteltek indtsa" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Torrent hozzadsa URL-bl" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "sszes Feltlts" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "sszes Letlts" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Alaprtelmezett" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Hely:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Mozgat %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "Mozgat %d torrent" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "Tevkenysg" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "Torrent mrete:" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "Meglv:" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "Letltve:" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "Feltltve:" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "llapot:" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "Futsi id:" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "Htralv id:" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "Utols tevkenysg:" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "Hiba:" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "Rszletek" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "Hash:" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "Adatvdelem:" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "Eredet:" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "Megjegyzs:" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "Privt torrent - DHT s PEX kikapcsolva" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "Publikus torrent" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "Ksztette %1$s, ekkor: %2$s" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "Ltrehozva ekkor: %1$s" #: src/trg-torrent-props-dialog.c:342 #, fuzzy, c-format msgid "Created by %1$s" msgstr "Ltrehozva ekkor: %1$s" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "Nincs hiba" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "Most aktv" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Honor global limits" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Torrent priorits:" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "Sor pozci:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Letltsi seb. korltozsa (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Feltltsi seb. korltozsa (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Globlis belltsok hasznlata" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Feltlts lelltsa a megadott arny elrsekor" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Feltlts tekintet nlkl az arnyra" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "Feltltsi arny md:" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "Feltltsi arny korlt:" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "Peer korlt:" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "Tbbszrs (%d) torrent belltsok" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "Informci" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Ksz" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Seedek" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Klds" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Letltsek" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "Fogads" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "Kapcsoldva" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "PEX Peerek" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "DHT Peerek" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Tracker Peerek" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "LTEP Peerek" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "Folytatott Peerek" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Bejv Peerek" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "Peerek T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Hozzadva" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "Els Tracker" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ID" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Sor Pozci" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Utols aktv" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "Tier" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "Announce URL" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "Feltltk Szma" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "Letltk Szma" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "Utols Announce" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Utols Eredmny" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "Scrape URL" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "Utols Scrape" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Trl" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "Nvekv" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "Cskken" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Kinyit mindet" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Bezr mindet" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "JSON dekdolsi hiba." #: src/util.c:347 msgid "Server responded, but with no result." msgstr "Szerver vlaszolt, de nincs eredmny." #: src/util.c:385 msgid "None" msgstr "Egyik sem" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d nap" msgstr[1] "%d nap" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d ra" msgstr[1] "%d ra" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d perc" msgstr[1] "%d perc" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld m.perc" msgstr[1] "%ld m.perc" #~ msgid "Downloading from %1$li of %2$li connected peer" #~ msgid_plural "Downloading from %1$li of %2$li connected peers" #~ msgstr[0] "Letlts %1$li peertl. sszesen %2$li peer" #~ msgstr[1] "Letlts %1$li peertl. sszesen %2$li peer" #~ msgid "Seeding to %1$li of %2$li connected peer" #~ msgid_plural "Seeding to %1$li of %2$li connected peers" #~ msgstr[0] "Feltlts %1$li peertl. sszesen %2$li peer" #~ msgstr[1] "Feltlts %1$li peertl. sszesen %2$li peer" #~ msgid "Remove & Delete" #~ msgstr "Eltvolt s Trl" #~ msgid "Blocklist (%ld entries)" #~ msgstr "Blokkolt lista (%ld bejegyzs)" #~ msgid "Remove with data" #~ msgstr "Eltvolts adattal egytt" transmission-remote-gtk-1.4.1/po/it.po000066400000000000000000001207551341276053300177320ustar00rootroot00000000000000# Italian translation for transmission-remote-gtk # Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 # This file is distributed under the same license as the transmission-remote-gtk package. # FIRST AUTHOR , 2012. # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2016-04-07 22:10+0200\n" "Last-Translator: Milo Casagrande \n" "Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Poedit 1.8.7.1\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "Gestisci da remoto il Transmission BitTorrent client" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 #, fuzzy msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" "transmission-remote-gtk ti permette di gestire da remoto il Transmission " "BitTorrent client tramite le sua interfaccia RPC." #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 #, fuzzy msgid "Features:" msgstr "Features" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 #, fuzzy msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" "Aggiungi (file/url), start, stop, rimuovi, rimuovi e elimina i dati, " "verifica, riannuncia torrent da remoto" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 #, fuzzy msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "Gestore di .torrent (es: tramite il browser)" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 #, fuzzy msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" "Imposta proprietà del torrent come velocità, limite di seed, limite peer, " "priorità dei file, aggiungi/modifica/rimuovi trackers." #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 #, fuzzy msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" "Modifica impostazioni remote come limite di seed globale, directory di " "download e dettagli connessione." #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "Downloading dei metadati" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Downloading" #: src/torrent.c:378 msgid "Queued download" msgstr "In coda per download" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "In attesa di controllo" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Verifica in corso" #: src/torrent.c:384 msgid "Queued seed" msgstr "In coda per seed" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Seeding" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "In pausa" #: src/torrent.c:408 msgid "Unknown" msgstr "Sconosciuto" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s di %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "%1$s di %2$s (%3$s), uploaded %4$s (Ratio: %5$s - obiettivo: %6$s)" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "%1$s di %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "%1$s, uploaded %2$s (Ratio: %3$s - obiettivo: %4$s)" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "%1$s, uploaded %2$s (Ratio: %3$s)" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Tempo restante sconosciuto" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "%s rimanenti" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "%2$s %1$s, %4$s %3$s" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "%2$s %1$s" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "In attesa" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "Completato" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "Accodato per la verifica" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "Accodato per il download" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "Accodato per il seeding" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "Verifica dei dati (%1$s controllati)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "Ratio %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "Avviso dal tracker: \"%s\"" #: src/torrent-cell-renderer.c:314 #, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Errore dal tracker: \"%s\"" #: src/torrent-cell-renderer.c:315 #, c-format msgid "Error: %s" msgstr "Errore: %s" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "%d in download @ %s" msgstr[1] "%d in download @ %s" #: src/torrent-cell-renderer.c:337 #, fuzzy msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "Downloading metadati da %1$lu peer (%2$s scaricato)" msgstr[1] "Downloading metadati da %1$lu peer (%2$s scaricato)" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "%d in seeding @ %s" msgstr[1] "%d in seeding @ %s" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Un client remoto per transmission-daemon." #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Bassa" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Alta" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Normale" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Mista" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Nome" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Dimensione" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Avanzamento" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Download" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Priorità" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "N/D" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(privato)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(pubblico)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Errore" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "Download" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Completato" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "ETA" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "Upload" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Downloaded" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Seeders" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Ratio" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Uploaded" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "Leechers" #: src/trg-general-panel.c:342 msgid "Ratio limit" msgstr "Limite ratio" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "Corrotti" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Stato" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "Completato alle" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Percorso" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Commento" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Client" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "Avvia minimizzato" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Questo torrent è stato completato." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Questo torrent è stato aggiunto." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "Nome host non impostato" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "Errore sconosciuto ricevendo le impostazioni" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Connessione..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Rimuovere il torrent «%s»?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "Rimuovere %d torrent?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "Rimuovere ed eliminare i dati del torrent «%s»?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "Rimuovere ed eliminare i dati di %d torrent?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "Generali" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Trackers" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "File" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Nodi" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" "Questa applicazione supporta Transmission %g e successivi, la versione in " "uso è %g." #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Disconnesso" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d in download @ %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d in seeding @ %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "Richiesta %d/%d non riuscita: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Nessun limite" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Proprietà" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Riprendi" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Pausa" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Verifica" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "Ri-annuncia" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Sposta" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Rimuovi" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 msgid "Remove and delete data" msgstr "Rimuovi e cancella i dati" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Azioni" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Avvia ora" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "In alto nella coda" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "In basso nella coda" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "In fondo alla coda" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "In cima nella coda" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "Limite download" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Limite upload" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Aggiornamento..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Connetti" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Disconnetti" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Aggiungi" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Aggiungi da URL" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Riprendi tutti" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Metti tutti in pausa" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Esci" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Grafico" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Visualizza" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "Stile di Transmission" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "Stile Transmission compatto" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "Stile classico" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "Ordina" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "Selettore di stato" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "Filtri delle directory" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Filtri dei tracker" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 msgid "Directories first" msgstr "Prima le directory" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Dettagli del torrent" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_Statistiche" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "_RSS" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Opzioni" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "Preferenze _Locali" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "Preferenze _Remote" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_File" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Disconnetti" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Aggiungi" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "Aggiungi da _URL" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_Esci" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torrent" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "_Riprendi" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Pausa" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "_Verifica" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "Ri-_annuncia" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Sposta" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "_Riprendi tutti" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "Metti tutti in _pausa" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_Aiuto" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_Informazioni" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Host" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "Nazione" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "Città" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Download" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Upload" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Indicatori" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Aggiornamenti" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Aggiorna solo il torrent attivo" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "Aggiornamento completo ogni (?) aggiornamenti" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Intervallo di aggiornamento:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "Intervallo di aggiornamento quando minimizzato:" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "Intervallo di aggiornamento della sessione:" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torrent" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "Avvia in pausa" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "Finestra delle opzioni durante l'aggiunta" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Cancella il file .torrent locale dopo l'aggiunta" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Comandi" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "Etichetta" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Comando" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 msgid "RSS Feeds" msgstr "Feed RSS" #: src/trg-preferences-dialog.c:656 msgid "URL" msgstr "URL" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "Directories di download remote" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Directory" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Vista" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Mostra grafico" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "System Tray" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "Mostra in system tray (necessita permessi in unity)" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Mostra in system tray" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "Minimizza in system tray" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Notifiche" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Notifica per l'aggiunta di un torrent" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Notifica per il completamento di un torrent" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Profilo: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Nome:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "Connessione" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Host:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Porta:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "RPC URL:" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Nome utente:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Password:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Connessione automatica" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "Verifica certificato SSL" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "Timeout:" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "Tentativi:" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Preferenze locali" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "Directories" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Stato" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "Limiti di banda" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "Limite di download (KiB/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Limite di upload (KiB/s)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "Limiti alternativi" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "Limiti alternativi attivi" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "Intervallo di tempo limiti alternativi" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "Limiti alternativi" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "Limite di download alternativo (KiB/s)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "Limite di upload alternativo (KiB/s)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "Limite ratio seed" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Code" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "Dimensione della coda di download" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "Dimensione della coda di seed" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "Ignora quelli in stallo (minuti)" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "Limite di peer globale" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "Limite di peer per torrent" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "Ricontrolla" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" "La porta è aperta" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "La porta è chiusa" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Verifica stato porta" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Verifica in corso..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Aggiornamento" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Blocklist" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Connessioni" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Porta peer" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Test" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Richiesta" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Preferita" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "Tollerata" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Cifratura" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "Porta peer casuale all'avvio" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "Redirezione della porta peer" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Protocollo" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "Peer exchange (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "Tabella degli hash distribuita (DHT)" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "Scoperta dei peer locali" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Blocklist" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "URL della blocklist:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "Sistema" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Directory di download" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Directory dei file incompleti" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "Script per i torrent terminati" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Dimensione della cache (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Comportamento" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "Rinomina i file incompleti" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "Cestina i file torrent originali" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Avvia i torrents aggiunti" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "Preferenze remote" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Banda" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Limiti" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "Richiesta non riuscita con codice HTTP %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "Errore parsing feed RSS \"%s\": %s" #: src/trg-state-selector.c:675 msgid "All" msgstr "Tutti" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "Coda di download" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "Coda di seeding" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Completi" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Incompleti" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Attivi" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Statistiche" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Versione" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Totale download" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Totale upload" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Files aggiunti" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "Sessioni totali" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "Tempo di esecuzione" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Parametro" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Sessione" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Cumulativo" #: src/trg-status-bar.c:145 #, c-format msgid "Connected: %s :: Transmission %s" msgstr "Connesso a %s :: Transmission %s" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Aggiornamento dei torrent..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Spazio libero: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "Disabilita limiti alternativi" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "Abilita limiti alternativi" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Limite: %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "Down: %s%s, Up: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "File torrent" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Tutti i file" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" "Errore nel parsing del file torrent. Preferenze del file non disponibili, ma " "puoi provare a effettuare l'upload del file." #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "Errore nell'apertura del file torrent: %s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Nessuno)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(Multipli)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Aggiungi un torrent" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Priorità alta" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Priorità normale" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Priorità bassa" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Salta" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Aggiungi Torrent" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "Avvia in _pausa" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "File _torrent:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "_Directory di destinazione:" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "Applica a tutti:" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "_Priorità del torrent:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "Mostra la finestra delle _opzioni" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "Stai cercando di aggiungere un magnet torrent, ma il DHT è disabilitato. La " "Tabella degli Hash Distribuita (DHT) dovrebbe essere abilitata nelle " "impostazioni remote." #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "URL:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "Avvia in pausa" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Aggiungi torrent da URL" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "Totale in upload" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "Totale in download" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Predefinito" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Posizione:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Sposta %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "Sposta %d torrents" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "Attività" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "Dimensione torrent:" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "Posseduti:" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "Downloaded:" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "Uploaded:" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "Stato:" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "Tempo di esecuzione:" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "Tempo rimanente:" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "Ultima attività:" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "Errore:" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "Dettagli" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "Hash:" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "Privacy:" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "Origine:" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "Commento:" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "Privato per questo tracker -- DHT e PEX disabilitati" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "Torrent pubblico" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "Creato da %1$s in data %2$s" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "Creato in data %1$s" #: src/trg-torrent-props-dialog.c:342 #, fuzzy, c-format msgid "Created by %1$s" msgstr "Creato in data %1$s" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "Nessun errore" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "Ora attivo" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Rispetta i limiti globali" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Priorità del torrent:" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "Posizione in coda:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Limite download (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Limite upload (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Limite globale" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Limite personalizzato" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Nessun limite" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "Modalità di ratio:" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "Limite ratio:" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "Limite di peer:" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "Proprietà di torrent multipli (%d)" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "Informazione" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Completato" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Seeds" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Invio in corso" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Download" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "In ricezione" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "Connesso" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "Peer PEX" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "Peer DHT" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Peer Tracker" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "Peer LTEP" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "Peer recuperati" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Peer in ingresso" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "Peer T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Aggiunto" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "Primo Tracker" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ID" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Posizione in coda" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Ultima attivita" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "Ordine" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "URL di annuncio" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "Numero di seeder" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "Numero di leecher" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "Ultimo annuncio" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Ultimo risultato" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "Scrape URL" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "Ultimo scrape" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Elimina" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "Crescente" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "Decrescente" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Espandi tutto" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Contrai tutto" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "Errore di decodifica JSON." #: src/util.c:347 msgid "Server responded, but with no result." msgstr "Il server ha risposto, ma senza risultato" #: src/util.c:385 msgid "None" msgstr "Nessuno" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d giorno" msgstr[1] "%d giorni" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d ora" msgstr[1] "%d ore" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d minuto" msgstr[1] "%d minuti" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld secondo" msgstr[1] "%ld secondi" #~ msgid "Downloading from %1$lu of %2$lu connected peer" #~ msgid_plural "Downloading from %1$lu of %2$lu connected peers" #~ msgstr[0] "Downloading da %1$lu di %2$lu peer connesso" #~ msgstr[1] "Downloading da %1$lu di %2$lu peer connessi" #~ msgid "Seeding to %1$lu of %2$lu connected peer" #~ msgid_plural "Seeding to %1$lu of %2$lu connected peers" #~ msgstr[0] "Seeding a %1$lu di %2$lu peer connesso" #~ msgstr[1] "Seeding a %1$lu di %2$lu peer connessi" #~ msgid "Blocklist (%ld entries)" #~ msgstr "Blocklist (%ld voci)" transmission-remote-gtk-1.4.1/po/ko.po000066400000000000000000001102711341276053300177170ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2012-05-19 01:21+0000\n" "Last-Translator: digitie \n" "Language-Team: none\n" "Language: ko\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 msgid "transmission-remote-gtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 msgid "Transmission Remote Gtk Team" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "다운로드 중" #: src/torrent.c:378 msgid "Queued download" msgstr "" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "확인 중" #: src/torrent.c:384 msgid "Queued seed" msgstr "" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "배포" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "멈춤" #: src/torrent.c:408 msgid "Unknown" msgstr "" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, c-format msgid "Tracker gave an error: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "오류" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "다운로드 중" #: src/torrent-cell-renderer.c:337 msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "배포" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "트랜스미션 데몬의 원격 클라이언트." #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "낮음" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "높음" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "보통" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "이름" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "크기" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "진행량" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "다운로드" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "우선순위" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "알수없음" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "오류" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "다운로드 속도" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "완료됨" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "남은 시간" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "업로드 속도" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "다운로드 됨" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "시더" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "비율" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "업로드 함" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "리쳐" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "배포 비율 제한" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "상태" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "위치" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "클라이언트" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "" #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "" #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "호스트를 설정하지 않았습니다" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "설정을 얻어오는 중 알수없는 에러가 발생하였습니다" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "연결중..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "\"%s\" 토렌트를 제거하시겠습니까?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "%d 개의 토렌트를 제거하시겠습니까?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "\"%s\" 토렌트를 삭제하고 제거하시겠습니까?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "%d 개의 토렌트를 삭제하고 제거하시겠습니까?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "일반" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "트래커" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "파일" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "피어" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "%d/%d 요청 실패: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "제한없음" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "속성" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "다시시작" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "멈춤" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "검사" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "다시 알림" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "옮기기" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "제거" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "파일을 삭제하고 제거" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "다운로드 속도제한" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "업로드 속도제한" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "업데이트 중..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "연결" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "연결 끊기" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "파일 추가" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "주소 추가" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "그래프" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "보기(_V)" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "상태 선택" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 msgid "Directories first" msgstr "" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "통계(_S)" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "설정(_O)" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "로컬 설정(_L)" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "원격 설정(_R)" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "파일(_F)" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "연결 끊기(_D)" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "파일 추가(_A)" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "주소 추가(_U)" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "종료(_Q)" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "토렌트(_T)" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "다시 시작(_R)" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "일시중지(_P)" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "검사(_V)" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "다시 알림(_A)" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "위치설정(_M)" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "도움말(_H)" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "정보(_A)" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "호스트" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "국가" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "다운로드 속도" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "업로드 속도" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "플래그" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "업데이트 주기" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "시더" #: src/trg-preferences-dialog.c:656 msgid "URL" msgstr "" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "그래프 보이기" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "시스템 알림영역" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "시스템 알림영역에 표시" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "최소화했을 때 시스템 알림영역으로 보내기" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "토렌트가 추가되면 팝업 알림 표시" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "다운로드가 완료되면 팝업 알림 표시" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "" #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "연결" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "호스트:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "포트:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "사용자 이름:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "암호:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "시작시 자동으로 연결" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "로컬 설정" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "상태" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "" #: src/trg-remote-prefs-dialog.c:403 msgid "Alternate days" msgstr "" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "배포 비율 제한" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "전체 최대 피어" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "토렌트 당 최대 피어 수" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "다시 검사" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "포트가 열림" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "포트가 닫힘" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "포트 검사" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "검사 중..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "업데이트" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "차단목록 주소:" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "연결" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "피어 포트" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "테스트" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "암호화 요구" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "암호화 선호" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "암호화 허용" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "암호화 모드" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "시작할 때 임의의 포트를 선택" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "피어 포트 포워딩" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "피어 교환 (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "로컬 피어 검색 (LPD)" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "차단목록 주소:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "다운로드 위치" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "미 완료 토렌트 위치" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "토렌트가 완료되면 스크립트 불러오기" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "캐쉬 크기 (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "완료되지 않은 파일 이름 바꾸기" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "토렌트 파일을 휴지통에 버림" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "추가되면 시작하기" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "원격 설정" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "속도" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "제한" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "요청이 실패하였습니다. HTTP 코드 : %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "모두" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "완료 됨" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "미완료" #: src/trg-state-selector.c:700 msgid "Active" msgstr "" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "통계" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "전체 다운로드량" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "전체 업로드량" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "추가된 파일 갯수" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "세션 횟수" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "사용 시간" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "통계 자료 이름" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "세션" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "누적" #: src/trg-status-bar.c:145 #, c-format msgid "Connected: %s :: Transmission %s" msgstr "" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "" #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr "" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "높음" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "보통" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "낮음" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "생략" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "멈춤 상태로 시작" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "주소 추가" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "전체 업로드" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "전체 다운로드" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "위치:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "%s 옮기기" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "%d 개의 토렌트 옮기기" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:342 #, c-format msgid "Created by %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "전체 제한 존중" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "토렌트 우선 순위" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "다운로드 속도 제한 (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "업로드 속도 제한 (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "전체 설정 사용" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "비율이 다음에 도달할 때까지만 배포" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "비율과 상관없이 배포" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "배포 비율 설정" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "배포 제한 비율" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "최대 피어" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "%d 개의 토렌트 정보" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "완료" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "시더" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "티어" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "알림 주소" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "스크랩 주소" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "삭제" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "JSON 디코드 오류." #: src/util.c:347 msgid "Server responded, but with no result." msgstr "서버가 응답하였으나 결과가 없습니다." #: src/util.c:385 msgid "None" msgstr "없음" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d 일" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d 시간" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d 분" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld 초" #~ msgid "Remove & Delete" #~ msgstr "파일을 삭제하고 제거" #~ msgid "Blocklist (%ld entries)" #~ msgstr "차단 목록 사용 (%ld 개의 규칙 포함)" #~ msgid "Remove with data" #~ msgstr "데이터와 함께 제거" transmission-remote-gtk-1.4.1/po/lt.po000066400000000000000000001215101341276053300177230ustar00rootroot00000000000000# Lithuanian translation for transmission-remote-gtk # Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 # This file is distributed under the same license as the transmission-remote-gtk package. # FIRST AUTHOR , 2012. # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2012-09-20 08:38+0000\n" "Last-Translator: Algimantas Margevičius \n" "Language-Team: Lithuanian \n" "Language: lt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" "%100<10 || n%100>=20) ? 1 : 2;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "Parsiunčiami metaduomenys" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Atsiunčiama" #: src/torrent.c:378 msgid "Queued download" msgstr "Atsiuntimai eilėje" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "Laukia patikros" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Tikrinama" #: src/torrent.c:384 msgid "Queued seed" msgstr "Eilėje skleidimui" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Skleidžiama" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Pristabdyta" #: src/torrent.c:408 msgid "Unknown" msgstr "Nežinoma" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s iš %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "%1$s iš %2$s (%3$s), išsiųsta %4$s (Santykis: %5$s Tikslas: %6$s)" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "%1$s iš %2$s (%3$s), išsiųsta %4$s (Santykis: %5$s)" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "%1$s, išsiųsta %2$s (santykis: %3$s, tikslas: %4$s)" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "%1$s, išsiųsta %2$s (santykis: %3$s)" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Likęs laikas nežinomas" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "liko %s" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "%1$s %2$s, %3$s %4$s" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "%1$s %2$s" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "Be darbo" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "Baigtas" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "Eilėje patikrinimui" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "Eilėje atsiuntimui" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "Eilėje skleidimui" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "Tikrinami duomenys (patikrinta %1$s)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "Santykis %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Serverio siuntėjai" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Klaida:" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "%d Parsiunčiama %s" msgstr[1] "%d Parsiunčiama %s" msgstr[2] "%d Parsiunčiama %s" #: src/torrent-cell-renderer.c:337 #, fuzzy msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "Metaduomenys atsiunčiami iš %1$li skleidėjo (%2$s baigta)" msgstr[1] "Metaduomenys atsiunčiami iš %1$li skleidėjų (%2$s baigta)" msgstr[2] "Metaduomenys atsiunčiami iš %1$li skleidėjų (%2$s baigta)" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "%d Skleidžiama %s" msgstr[1] "%d Skleidžiama %s" msgstr[2] "%d Skleidžiama %s" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Nuotolinis transmission demono klientas" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Žemas" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Aukštas" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Normalus" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Mišrus" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Pavadinimas" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Dydis" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Eiga" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Atsisiųsti" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Prioritetas" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "Nėra" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(Privatus)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(Viešas)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Klaida" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "Sumažinti įvertinimą" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Užbaigtas" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "Likęs laikas" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "Padidinti įvertinimą" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Atsisiųsta" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Skleidėjai" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Santykis" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Išsiųsta" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "Siuntėjai" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Skleidimo santykio riba" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Būsena" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "Baigta" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Vieta" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Komentaras" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Klientas" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Šis torentas parsiųstas." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Šis torentas pridėtas." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "Nenurodytas mazgo vardas" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "Gaunant nustatymus įvyko nežinoma klaida" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Jungiamasi..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Pašalinti torentą „%s“?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "Pašalinti %d torentus?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "Pašalinti ir ištrinti torentą „%s“?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "Pašalinti ir ištrinti %d torentus?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "Bendri" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Sekimo serveriai" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Failai" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Siuntėjai ir skleidėjai" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "Ši programa palaiko Transmission %g ir vėlesnes, jūs turite %g." #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Atsijungta" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d Parsiunčiama %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d Skleidžiama %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "Užklausa %d/%d nepavyko: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Be apribojimų" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Savybės" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Tęsti" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Pristabdyti" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Patikrinti" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "Paskelbti iš naujo" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Perkelti" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Pašalinti" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "Pašalinti ir ištrinti" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Veiksmai" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Pradėti dabar" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "Eilėje perkelti aukštyn" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "Eilėje perkelti žemyn" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "Eilės apačia" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "Eilės viršus" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "Parsiuntimo riba" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Išsiuntimo riba" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Atnaujinama..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Prisijungti" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Atsijungti" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Pridėti" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Pridėti iš URL" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Pratęsti visus" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Sustabdyti visus" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Išeiti" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Diagrama" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Rodymas" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "„Transmission“ stilius" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "Kompaktiškas „Transmission“ stilius" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "Klasikinis stilius" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "Rikiavimas" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "Būsenos pasirinkimas" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "Aplankų filtrai" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Serverių filtrai" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Aplankai" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Išsamesnė torento informacija" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_Statistika" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Parinktys" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "_Vietiniai nustatymai" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "_Nuotoliniai nustatymai" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_Failas" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Atsijungti" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Pridėti" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "Pridėti iš _URL" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "Iš_eiti" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torentas" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "_Tęsti" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Pristabdyti" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "_Patikrinti" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "_Paskelbti iš naujo" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "P_erkelti" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "_Pratęsti visus" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "_Pristabdyti visus" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_Žinynas" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_Apie" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Serveris" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "Šalis" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Parsiuntimo greitis" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Išsiuntimo greitis" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Vėliavos" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Atnaujinimai" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Atnaujinti tik aktyvius torentus" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "Pilnas atnaujinias kas (?) atnaujinimus" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Atnaujinimo intervalas:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "Sumažinto atnaujinimo intervalas:" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "Sesijo atnaujinimo intervalas:" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torentai" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "Pradėti sustabdytoje būsenoj" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "Parinkčių dialogas pridedant" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Pridėjus ištrinti vietinį .torrent failą" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Komandos" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "Etiketė" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Komanda" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "Skleidėjai" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "URL:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "Nuotolinio parsiuntimo aplankai" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Aplankas" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Rodymas" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Rodyti diagramą" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "Sistemos dėklas" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Rodyti sistemos dėkle" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "Sumažinti į sistemos dėklą" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Pranešimai" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Pranešimai apie pridėtą torentą" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Pranešimai apie baigtą torentą" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Profilis: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Pavadinimas:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "Prisijungimas" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Serveris:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Prievadas:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Naudotojo vardas:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Slaptažodis:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Prisijungti automatiškai" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "Laukimo laikas:" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "Kartojimų skaičius:" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Vietiniai nustatymai" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "Aplankai" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Būsena" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "Duomenų srauto ribos" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "Pars. riba (KiB/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Išs. riba (KiB/s)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "Alternatyvios ribos" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "A;ternatyvios greičio ribos įjungtos" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "Alternatyvus laiko tarpas" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "Alternatyvios ribos" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "Alternatyvi parsiuntimo riba (KiB/s)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "Alternatyvi išsiuntimo riba (KiB/s)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "Skleidimo santykio riba" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Eilės" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "Parsiuntimo eilės dydis" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "Skleidimo eilės dydis" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "Nepaisyti įstrigusių (minutėmis)" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "Visuotinė siuntėjų riba" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "Siuntėjų-skleidėjų riba torentui" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "Bandyti dar kartą" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" "Prievadas yra atidarytas" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "" "Prievadas yra uždarytas" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Prievado testas" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Tikrinama..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Atnaujinti" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Blokuotų sąrašas" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Prisijungimai" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Siuntėjo-skleidėjo prievadas" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Testas" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Privalomas" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Pageidautinas" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "Gali būti" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Šifravimas" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "Paleidžiant atsitiktinis prievadas" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "Siuntėjų prievado persiuntimas" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Protokolas" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "Siuntėjų apsikeitimas (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "Distributed Hash Table (DHT)" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "Vietinių siuntėjų ieškojimas" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Blokuotų sąrašas" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "Blokuotų sąrašo URL:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "Aplinka" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Atsisiuntimų aplankas" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Nebaigtų parsiuntimo aplankas" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "Torento atlikimo scenarijus" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Podėlio dydis (MB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Elgsena" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "Pervadinti nepilnus failus" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "Išmesti originalius torent failus" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Pradėti prdėtus torentus" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "Nuotoliniai nustatymai" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Duomenų srautas" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Ribos" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "Užklausa nepavyko su HTTP kodu %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Visi" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "Eilėje žemyn" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "Eilėje aukštyn" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Baigta" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Nebaigtas" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Aktyvus" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Statistika" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Versija" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Iš viso parsiųsta" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Iš viso išsiųsta" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Pridėta failų" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "Seansų skaičius" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "Aktyvus laikas" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Statistika" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Seansas" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Didėjantis" #: src/trg-status-bar.c:145 #, fuzzy, c-format msgid "Connected: %s :: Transmission %s" msgstr "Prisijungta: %s (Transmission %g)" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Atnaujinami torentai..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Laisva vieta: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "Išjungti alternatyvias greičio ribas" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "Įjungti alternatyvias greičio ribas" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Riba: %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "Pars: %s%s, Išs: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Torentų failai" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Visi failai" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" "Nepavyko apdoroti torent failo. Failo nustatymai neprieinami, bet vistiek " "galite bandyti išsisųti." #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "Nepavyko atverti torent failo: %s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Joks)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(Keli)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Pridėti torentą" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Aukštas prioritetas" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Normalus prioritetas" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Žemas prioritetas" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Praleisti" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Pridėti torentą" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "Paleisti _sustabdytą" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "Torento _failas:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "_Paskirties aplankas:" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "Pritaikyti visiems:" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "Torento p_rioritetas:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "Rodyti _parinkčių langą" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "Jūs bandote pridėti magnet torent, bet DHT yra išjungta. Nuotoliniuose " "nustatymuose Distributed Hash Table (DHT) turėtų būti įjungta." #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "URL:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "Paleisti sustabdytą" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Pridėti torentą iš URL" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "Viso išsiunčiama" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "Viso parsiunčiama" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Numatytas" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Vieta:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Perkelti %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "Perkelti %d torentus" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "Veikla" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "Torento dydis:" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "Turima:" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "Atsiųsta:" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "Išsiųsta:" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "Būsena:" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "Veikimo laikas:" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "Likęs laikas:" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "Paskutinis aktyvumas:" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "Klaida:" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "Detalės" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "Maiša:" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "Privatumas:" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "Kilmė:" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "Komentaras:" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "Privatus šiam serveriui – DHT ir PEX išjungta" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "Viešas torentas" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "Sukūrė %1$s %2$s" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "Sukurta %1$s" #: src/trg-torrent-props-dialog.c:342 #, fuzzy, c-format msgid "Created by %1$s" msgstr "Sukurta %1$s" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "Klaidų nėra" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "Dabar aktyvus" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Garbingos visuotinės ribos" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Torento prioritetas" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "Vieta eilėje:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Riboti parsiuntimų greitį (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Riboti išsiuntimų greitį (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Naudoti visuotinius parametrus" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Baigti skleisti pasiekus santykį" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Skleisti nepaisant santykio" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "Skleidimo santykio režimas:" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "Skleidimo santykio riba:" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "Siuntėjų-skleidėjų riba:" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "Kelių (%d) torentų savybės" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "Informacija" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Atlikta" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Skleidėjai" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Siunčiama" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Atsiuntimai" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "Gaunama" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "Prisijungta" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "PEX siuntėjai" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "DHT siuntėjai" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Serverio siuntėjai" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "LTEP siuntėjai" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "Pratęsti siuntėjai" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Atsiunčiantys siuntėjai" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "Siuntėjai T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Pridėta" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "Pirmas serveris" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ID" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Eilės vieta" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Paskutinis aktyvus" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "Sujungėjas" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "Skleidimo URL" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "Skleidėjų skaičius" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "Parsiuntėjų skaičius" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "Paskutinis pranešimas" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Paskutinis rezultatas" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "Surinkti informaciją iš URL" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "Paskutinis informacijos rinkimas" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Pašalinti" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "Didėjančiai" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "Mažėjančiai" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Išskleisti visus" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Suskleisti visus" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "JSON iškodavimo klaida." #: src/util.c:347 msgid "Server responded, but with no result." msgstr "Serveris atsakė, bet be rezultato." #: src/util.c:385 msgid "None" msgstr "Nėra" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d diena" msgstr[1] "%d dienos" msgstr[2] "%d dienų" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d valanda" msgstr[1] "%d valandos" msgstr[2] "%d valandų" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d minutė" msgstr[1] "%d minutės" msgstr[2] "%d minučių" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld sekundė" msgstr[1] "%ld sekundės" msgstr[2] "%ld sekundžių" #~ msgid "Downloading from %1$li of %2$li connected peer" #~ msgid_plural "Downloading from %1$li of %2$li connected peers" #~ msgstr[0] "Atsiunčiama iš %1$li iš %2$li prisijungusio skleidėjo" #~ msgstr[1] "Atsiunčiama iš %1$li iš %2$li prisijungusių skleidėjų" #~ msgstr[2] "Atsiunčiama iš %1$li iš %2$li prisijungusių skleidėjų" #~ msgid "Seeding to %1$li of %2$li connected peer" #~ msgid_plural "Seeding to %1$li of %2$li connected peers" #~ msgstr[0] "Skleidžiama %1$li iš %2$li prisijungusio skleidėjo" #~ msgstr[1] "Skleidžiama %1$li iš %2$li prisijungusių skleidėjų" #~ msgstr[2] "Skleidžiama %1$li iš %2$li prisijungusių skleidėjų" #~ msgid "Remove & Delete" #~ msgstr "Pašalinti ir ištrinti" #~ msgid "Blocklist (%ld entries)" #~ msgstr "Blokavimų sąrašas (%ld įrašai)" #~ msgid "Remove with data" #~ msgstr "Pašalinti su duomenimis" transmission-remote-gtk-1.4.1/po/lv.po000066400000000000000000001111451341276053300177300ustar00rootroot00000000000000# Latvian translation for transmission-remote-gtk # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the transmission-remote-gtk package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2013-06-03 09:33+0000\n" "Last-Translator: sieks \n" "Language-Team: Latvian \n" "Language: lv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "Transmission Skats" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "Transmission Skats" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Lejupielādē" #: src/torrent.c:378 msgid "Queued download" msgstr "" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Pārbauda" #: src/torrent.c:384 msgid "Queued seed" msgstr "" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Dod" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Apturēts" #: src/torrent.c:408 msgid "Unknown" msgstr "Nezināms" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s no %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Atlikušais laiks nav zināms" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "%s atlicis" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "%1$s %2$s, %3$s %4$s" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "%1$s %2$s" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "Nenodarbināts" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "Pabeigts" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "Pārbauda datus (%1$s pārbaudīti)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "Attiecība %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, c-format msgid "Tracker gave an error: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Kļūda:" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "%d Lejupielādē @ %s" msgstr[1] "%d Lejupielādē @ %s" msgstr[2] "%d Lejupielādē @ %s" #: src/torrent-cell-renderer.c:337 msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "" msgstr[1] "" msgstr[2] "" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "%d Augšupielādē @ %s" msgstr[1] "%d Augšupielādē @ %s" msgstr[2] "%d Augšupielādē @ %s" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Zema" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Augsta" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Normāla" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Jaukts" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Nosaukums" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Izmērs" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Progress" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Lejupielāde" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Prioritāte" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "Nav pieejams" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "Privāts" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "Publisks" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Kļūda" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Pabeigts" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "Atlikušais laiks" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Lejupielādēts" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Devēji" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Attiecība" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Augšupielādēts" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "Ņēmēji" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Attiecība %s" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Statuss" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "Pabeigts" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Atrašanās vieta" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Komentārs" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Klients" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Šis torrents ir pabeigts" #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Šis torrents tika pievienots" #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Savienojas" #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Noņemt torrentu \"%s\"?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "Noņemt %d torrentus?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "Noņemt un dzēst torentu \"%s\"?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "Noņemt un dzēst %d torrentus?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "Galvenā" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Trakeri" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Faili" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Dalībnieki" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "Šī aplikācija atbalsta Transmission %g un jaunāku, Jūs izmantojat %g." #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Atvienots" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d Lejupielādē @ %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d Augšupielādē @ %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Nav ierobežojuma" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Īpašības" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Atsākt" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Pauze" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Pārbaudīt" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Pārvietot" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Noņemt" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "Noņemt un Dzēst" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Darbības" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Sākt tūlīt" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "Rindas apakšpusē" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "Rindas augšpusē" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "Zemākais ierobežojums" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Augšējais ierobežojums" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Augšupielādē..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Savienoties" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Atslēgties" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Pievienot" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Turpināt Visus" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Pauzēt visus" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Iziet" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Grafiks" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Skats" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "Transmission Skats" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "Transmission Kompaktais skats" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "Klasiskais skats" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "Kārtot" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Mape" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Torrenta papildus informācija" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_Statistika" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Opcijas" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_Fails" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Atvienot" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Pievienot" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_Iziet" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torrents" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "_Turpināt" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Pauzēt" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "_Pārbaudīt" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Pārvietot" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "_Turpināt Visus" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "_Pauzēt Visus" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_Palīdzība" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_Par" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "Valsts" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Lejupielādes ātrums" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Augšupielādes ātrums" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Atjauninājumi" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Atjaunināt tikai aktīvos torrentus" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Atjaunošanas intervāls" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torrenti" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Dzēst lokālo .torrent failu pēc pievienošanas" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Komandas" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Komanda" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "Devēji" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "Saite:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Mape" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Skats" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Rādīt grafiku" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Paziņojumi" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Torrents pievienots paziņojums" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Torrents pabeigts paziņojums" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Profils: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Nosaukums:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Ports" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Lietotāja vārds" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Parole" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Automātiski pieslēgties" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Statuss" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "Lejupielādes ierobežojums (KiB/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Augšupielādes ierobežojums (KiB/s)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "" #: src/trg-remote-prefs-dialog.c:403 msgid "Alternate days" msgstr "" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Rindas" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" "Ports iratvērts" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "Ports ir aizvērts" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Porta tests" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Testē..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Atjaunināt" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Bloķēšanas saraksts" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Savienojumi" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Tests" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Nepieciešams" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Ieteicams" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Šifrēšana" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Protokols" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Bloķēšanas saraksts" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "Bloķēšanas saraksta URL:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "Vide" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Lejupielādes mape" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Nepabeigto lejupielāžu mape" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Ierobežojumi" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Visi" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Pabeigts" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Nepabeigts" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Aktīvs" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Statistika" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Versija" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Pavisam lejupielādēts" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Pavisam augšupielādēts" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Pievienoti faili" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Statistika" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Sesija" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "" #: src/trg-status-bar.c:145 #, c-format msgid "Connected: %s :: Transmission %s" msgstr "" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Atjauno torrentus..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Brīva vieta: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Limits: %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "Lejup: %s%s, Augšup: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Torrentu faili" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Visi faili" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "Nevar atvērt torrenta failu: %s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Pievienot torrentu" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Augsta prioritāte" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Normāla prioritāte" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Zema prioritāte" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Izlaist" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Pievienot torrentu" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "_Torrenta fails:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "Torrenta_prioritāte:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "Saite:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Pievienot torrentu no saites:" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "Pavisam augšupielādēts" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "Pavisam lejupielādēts" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Noklusētais" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Atrāšanās vieta:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "Aktivitāte" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "Torrenta izmērs:" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "Lejupielādēts:" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "Augšupielādēts:" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "Atlikušais laiks:" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "Pēdējā aktivitāte:" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "Kļūda:" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "Sīkāk" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "Komentārs:" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "Izveidojis %1$s %2$s" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "Izveidots %1$s" #: src/trg-torrent-props-dialog.c:342 #, fuzzy, c-format msgid "Created by %1$s" msgstr "Izveidots %1$s" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "Nav kļūdu" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Torrenta prioritāte:" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Ierobežot lejupielādes ātrumu (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Ierobežot augšupielādes ātrumu (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Lietot globālos iestatījumus" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Pabeigts" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Devēji" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Lejupielādes" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Pievienots" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ID" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Dzēst" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "Augoši" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "Dilstoši" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Rādīt visu" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Sakļaut visu" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "" #: src/util.c:347 msgid "Server responded, but with no result." msgstr "" #: src/util.c:385 msgid "None" msgstr "Nav" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d diena" msgstr[1] "%d dienas" msgstr[2] "%d dienas" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d stunda" msgstr[1] "%d stundas" msgstr[2] "%d stundas" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d minūte" msgstr[1] "%d minūtes" msgstr[2] "%d minūtes" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld sekunde" msgstr[1] "%ld sekundes" msgstr[2] "%ld sekundes" #~ msgid "Remove & Delete" #~ msgstr "Noņemt un Dzēst" #~ msgid "Remove with data" #~ msgstr "Dzēst ar informāciju" transmission-remote-gtk-1.4.1/po/pl.po000066400000000000000000001113701341276053300177220ustar00rootroot00000000000000msgid "" msgstr "" "Project-Id-Version: transmission-remote-gui\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2012-12-05 19:43+0000\n" "Last-Translator: Łukasz Cieliński \n" "Language-Team: \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 msgid "transmission-remote-gtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 msgid "Transmission Remote Gtk Team" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Pobierane" #: src/torrent.c:378 msgid "Queued download" msgstr "" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "Oczekiwanie na sprawdzenie" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Sprawdzane" #: src/torrent.c:384 msgid "Queued seed" msgstr "" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Rozsiewane" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Zatrzymane" #: src/torrent.c:408 msgid "Unknown" msgstr "Nieznany" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s z %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Pozostały czas: nieznany" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, c-format msgid "Tracker gave an error: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Błędy" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "%d Pobieranie @ %s" msgstr[1] "%d Pobieranie @ %s" msgstr[2] "%d Pobieranie @ %s" #: src/torrent-cell-renderer.c:337 msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "" msgstr[1] "" msgstr[2] "" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "%d Wysyłanie @ %s" msgstr[1] "%d Wysyłanie @ %s" msgstr[2] "%d Wysyłanie @ %s" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Zdalny klient programu transsmission-daemon." #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Niski" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Wysoki" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Zwykły" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Mieszany" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Nazwa" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Rozmiar" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Postęp" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Pobierz" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Piorytet" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "Brak" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Błędy" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "Pobieranie" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Zakończone" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "Pozostało" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "Wysyłanie" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Pobrane" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Rozsiewający" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Stosunek" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Wysłanych" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "Pijawki" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Ogranicz stosunek rozsiewania" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Status" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Lokalizacja" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Klient" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Ten torent został zakończony." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Ten torent został dodany." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "Brak nazwy hosta" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "Nieznany błąd ustawień" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Łączenie..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Usunąć torenta \"%s\"?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "Usunąć %d torenty?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "Usunąć i skasować torenta \"%s\"?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "Usunąć i skasować %d torenty?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "Główne" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Tropiciele" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Pliki" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Klienci" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Rozłączono" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d Pobieranie @ %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d Wysyłanie @ %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "Żądanie %d/%d nieudane: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Brak Limitów" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Ustawienia" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Wznów" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Zatrzymaj" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Sprawdź" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "Ponowne rozgłaszanie" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Przenieś" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "_Usuń" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "Usuń i S_kasuj" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Akcje" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Zacznij teraz" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "Przenieś wyżej" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "Przenieś niżej" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "Przenieś na dół" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "Przenieś na górę" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "Limit Pobierania" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Limit Wysyłania" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Aktualizowanie..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Połącz" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Rozłącz" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Dodaj" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Dodaj adres" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Wznów wszystkie" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Zatrzymaj wszystkie" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Wyjście" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Wykres" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Widok" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "Selektor stanu" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "Pokaż katalogi" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Pokaż tropicieli" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Pokaż katalogi" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Szczegóły Torrenta" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "Statystyk_i" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Opcje" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "_Lokalne Ustawienia" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "_Zdalne Ustawienia" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "Pli_k" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Rozłącz" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "Dod_aj" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "Dodaj ad_res" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_Wyjście" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torenty" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "Wz_nów" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Zatrzymaj" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "_Sprawdź" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "P_onownie rozgłaszaj" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Przenieś" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "Wz_nów wszystkie" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "_Zatrzymaj wszystkie" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "Pomo_c" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_Informacje" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Host" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "Kraj" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Pobier." #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Wysył." #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Flagi" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Aktualizacje" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Aktualizuj tylko aktywne torenty" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Czas aktualizacji:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torenty" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "Nie rozpoczynaj pobierania" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "Dialog opcji przy dodawaniu" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Usuń lokalny plik .torrent po dodaniu" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Polecenia" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "Rozsiewacze" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "Adres:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Pokaż wykres" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "Tacka Systemowa" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Pokaż w tacce systemowej" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "Minimalizuj do tacki systemowej" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Informuj o dodanych torentach" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Informuj o zakończonych torentach" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "" #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "Połączenie" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Host:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Port:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Użytkownik:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Hasło:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Połącz automatycznie" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Ustawienia lokalne" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Status" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "" #: src/trg-remote-prefs-dialog.c:403 msgid "Alternate days" msgstr "" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "Ogranicz stosunek rozsiewania" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "Globalny limit klientów" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "Limit klientów na torenta" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "Przetestuj ponownie" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" "Port jest otwarty" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "Port jest zamknięty" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Testuj port" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Testowanie..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Aktualizacja" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Adres listy blokad:" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Połączenia" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Port" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Przetestuj" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Wymagane" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Preferowane" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "Dopuszczane" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Szyfrowanie" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "Losuj numer portu przy starcie" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "Przekierowanie portu" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "Wymiana klientów (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "Lokalne wyszukiwanie klientów" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "Adres listy blokad:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Katalog pobierania" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Katalog niekompletnych pobrań" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "Skrypt końcowy torenta" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Rozmiar bufora (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Zachowanie" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "Przemianuj niekompletne pliki" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "Skasuj oryginalne pliki torent" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Uruchom dodane torenty" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "Ustawienia zdalne" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Pasmo" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Limity" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "Żądanie nieudane z kodem HTTP %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Wszystko" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Zakończone" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Niekompletne" #: src/trg-state-selector.c:700 msgid "Active" msgstr "" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Statystyki" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Wszystkie pobrania" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Wszystkie wysłania" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Pliki dodane" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "Licznik sesji" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "Aktywny czas" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Statystyki" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Sesja" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Łącznie" #: src/trg-status-bar.c:145 #, c-format msgid "Connected: %s :: Transmission %s" msgstr "" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "" #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr "" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Pliki torrent" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Wszystkie pliki" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Brak)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(wiele)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Dodaj torenta" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Wysoki piorytet" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Zwykły piorytet" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Niski piorytet" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Pomiń" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Dodaj Torenta" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "Nie rozpoczynaj _pobierania" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "Plik _torenta:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "Folder _docelowy:" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "P_iorytet torenta:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "Pokaż dodatkowe opcje" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "Adres:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "Nie rozpoczynaj pobierania" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Dodaj torent z adresu" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "Całość wysyłanych" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "Całość pobieranych" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Lokacja:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Przenieś %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "Przenieś %d torenty" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:342 #, c-format msgid "Created by %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Uwzględnij globalne limity" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Piorytet torenta:" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Ogranicz prędkość pobierania (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Ogranicz prędkość wysyłania (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Użyj ustawień globalnych" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Zatrzymaj rozsiewanie przy stosunku" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Rozsiewanie bez względu na stosunek" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "Tryb rozsiewania:" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "Limit rozsiewania:" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "Limit klientów:" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "Właściwości wielu torentów (%d)" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Postęp" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Rozsiewacze" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Pliki dodane" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "Poziom" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "Adres rozgłaszania" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "Adres zgarniania" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Usuń" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Rozwiń wszystko" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Zwiń wszystko" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "Błąd dekodowania JSON." #: src/util.c:347 msgid "Server responded, but with no result." msgstr "Serwer odpowiedział, ale bez rezultatu." #: src/util.c:385 msgid "None" msgstr "Brak" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d dzień" msgstr[1] "%d dni" msgstr[2] "%d dni" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d godzinę" msgstr[1] "%d godziny" msgstr[2] "%d godzin" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d minutę" msgstr[1] "%d minuty" msgstr[2] "%d minut" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld sekundę" msgstr[1] "%ld sekundy" msgstr[2] "%ld sekund" #~ msgid "Remove & Delete" #~ msgstr "Usuń i Skasuj" #~ msgid "Blocklist (%ld entries)" #~ msgstr "Lista blokad (%ld wpisów)" #~ msgid "Remove with data" #~ msgstr "Usuń razem z danymi" transmission-remote-gtk-1.4.1/po/pt_BR.po000066400000000000000000001200651341276053300203160ustar00rootroot00000000000000# Brazilian Portuguese translation for transmission-remote-gtk # Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 # This file is distributed under the same license as the transmission-remote-gtk package. # FIRST AUTHOR , 2012. # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2012-07-25 14:41+0000\n" "Last-Translator: Rafael Neri \n" "Language-Team: Brazilian Portuguese \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "Transmission Remoto" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "Transmission Remoto" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "Transmission Remoto" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "Baixando Metadados" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Baixando" #: src/torrent.c:378 msgid "Queued download" msgstr "Transferência na fila" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "Aguardando par verificar" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Verificando" #: src/torrent.c:384 msgid "Queued seed" msgstr "Fila de envio" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Distribuindo" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Pausado" #: src/torrent.c:408 msgid "Unknown" msgstr "Desconhecido(a)" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s de %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "%1$s de %2$s (%3$s), enviado %4$s (Proporção: %5$s Objetivo: %6$s)" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "%1$s de %2$s (%3$s), enviado %4$s (Proporção: %5$s)" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "%1$s, enviado %2$s (Proporção: %3$s Objetivo: %4$s)" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "%1$s, enviado %2$s (Proporção: %3$s)" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Tempo restante desconhecido" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "%s restante" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "Ocioso" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "Completado" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "Em fila para verificação" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "Em fila para baixar" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "Em fila para enviar" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "Verificando dados (%1$s testado)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "Proporção %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Rastreador de Pares" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Erro:" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "%d baixando @ %s" msgstr[1] "%d baixando @ %s" #: src/torrent-cell-renderer.c:337 #, fuzzy msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "Baixando metadados de %1$li par (%2$s feito)" msgstr[1] "Baixando metadados de %1$li pares (%2$s feito)" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "%d distribuindo @ %s" msgstr[1] "%d distribuindo @ %s" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Um cliente remoto para o transmission-daemon" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Mínima" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Máxima" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Normal" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Misto" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Nome" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Tamanho" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Progresso" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Baixar" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Prioridade" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "N/D" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(Privado)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(Público)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Erro" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "Taxa de download" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Concluído" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "Tempo estimado" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "Taxa de Upload" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Baixado" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Distribuidores" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Proporção" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Enviado" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "Receptores" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Limite de taxa de envio" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Estado" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "Concluído em" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Localização" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Comentar" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Cliente" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Este torrent foi concluído." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Este torrent foi adicionado." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "Nenhum hostname definido" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "Erro desconhecido ao obter as configurações" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Conectando..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Remover torrent \"%s\"?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "Remover %d torrents?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "Remover e excluir torrent \"%s\"?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "Remover e excluir %d torrents?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "Geral" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Rastreadores" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Arquivos" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Pares" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "Este aplicativo suporta Transmission %g e superior, você tem %g." #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Desconectado" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d baixando @ %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d distribuindo @ %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "Solicitação %d/%d falhou: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Sem limite" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Propriedades" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Continuar" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Pausar" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Verificar" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "Anunciar novamente" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Mover" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Remover" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "Remover e excluir" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Ações" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Iniciar agora" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "Mover para cima na fila" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "Mover para baixo na fila" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "Final da fila" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "Topo da fila" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "Limite de download" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Limite de upload" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Atualizando..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Conectar" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Desconectar" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Adicionar" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Adicione a partir da URL" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Continuar todos" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Pausar todos" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Sair" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Grafo" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Visualizar" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "Estilo Transmission" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "Estilo Transmission Compacto" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "Estilo Clássico" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "Ordenar" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "Seletor de estado" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "Filtros de diretórios" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Filtros de rastreadores" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Diretórios" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Detalhes do Torrent" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "E_statísticas" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Opções" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "Preferências _locais" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "Preferências _remotas" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "Arquivo" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Desconectar" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Adicionar" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "Adicione a partir da URL" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "Sair" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torrent" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "_Continuar" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Pausar" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "_Verificar" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "_Anunciar novamente" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Mover" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "Continua_r todos" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "_Pausar todos" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "Ajuda" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "Sobre" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Host" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "País" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Velocidade de download" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Velocidade de upload" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Sinalizadores" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Atualizações" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Atualizar apenas os torrents ativos" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "Atualização completa a cada (?) atualizações" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Intervalo de atualização:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "Intervalo de atualização minimizado:" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "Intervalo de atualização de sessão:" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torrents" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "Iniciar uma pausa" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "Opções de diálogo em adicionar" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Excluir o arquivo local .torrent depois de adicionar" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Comandos" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "Rótulo" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Comando" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 msgid "RSS Feeds" msgstr "" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "URL:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "Diretórios de Download Remoto" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Diretório" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Visualizar" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Exibir o grafo" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "Área de notificação" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Exibir na área de notificação" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "Minimizar para a área de notificação" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Notificações" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Notificações de torrent adicionado" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Notificações de torrente concluído" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Perfil: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Nome:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "Conexão" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Host:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Porta:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "Caminho da URL RPC:" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Nome do usuário:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Senha:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Conectar automaticamente" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "Tempo limite:" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "Tentativas:" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Preferências locais" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "Diretórios" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Estado" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "Limites de largura de banda" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "Limite de download (KiB/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Limite de upload (KiB/s)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "Limites alternativos" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "Limites de velocidade alternativos ativos" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "Intervalo de tempo alternativo" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "Limites alternativos" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "Limite de download alternativo (KiB/s)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "Limite de envio alternativo (KiB/s)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "Limite de taxa de envio" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Filas" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "Tamanho da fila de Download" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "Tamanho da fila de Envio" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "Ignorar parados (minutos)" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "Limite global de pares" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "Limite de pares por torrent" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "Testar novamente" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" "A porta está aberta" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "A porta está fechada" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Testar porta" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Testando..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Atualizar" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Lista de bloqueados" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Conexões" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Porta do par" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Teste" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Requerido(a)" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Preferido" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "Tolerado" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Criptografia" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "Porta aleatória do par ao iniciar" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "Encaminhamento de porta do Par" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Protocolo" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "Descobridor de pares locais" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Lista de bloqueados" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "URL da lista de bloqueados:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "Ambiente" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Diretório de downloads" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Diretório de downloads incompletos" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "Script quando torrent for finalizado" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Tamanho do cache (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Comportamento" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "Renomear arquivos parciais" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "Mover arquivos torrents originais para a lixeira" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Iniciar torrents adicionados" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "Preferências remotas" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Largura de banda" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Limites" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "Solicitação falhou com código HTTP %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Tudo" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "Baixar na fila" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "Subir na fila" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Concluído" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Incompleto" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Ativo" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Estatisticas" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Versão" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Total baixado" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Total enviado" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Arquivos adicionados" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "Contador de sessão" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "Tempo ativo" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Estatísticas" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Sessão" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Acumulado" #: src/trg-status-bar.c:145 #, fuzzy, c-format msgid "Connected: %s :: Transmission %s" msgstr "Conectado: %s (Transmission %g)" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Atualizando torrents..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Espaço livre: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "Desativar limites de velocidade alternativos" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "Habilitar limites de velocidade alternativos" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Limite: %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "Down: %s%s, Up: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Arquivos torrent" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Todos os arquivos" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" "Não foi possível analisar o arquivo de torrent. Preferências do arquivo " "indisponíveis, mas você podetentar enviá-lo." #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "Impossível abrir o arquivo torrent: %s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Nenhum)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(Múltiplo)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Adicionar um Torrent" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Prioridade alta" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Prioridade normal" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Prioridade baixa" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Ignorar" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Adicionar torrent" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "Iniciar _pausado" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "Arquivo _torrent:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "Pasta de _destino:" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "Aplicar para todos:" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "_Prioridade do torrent:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "Mostrar janela de _opções" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "Você está tentando adicionar um torrent magnético, mas o DHT está " "desabilitado. O DHT (Distributed Hash Table) precisa estar habilitado nas " "configurações remotas." #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "URL:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "Iniciar pausado" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Adicionar torrent de uma URL" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "Total enviado" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "Total baixado" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Padrão" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Localização:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Mover %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "Mover %d torrents" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "Atividade" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "Tamanho do torrent:" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "Disponível:" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "Baixado:" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "Enviado:" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "Estado:" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "Tempo de execução:" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "Tempo restante:" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "Última atividade:" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "Erro:" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "Detalhes" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "Hash:" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "Privacidade:" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "Origem:" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "Comentário:" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "Privado para este rastreador -- DHT e PEX desabilitados" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "Torrent público" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "Criado por %1$s em %2$s" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "Criado em %1$s" #: src/trg-torrent-props-dialog.c:342 #, fuzzy, c-format msgid "Created by %1$s" msgstr "Criado em %1$s" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "Sem erros" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "Ativo agora" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Honrar limites globais" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Prioridade do Torrent" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "Posição na fila:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Limite de velocidade de download (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Limite de velocidade de upload (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Usar configurações globais" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Parar de enviar na proporção" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Distribuir independente da taxa" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "Modo de proporção de envio" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "Limite de proporção de envio" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "Limite de Pares:" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "Informação" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Concluído" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Enviando" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Downloads" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "Recebendo" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "Conectado" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "Pares PEX" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "Pares DHT" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Rastreador de Pares" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "Pares LTEP" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "Pares Retomados" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Entrada de pares" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "Pares T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Adicionado" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "Primeiro rastreador" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ID" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Posição na Fila" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Ativo pela última vez" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "Anunciar URL" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "Contagem de Distribuidores" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "Contagem de Receptores" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "Último anúncio" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Último Resultado" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "URL de coleta" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "Última coleta" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Excluir" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "Ascendente" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "Descendente" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Expandir tudo" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Ocultar tudo" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "Erro ao decodificar JSON." #: src/util.c:347 msgid "Server responded, but with no result." msgstr "Servidor respondeu, mas sem resultado." #: src/util.c:385 msgid "None" msgstr "Nenhum" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d dia" msgstr[1] "%d dias" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d hora" msgstr[1] "%d horas" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d minuto" msgstr[1] "%d minutos" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld segundo" msgstr[1] "%ld segundos" #~ msgid "Downloading from %1$li of %2$li connected peer" #~ msgid_plural "Downloading from %1$li of %2$li connected peers" #~ msgstr[0] "Baixando de %1$li de %2$li par conectado" #~ msgstr[1] "Baixando de %1$li de %2$li pares conectados" #~ msgid "Seeding to %1$li of %2$li connected peer" #~ msgid_plural "Seeding to %1$li of %2$li connected peers" #~ msgstr[0] "Enviando para %1$li de %2$li par conectado" #~ msgstr[1] "Enviando para %1$li de %2$li pares conectados" #~ msgid "Remove & Delete" #~ msgstr "Remover e excluir" #~ msgid "Blocklist (%ld entries)" #~ msgstr "Lista de Bloqueados (%ld entradas)" #~ msgid "Remove with data" #~ msgstr "Excluir com dados" transmission-remote-gtk-1.4.1/po/ru.po000066400000000000000000001330371341276053300177410ustar00rootroot00000000000000msgid "" msgstr "" "Project-Id-Version: transmission-remote-gui\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2012-09-30 10:07+0000\n" "Last-Translator: Nkolay Parukhin \n" "Language-Team: \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "Скачивание метаданных" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Загрузка" #: src/torrent.c:378 msgid "Queued download" msgstr "В очереди на загрузку" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "Ждет проверки" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Проверяются" #: src/torrent.c:384 msgid "Queued seed" msgstr "В очереди на отдачу" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Раздача" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Остановлены" #: src/torrent.c:408 msgid "Unknown" msgstr "Неизвестный" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s of %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" "%1$s из %2$s (%3$s), роздано %4$s (рейтинг: %5$s, целевой рейтинг: %6$s)" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "%1$s из %2$s (%3$s), отдано %4$s (рейтинг: %5$s)" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "%1$s, роздано %2$s (рейтинг: %3$s, целевой рейтинг: %4$s)" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "%1$s, роздано %2$s (рейтинг: %3$s)" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Оставшееся время неизвестно" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "осталось %s" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "%1$s %2$s, %3$s %4$s" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "%1$s %2$s" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "Бездействие" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "Завершён" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "В очереди на проверку" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "Поставлено в очередь на загрузку" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "Поставлено в очередь для раздачи" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "Проверка данных (%1$s проверено)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "Рейтинг %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Пиры с трекера" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Ошибка:" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "%d загружается @ %s" msgstr[1] "%d загружается @ %s" msgstr[2] "%d загружается @ %s" #: src/torrent-cell-renderer.c:337 #, fuzzy msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "Скачивание метаданных от %1$li пира (%2$s выполнено)" msgstr[1] "Скачивание метаданных от %1$li пиров (%2$s выполнено)" msgstr[2] "Скачивание метаданных от %1$li пиров (%2$s выполнено)" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "%d раздаётся @ %s" msgstr[1] "%d раздаётся @ %s" msgstr[2] "%d раздаётся @ %s" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Клиент для transsmission-daemon." #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Низкий" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Высокий" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Обычный" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Смешанный" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Имя" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Размер" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Прогресс" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Загрузить" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Приоритет" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "Недоступен" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(Закрытый)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(Открытый)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Ошибка" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "Загрузка" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Завершено" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "Осталось" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "Отдача" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Загружено" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Сидеры" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Коэфф-т" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Отдано" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "Личеры" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Раздавать до достижения коэффициента отдачи" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Статус" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "Завершён" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Местоположение" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Примечание" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Клиент" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Этот торрент закачан." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Этот торрент был добавлен." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "Не установлено имя сервера" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "Неизвестная ошибка при чтении настроек" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Подключение..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Удалить торрент \"%s\"?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "Удалить %d торрента(ов)?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "Удалить торрент \"%s\" и файлы?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "Переместить и удалить %d торрента(ов)?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "Основные" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Трекеры" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Файлы" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Пиры" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" "Это приложение поддерживаетTransmission %g и старше, у вас установлена %g." #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Разъединен" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d загружается @ %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d раздаётся @ %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "Запрос %d/%d окончился неудачно: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Без ограничений" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Свойства" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Запустить" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Остановить" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Проверить" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "Получить список пиров" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Переместить файлы" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Удалить" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "_Удалить торрент и файлы" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Действия" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Запустить немедленно" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "Продвинуть в очереди вверх" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "Продвинуть в очереди вниз" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "Вниз очереди" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "Наверх очереди" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "Макс. скорость загрузки" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Макс. скорость раздачи" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Обновляется..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Подключиться" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Отключиться" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Добавить" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Добавить по URL" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Запустить все" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Приостановить все" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Выход" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "График" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Вид" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "Стиль Transmission" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "Компактный стиль Transmission" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "Классический стиль" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "Сортировка" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "Панель выбора состояния" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "Фильтры по директориям" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Фильтры по трекерам" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Директории" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Детали торрента" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_Статистика" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Опции" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "_Настройки" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "Настройки _сервера" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_Файл" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Отключиться" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Добавить" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "Добавить из _URL" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_Выход" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Торрент" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "П_родолжить" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "Пр_остановить" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "Про_верить" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "Получить _список пиров" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Переместить файлы" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "_Запустить все" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "_Приостановить все" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_Справка" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_О программе" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Сервер" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "Страна" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Загрузка" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Отдача" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Флаги" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Обновления" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Обновлять только активные торренты" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "Полное обновление каждые (?) обновлений" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Интервал обновления:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "Интервал обновлений при свернутом окне:" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "Интервал обновления сессии:" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Торренты" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "Приостановить после добавления" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "Показывать опции при добавлении" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Удалить локальный torrent файл после добавления" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Команды" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "Метка" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Команда" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "Сиды" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "URL:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "Директории для загрузки на сервере" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Директория" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Вид" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Показывать график" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "Трей" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Показывать в трее" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "Сворачивать в трей" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Уведомления" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Уведомления о добавленных торрентах" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Уведомления о завершенных торрентах" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Профиль: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Название" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "Соединение" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Хост:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Порт:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Имя:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Пароль:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Подключаться автоматически" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "Таймаут:" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "Попыток:" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Настройки" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "Директории" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Статус" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "Ограничения скорости" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "Макс. скорость загрузки (КБ/с)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Макс. скорость отдачи (КБ/с)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "Альтернативные ограничения скорости" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "Включить альтернативные ограничения скорости" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "Временные рамки" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "Альтернативные ограничения скорости" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "Альтернативная макс. скорость загрузки (КБ/с)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "Альтернативная макс. скорость отдачи (КБ/с)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "Раздавать до достижения коэффициента отдачи" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Очереди" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "Размер очереди загрузки" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "Размер очереди отдачи" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "Игнорировать медленных пиров (минуты)" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "Глобальный лимит пиров" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "Лимит пиров каждого торрента" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "Повторить тестирование" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "Порт открыт" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "Порт закрыт" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Тестировать порт" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Тестирование..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Обновить блоклист" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Блоклист" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Подключение" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Порт" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Тест порта" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Требуется" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Предпочтительно" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "Допустимо" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Шифрование трафика" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "Случайный порт при запуске" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "Проброс порта" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Протокол" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "Обмен пирами (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "Distributed Hash Table (DHT)" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "Обнаружение локальных пиров" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Блоклист" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "URL блоклиста:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "Окружение" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Директория для загрузки" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Директория для не полностью загруженных файлов" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "Скрипт, запускаемый после завершения торрента" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Размер кэша (МБ)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Поведение" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "Переименовывать не полностью загруженные файлы" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "Удалить torrent файлы после добавления" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Запустить добавленные торренты" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "Настройки сервера" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Скорость" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Ограничения" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "HTTP запрос завершился с ошибкой %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Все" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "В очереди на загрузку" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "В очереди на отдачу" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Завершенные" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Незавершенные" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Активные" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Статистика" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Версия" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Всего загружено" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Всего отдано" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Файлов добавлено" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "Количество сессий" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "Время работы" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Статистика" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Текущая сессия" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Всего" #: src/trg-status-bar.c:145 #, fuzzy, c-format msgid "Connected: %s :: Transmission %s" msgstr "Подключен: %s (Transmission %g)" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Обновляю список торрентов..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Свободное место: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "Отключить альтернативные ограничения скорости" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "Включить альтернативные ограничения скорости" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Макс.: %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "Загрузка: %s%s, Отдача: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Файлы торрентов" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Все файлы" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" "Не могу обработать торрент файл. Настройки для файлов недоступны, но вы все-" "таки можете попробовать загрузить этот торрент." #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "Не могу открыть торрент файл: %s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Нет)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(Несколько)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Добавить торрент" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Высокий приоритет" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Обычный приоритет" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Низкий приоритет" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Пропустить" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Добавить торрент" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "_Приостановить после добавления" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "_Торрент файл:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "_Путь загрузки:" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "Применить ко всем:" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "_Приоритет торрента:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "Показывать диалог _опций" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "Вы пытаетесь добавить торрент по magnet ссылке, но DHT отключен. Вы должны " "включить Distributed Hash Table (DHT) в настройках сервера." #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "URL:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "Добавить остановленным" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Добавить торрент из URL" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "Общая скорость отдачи" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "Общая скорость загруки" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "По умолчанию" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Новое расположение:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Переместить %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "Переместить %d торрента(ов)" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "Активность" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "Размер торрента:" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "Загружено:" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "Загружено:" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "Передано:" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "Состояние:" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "Длительность:" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "Оставшееся время:" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "Последняя активность:" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "Ошибка:" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "Подробности" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "Хеш:" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "Конфиденциальность:" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "Происхождение:" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "Комментарий:" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "Только для этого трекера — DHT и PEX отключены" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "Публичный торрент" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "Создан %1$s %2$s" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "Создано %1$s" #: src/trg-torrent-props-dialog.c:342 #, fuzzy, c-format msgid "Created by %1$s" msgstr "Создано %1$s" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "Нет ошибок" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "Активен сейчас" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Использовать глобальные лимиты" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Приоритет торрента:" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "Место в очереди:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Ограничить скорость загрузки (КБ/с)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Ограничить скорость отдачи (КБ/с)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Использовать глобальные настройки" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Прекратить раздачу при коэффициенте отдачи" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Раздавать без учета коэффициента отдачи" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "Режим коэффициента отдачи:" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "Лимит коэффициента раздачи:" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "Лимит пиров:" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "Свойства нескольких (%d) торрентов" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "Информация" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Готово" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Сиды" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Отдающие" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Загрузки" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "Принимающие" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "Подключены" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "PEX пиры" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "DHT пиры" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Пиры с трекера" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "LTEP пиры" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "Возобновленные пиры" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Входящие пиры" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "Пиры T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Добавлен" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "Первый трекер" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ID" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Место в очереди" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Последняя активность" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "Номер" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "URL аннонса" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "Кол-во сидеров" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "Кол-во личеров" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "Последний запрос announce" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Последний результат" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "Scrape URL" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "Последний запрос Scrape" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Удалить" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "По возрастанию" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "По убыванию" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Развернуть все" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Свернуть все" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "Ошибка декодирования JSON." #: src/util.c:347 msgid "Server responded, but with no result." msgstr "Сервер ответил, но без результата" #: src/util.c:385 msgid "None" msgstr "Нет" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d день" msgstr[1] "%d дня" msgstr[2] "%d дней" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d час" msgstr[1] "%d часа" msgstr[2] "%d часов" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d минута" msgstr[1] "%d минуты" msgstr[2] "%d минут" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld секунда" msgstr[1] "%ld секунды" msgstr[2] "%ld секунд" #~ msgid "Downloading from %1$li of %2$li connected peer" #~ msgid_plural "Downloading from %1$li of %2$li connected peers" #~ msgstr[0] "Скачивание от %1$li из %2$li подключенного пира" #~ msgstr[1] "Скачивание от %1$li из %2$li подключенных пиров" #~ msgstr[2] "Скачивание от %1$li из %2$li подключенных пиров" #~ msgid "Seeding to %1$li of %2$li connected peer" #~ msgid_plural "Seeding to %1$li of %2$li connected peers" #~ msgstr[0] "Отдача %1$li из %2$li подключенного пира" #~ msgstr[1] "Отдача %1$li из %2$li подключенных пиров" #~ msgstr[2] "Отдача %1$li из %2$li подключенных пиров" #~ msgid "Remove & Delete" #~ msgstr "Удалить торрент и файлы" #~ msgid "Blocklist (%ld entries)" #~ msgstr "Список блокировок (%ld записей)" #~ msgid "Remove with data" #~ msgstr "Удалить вместе с файлами" transmission-remote-gtk-1.4.1/po/si.po000066400000000000000000001431411341276053300177230ustar00rootroot00000000000000# Sinhalese translation for transmission-remote-gtk # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the transmission-remote-gtk package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2013-11-03 04:30+0000\n" "Last-Translator: පසිඳු කාවින්ද \n" "Language-Team: Sinhalese \n" "Language: si\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "දුරස්ථ සම්ප්‍රේශක පාලකය" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "දුරස්ථ සම්ප්‍රේශක පාලකය" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "දුරස්ථ සම්ප්‍රේශක පාලකය" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "පශ්ච දත්ත (Metadata)" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "බාගත වෙමින්" #: src/torrent.c:378 msgid "Queued download" msgstr "පෝලිම්ගත බාගතකිරීම්" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "පරීක්ෂාව සඳහා පොරොත්තුවෙන්" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "පිරික්සමින්" #: src/torrent.c:384 msgid "Queued seed" msgstr "පෝලිම්ගත seeds" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "seed වෙමින්" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "විරාමයක් දී ඇත" #: src/torrent.c:408 msgid "Unknown" msgstr "නාඳුනන" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%2$s න් %1$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "%2$s න් %1$s (%3$s), උඩුගත කරන ලද %4$s (අනුපාතය: %5$s ඉලක්කය: %6$s)" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "%2$s න් %1$s(%3$s), උඩුගත කරන ලද %4$s (අනුපාතය: %5$s)" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "%1$s, උඩුගත කරන ලද %2$s (අනුපාතය: %3$s ඉලක්කය: %4$s)" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "%1$s, උඩුගත කරන ලද %2$s (අනුපාතය: %3$s)" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "ඉතිරිව ඇති කාලය නොදනී" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "%s ඉතිරිව ඇත" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "%1$s %2$s, %3$s %4$s" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "%1$s %2$s" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "අක්‍රිය" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "අවසන්" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "තහවුරු කිරීම සඳහා පෝලිම්ගත කර ඇත" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "බාගතකිරීම සඳහා පෝලිම්ගත කර ඇත" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "seed කිරීම සඳහා පෝලිම්ගත කර ඇත" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "දත්ත සත්‍යාපනය කරමින් (%1$s ක් පරීක්ශා කරන ලදී)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "අනුපාතය %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "ට්‍රැකර් පියර්" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "දෝෂය:" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "%d බාගත වෙමින් %s ට" msgstr[1] "%d බාගත වෙමින් %s ට" #: src/torrent-cell-renderer.c:337 #, fuzzy msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "%1$li peer වලින් පශ්චදත්ත බාගත කරමින් (%2$s සම්පූර්ණයි)" msgstr[1] "%1$li peers වලින් පශ්චදත්ත බාගත කරමින් (%2$s සම්පූර්ණයි)" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "%d සීඩ් කරමින් %s වේගයෙන්" msgstr[1] "%d සීඩ් කරමින් %s වේගයෙන්" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "සේවාලාභියාගෙන් සම්ප්‍රේශණ ක්‍රමවේදය" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "අඩු" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "ඉහල" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "සාමාන්‍ය" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "මිශ්‍ර" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "නම" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "ප්‍රමාණය" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "ප්‍රගතිය" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "බාගත කරන්න" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "ප්‍රමුඛතාව" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "ලබාගත නොහැක" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(පෞද්ගලික)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(පොදු)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "දෝශය" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "අනුපාතය පහලට" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "අවසන් කරන ලදී" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "ඉතිරිව ඇති කාලය" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "අනුපාතය ඉහලට" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "බාගත්" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "සීඩර්" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "අනුපාතය" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "උඩුගත කළ" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "ලීචර්" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "සීඩ් (Seed) අනුපාත සීමා" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "තත්වය" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "සම්පූර්ණ කරන ලද්දේ" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "පිහිටීම" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "ප්‍රතිචාරය" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "සේවාලාභියා" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "මෙම ටොරන්ටුව සම්පූර්ණ වී ඇත" #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "මෙම ටොරන්ටුව එකතු කර ඇත" #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "Hostname එකක් පත්කර නැත" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "සැකසුම් ලබාගැනීමේදී දෝශයක්" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "සම්බන්ධ වෙමින්..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "%s ටොරන්ටුව අයින් කරන්නද?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "ටොරන්ටු %d අයින් කරන්නද?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr " \"%s\" ටොරන්ටුව ඉවත් කර මකා දමන්න? " #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "\"%d\" ටොරන්ටු ඉවත් කර මකා දමන්න?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "පොදු" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "ට්‍රැකර් (tracker)" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "ගොනු" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "පියර් (peer) සම්බන්ධතා" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "මෙම මෘදුකාංගය වැඩකරන්නේ සම්ප්‍රේෂණය %g ට වැඩිවිට පමණි. ඔබගේ සම්ප්‍රේෂණය %g පමණකි." #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "විසන්ධි විය" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d බාගත වෙමින් %s ට" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d සීඩ් කරමින් %s වේගයෙන්" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "%d/%d ඉල්ලීම අසාර්ථක විය: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "සීමාවක් නොමැත" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "ගුණ" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "ඉදිරියට ගෙනයන්න" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "විරාමය" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "තහවුරු කරන්න" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "නැවත නිවේදනය කරන්න" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "ගෙනයන්න" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "ඉවත් කරන්න" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "ඉවත් කර මකා දමන්න" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "ක්‍රියා" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "දැන් අරඹන්න" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "පෝලිමේ ඉහලට යවන්න" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "පෝලිමේ පහලට යවන්න" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "පෝලිමේ පහලටම යවන්න" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "පෝලිමේ මුලටම යවන්න" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "බාගත සීමාව" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "උඩුගත සීමාව" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "යාවත්කාළීන කරමින්..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "සම්බන්ධ කරන්න" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "විසන්ධි කරන්න" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "එක් කරන්න" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "යොමුවකින් එක්කරන්න" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "සියල්ල නැවත අරඹන්න" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "සියල්ල මදකට නවත්වන්න" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "ඉවත් වන්න" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "ප්‍රස්ථාරය" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_පෙන්වන්න" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "සම්ප්‍රේශක රටාව" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "සම්ප්‍රේශන සංයුක්ත ක්‍රමය" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "සම්භාව්‍ය ක්‍රමය" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "වර්‍ග කිරීම" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "ස්වභාවය තෝරන්නා (State selector)" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "නාමාවලි පෙරන" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "ට්‍රැකර්(tracker) පෙරන" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "නාමාවලි" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "ටොරන්ට් විස්තර" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_සංඛ්‍යාලේඛන" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_විකල්ප" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "_ප්‍රාදේශීය අභිරුචි" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "_දුරස්ථ අභිරුචි" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_ගොනුව" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_විසන්ධි කරන්න" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_එක් කරන්න" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "_URL වලින් එකතු කරන්න" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_ඉවත් වෙන්න" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "ටොරන්ට්" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "_යලි අරඹන්න" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_විරාමය" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "තහවුරු කරන්න" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "නැවත _නිවේදනය කරන්න" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_ගෙනයන්න" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "_සියල්ල නැවත අරඹන්න" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "_සියල්ල මඳකට නවතන්න" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_උදවු" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_පිළිබඳ" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "_අන්තර්ජාල ප්‍රෝටොකෝල් (IP)" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "ධාරකය" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "රට" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "බාගත වේගය" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "උඩගත වේගය" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "සංකේත" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "යාවත්කාලීන" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "ක්‍රියාකාරී ටොරන්ට් පමණක් යාවත්කාලීන කරන්න" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "සෑම යාවත්කාලීන කිරීම් (?) කට වරක් සම්පූර්ණයෙන් යාවත්කාලීන කරන්න" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "යාවත්කාලීන කාල පරතරය:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "අවම කරන ලද යාවත්කාලීන කාල පරතරය:" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "සැසියක යාවත්කාලීන කාල පරතරය:" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "ටොරන්ටු" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "ඇරඹුම මඳකට නවතන ලදී" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "එකතු කිරීමේදී විකල්ප සංවාදයක්" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "එකතු කල පසු ප්‍රාදේශීය .torrent ගොනුව ඉවත් කරන්න" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "විධාන" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "ලේබලය" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "විධානය" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "ප්‍රභවයන්" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "සම්බන්දකය (URL):" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "දුරස්ථ බාගත කිරීම් නාමාවලි" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "නාමාවලිය" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "නරඹන්න" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "ප්‍රස්ථාරය පෙන්වන්න" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "පද්ධති තැටිය" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "පද්ධති තැටියේ පෙන්වන්න" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "පද්ධති තැටියට අවමායනය කරන්න" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "නිවේදන" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "ටොරන්ට් එකතු වූ බව කියැවෙන නිවේදන" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "ටොරන්ට් සම්පූර්ණ වූ බව කියැවෙන නිවේදන" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "පැතිකඩ " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "නම:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "සම්බන්ධතාවය" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "ධාරකය:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "පේනුව:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "RPC URL මඟ:" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "පරිශීලක නාමය:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "මුරපදය:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "ස්වයංක්‍රීයව සම්බන්ධ වන්න" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "කල් ඉකුත්වීම:" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "නැවත උත්සාහ කිරීම්:" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "ප්‍රාදේශිය අභිරුචි" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "නාමාවලි" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "තත්වය" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "කලාප පළල සීමා" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "බාගත කිරීම් සීමා (KiB/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "උඩුගත කිරීම් සීමා" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "විකල්ප සීමා" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "විකල්ප වේග සීමා සක්‍රිය කර ඇත" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "විකල්ප කාල පරාසය" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "විකල්ප සීමා" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "විකල්ප බාගත කිරීම් සීමා (KiB/s)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "විකල්ප උඩු කිරීම් සීමා (KiB/s)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "සීඩ් (Seed) අනුපාත සීමා" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "පෝලිම" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "පෝලිමේ ප්‍රමාණය බාගත කරන්න" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "පෝලිමේ ප්‍රමාණය සීඩ්(Seed) කරන්න" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "නැවතුනු ඒවා නොසලකා හරින්න (විනාඩි )" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "ලෝකව්‍යාප්ත පියර්(Peer) සීමාව" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "ටොරන්ට් එකකට පියර් ගණන් සීමාව" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "නැවත පරීක්ශා කරන්න" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "පේනුව open" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "පේනුව closed" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "පේනු පරීක්ශාව" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "පිරික්සමින්..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "යාවත්කාලීන කරන්න" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "අවහිර කල ලේඛනය" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "සබඳතා" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "සාමාන කවුළුව" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "පරීක්‍ෂාව" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "අවශ්‍යයි" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "වරණිත" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "ඉවසන ලද" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "ගුප්ත කේතනය" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "ආරම්භයේදී අභිමත පියර් පේනුවක් ඇත" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "පියර් පේනු ප්‍රේරණය" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "ප්‍රොටෝකෝලය" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "පියර් හුවමාරුව (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "ව්‍යාප්ත හැශ් වගුව" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "ප්‍රාදේශීය පියර් (peer) හඳුනාගැනීම" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "අවහිර කල ලේඛනය" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "අවහිර කල ලේඛනයේ විද්‍යුත් යොමුව:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "පරිසරය" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "බාගත කිරීම් නාමාවලිය:" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "අසම්පූර්ණ බාගත කිරීම් නාමාවලිය:" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "ටොරන්ට් කරන ලද අත්පත" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "කෑශ් (Cache) මතකය (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "හැසිරීම" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "පාර්ශවික ගොනු නැවත නම් කරන්න" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "මුල් ටොරන්ට් ගොනුව මකා දමන්න" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "එකතු කල ටොරන්ට් ආරම්භ කරන්න" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "දුරස්ථ අභිරුචි" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "කලාප පරාසය (Bandwidth)" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "සීමා" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "ඉල්ලීම අසමත්ය, දෝශ පනිවුඩයේ කේත අංකය: %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "සියල්ල" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "පෝලිමේ පහලට" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "පෝලිමේ ඉහලට" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "සම්පූර්ණයි" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "අසම්පූර්ණයි" #: src/trg-state-selector.c:700 msgid "Active" msgstr "සක්‍රීයයි" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "සංඛ්‍යාලේඛන" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "වෙලුම" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "බාගතකිරීම් එකතුව" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "උපගතකිරීම් එකතුව" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "ගොනු එකතු කරන ලදී" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "සැසියේ ගණන් කිරීම" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "සක්‍රිය කාලය" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "සංඛ්‍යා විස්තර" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "සැසිය" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "සමුච්චිත" #: src/trg-status-bar.c:145 #, fuzzy, c-format msgid "Connected: %s :: Transmission %s" msgstr "සම්බන්ධිතයි: %s ( සම්ප්‍රේශණය %g )" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "ටොරන්ට් යාවත්කාලීන කරමින්..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "හිස් ඉඩ ප්‍රමාණය: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "විකල්ප වේග සීමා අක්‍රිය කරන්න" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "විකල්ප වේග සීමා සක්‍රිය කරන්න" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (සීමාව: %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "බාගත: %s%s, උඩුගත: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "ටොරන්ට් ගොනු" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "සියලු ගොනු" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "ටොරන්ට් ගොනුව කියවීමට නොහැකියි. ගොනු වල අභිරුචි නොමැත. උඩුගත කිරීමට උත්සාහ කරන්න." #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "%s ටොරන්ට් ගොනුව විවෘත කල නොහැකියි." #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(කිසිවක් නැත)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(බහු)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "ටොරන්ටුවක් එකතු කරන්න" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "වැඩි ප්‍රමුඛතාව" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "සාමාන්‍ය ප්‍රමුඛතාව" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "අඩු ප්‍රමුඛතාව" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "නොසලකා හරින්න" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "ටොරන්ට් එකතු කරන්න" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "ආරම්භය_මඳකට නවත්වන ලදී" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "_ටොරන්ට් ගොනුව:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "ඉලක්ක ගොනුව" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "සැමට අදාල කරන්න" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "ටොරන්ට්_ප්‍රමුඛතාව :" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "පෙන්වන්න_විකල්ප දෙබස්" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "ඔබ උත්සාහ කරන්නේ කාන්දම් ටොරන්ටුවක්(magnet torrent) එක්කිරීමටයි, නමුත් DHT අබල කර ඇත. " "දුරස්ථ සැකසුම් වල ව්‍යාප්ති හැශ් වගු(DHT) සක්‍රීය කරන්න." #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "සම්බන්දකය (URL):" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "ආරම්භය මඳකට නවත්වන ලදී" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "විද්‍යුත් යොමුවකින් ටොරන්ටුව එකතු කරන්න" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "උඩුගත දත්ත එකතුව" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "බාගත දත්ත එකතුව" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "පුරුදු ආකාරය" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "ස්ථානය:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "%s ගෙන යන්න" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "ටොරන්ටු %d ගෙන යන්න" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "ක්‍රියාකාරිත්වය" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "ටොරන්ට් විශාලත්වය:" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "තිබේ:" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "බාගන්න ලද:" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "උඩුගත:" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "තත්වය:" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "ධාවනය වන කාලය:" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "ඉතිරිව ඇති කාලය:" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "අවසාන ක්රියාකාරකම:" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "දෝෂය:" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "තොරතුරු" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "හෑශ්:" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "පෞද්ගලිකත්වය:" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "මූලය:" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "සටහන්:" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "මෙම ටොරන්ටුව සඳහා පුද්ගලිකයි: DHT, PEX අක්‍රීය කර ඇත" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "පොදු ටොරන්ට්" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "නිර්මාණය කරන ලද්දේ: %1$s %2$s දීය" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "නිර්මාණය කරන ලද්දේ: %1$s" #: src/trg-torrent-props-dialog.c:342 #, fuzzy, c-format msgid "Created by %1$s" msgstr "නිර්මාණය කරන ලද්දේ: %1$s" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "දෝශ නොමැත" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "දැන් ක්රියාකාරී" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "විශ්ව සීමා වලට ගරු කරන්න" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "ටොරන්ට් ප්‍රමුඛතාව:" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "පෝලිමේ පිහිටීම:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "සීමාකල භාගත වේගය (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "භාගත වේගය සීමාකරන්න (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "විශ්වීය සැකසුම් භාවිත කරන්න" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "සීඩ් කිරීම නවත්වන අනුපාතය" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "අනුපාතය නොසලකා සීඩ් කිරීම" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "අනුපාතයට සීඩ් කිරීම:" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "සීඩ් කිරීමේ අනුපාතයේ සීමාව" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "පියර් සීමාව:" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "බහු (%d) ටොරන්ටු වල ගතිගුණ" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "තොරතුරු" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "අවසන්" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "ප්‍රභවයන්" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "යවමින්" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "බාගත කිරීම්" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "ලැබෙමින්" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "සම්බන්ධ විය" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "PEX පියර්" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "DHT පියර්" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "ට්‍රැකර් පියර්" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "LTEP පියර්" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "නැවත අරඹන ලද පියර්" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "ඇතුලට එන පියර්" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "පියර් T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "එක් කල" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "පලමු ට්‍රැකරය" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ID" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "පෝලිමේ පිහිටීම" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "අස්වසන් වරට සක්‍රීය" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "තට්ටුව" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "URL යොමුව නිවේදනය" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "සීඩර් ගණනය" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "ලීචර් ගණනය" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "අවසන් නිවේදනය" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "අවසන් ප්‍රතිඵලය" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "සූරන විද්‍යුත් යොමුව" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "අවසාන සීරුම" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "මකා දමන්න" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "ආරෝහණ" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "අවරෝහණ" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "සියල්ල දිගහරින්න" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "සියල්ල හකුළන්න" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "JSON විකේතන දෝශය" #: src/util.c:347 msgid "Server responded, but with no result." msgstr "සර්වරය පිලිතුරු දෙයි, ප්‍රතිඵලයක් නොමැත." #: src/util.c:385 msgid "None" msgstr "නොමැත" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "දින %d" msgstr[1] "දින %d" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "පැය %d" msgstr[1] "පැය %d ක්" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "විනාඩි %d ක්" msgstr[1] "විනාඩි %d යි" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "තත්පර %ld යි" msgstr[1] "තත්පර %ld යි" #~ msgid "Downloading from %1$li of %2$li connected peer" #~ msgid_plural "Downloading from %1$li of %2$li connected peers" #~ msgstr[0] "%2$li ක් වූ සමබන්ධිත peer එකෙන් %1$li භාගත කරමින්" #~ msgstr[1] "%2$li ක් වූ සමබන්ධිත peer වලින් %1$li භාගත කරමින්" #~ msgid "Seeding to %1$li of %2$li connected peer" #~ msgid_plural "Seeding to %1$li of %2$li connected peers" #~ msgstr[0] "සම්බන්ධිත peer %2$li න් %1$li කට seed කරමින්" #~ msgstr[1] "සම්බන්ධිත peers %2$li න් %1$li කට seed කරමින්" #~ msgid "Remove & Delete" #~ msgstr "ඉවත් කර මකා දමන්න" #~ msgid "Blocklist (%ld entries)" #~ msgstr "වාරණලැයිස්තුව (ඇතුල්කිරීම් %ld)" #~ msgid "Remove with data" #~ msgstr "දත්ත සමඟ මකා දමන්න" transmission-remote-gtk-1.4.1/po/sv.po000066400000000000000000001136071341276053300177440ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2012-08-07 10:06+0000\n" "Last-Translator: webaake \n" "Language-Team: LANGUAGE \n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "Transmission Remote" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Laddar ned" #: src/torrent.c:378 msgid "Queued download" msgstr "Köad nedladdning" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "Väntar på verifiering" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Verifierar" #: src/torrent.c:384 msgid "Queued seed" msgstr "Köad seed" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Seedning" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Pausade" #: src/torrent.c:408 msgid "Unknown" msgstr "Okänd" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Tracker Peers" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Fel" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "%d Laddar ned @ %s" msgstr[1] "%d Laddar ned @ %s" #: src/torrent-cell-renderer.c:337 msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "" msgstr[1] "" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "%d Seeding @ %s" msgstr[1] "%d Seeding @ %s" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Fjärrklient till transmission-daemon" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Låg" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Hög" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Normal" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Blandad" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Namn" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Storlek" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Förlopp" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Ladda ned" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Prioritet" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "N/A" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(Privat)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(Publik)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Fel" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "Hastighet ned" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Komplett" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "ETA" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "Hastighet upp" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Nedladdat" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Seedare" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Ratio" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Uppladdat" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "Leechers" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Seed ratio nivå" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Status" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "Avslutad" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Plats" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Kommentar" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Klient" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Denna torrent är komplett." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Denna torrent är tillagd." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "Inget värdnamn angivet" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "Okänt fel med inställningar" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Kopplar upp..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Ta bort torrent \"%s\"?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "Ta bort %d torrents?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "Ta bort och radera torrent \"%s\"?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "Ta bort och radera %d torrents?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "Allmänt" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Trackers" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Filer" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Peers" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "Detta program stödjer Transmission %g och senare, du har %g." #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Nedkopplad" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d Laddar ned @ %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d Seeding @ %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "Begäran %d/%d misslyckades: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Obegränsat" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Egenskaper" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Återuppta" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Pausa" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Verifiera" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "Återannonsera" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Flytta" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Ta bort" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "Ta bort & radera" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Åtgärder" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Starta nu" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "Flytta upp i kö" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "Flytta ned i kön" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "Sist i kön" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "Först i kön" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "Ned gräns" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Upp gräns" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Uppdaterar..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Koppla upp" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Koppla ned" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Lägg till" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Lägg till från URL" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Återuppta alla" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Pausa alla" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Avsluta" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Graf" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Visa" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "Statusfönster" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "Mappfilter" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Trackerfilter" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Mappar" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Torrentdetaljer" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_Statistik" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Alternativ" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "_Lokala inställningar" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "_Server inställningar" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_Arkiv" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Koppla ned" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Lägg till" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "Lägg till från _URL" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_Avsluta" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torrent" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "_Återuppta" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Pausa" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "_Verifiera" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "Åter-_annonsera" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Flytta" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "_Återuppta alla" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "_Pausa alla" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_Hjälp" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_Om" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Server" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "Land" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Ned hastighet" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Upp hastighet" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Flaggor" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Uppdateringar" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Uppdatera endast aktiva torrents" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "Hel uppdatering varje (?)" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Uppdateringsintervall:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "Uppdateringsintervall minimerat:" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torrents" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "Starta pausad" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "Alternativdialog vid tillägg" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Radera lokal .torrentfil efter tillagd" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Kommandon" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "Märkning" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Kommando" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "Seeds" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "URL:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "Fjärr nedladdningsmappar" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Mapp" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Visa" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Visa graf" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "Systembricka" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Visa i systembricka" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "Minimera till systembricka" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Notifieringar" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Torrent tillagd notifiering" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Torrent komplett notifiering" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Profil: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Namn:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "Uppkoppling" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Värd:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Port:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Användarnamn:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Lösenord:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Automatisk uppkoppling" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "Tidsgräns:" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "Återförsök:" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Lokala inställningar" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "Mappar" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Status" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "Bandbreddsbegränsning" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "Nedladdningshastighet (KiB/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Uppladdningshastighet (KiB/s)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "Alternativa begränsningar" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "Alternativa begränsningar aktiverade" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "Alternativ tidsinställning" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "Alternativa begränsningar" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "Alternativ nedladdningsgräns (KiB/s)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "Alternativ uppladdningsgräns (KiB/s)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "Seed ratio nivå" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Köer" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "Antal i nedladdningskö" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "Antal i seedkö" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "Ignorera uppstannade (minuter)" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "Globalt max antal peers" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "Torrent max antal peers" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "Återkontrollera" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" "Porten är öppen" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "Porten är stängd" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Testa port" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Testar..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Uppdatera" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Blocklist" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Uppkopplingar" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Peer port" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Test" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Begärda" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Föredragna" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "Accepterade" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Kryptering" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "Slumpmässig port vid start" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "Peer port vidarebefordran" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Protokoll" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "Peer utväxling (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "Distributed Hash Table (DHT)" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "Lokal peer sökning" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Blocklist" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "Blocklist URL:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "Miljövariabler" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Nedladdningsmapp" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Pågående nedladdningsmapp" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "Torrent komplett script" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Cachestorlek (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Beteende" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "Namnge partiella filer" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "Radera original torrentfil" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Starta tillagda torrents" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "Serverinställningar" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Bandbredd" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Begränsingar" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "Begäran misslyckades med http-kod %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Alla" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "Kö upp" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "Kö ned" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Kompletta" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Ej kompletta" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Aktiva" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Statistik" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Version" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Nedladdat totalt" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Uppladdat totalt" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Filer tillagda" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "Sessioner" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "Aktiv tid" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Statistik" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Session" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Kumulativ" #: src/trg-status-bar.c:145 #, fuzzy, c-format msgid "Connected: %s :: Transmission %s" msgstr "Uppkopplad: %s (Transmission %g)" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Uppdaterar torrents..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Fritt utrymme: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "Avaktivera alternativa hastighetsbegränsningar" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "Aktivera alternativa hastighetsbegränsningar" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Max: %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "Ned: %s%s, Upp: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Torrentfiler" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Alla filer" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" "Misslyckades att läsa torrentfil. Filinställingar ej tillgängliga, men du " "kan ändå försöka ladda upp den." #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "Misslyckades att öppna torrentfil: %s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Ingen)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(Multipla)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Lägg till torrent" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Hög prioritet" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Normal prioritet" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Låg prioritet" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Hoppa över" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Lägg till torrent" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "Starta _pausad" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "_Torrentfil:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "_Destinatiosnmapp" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "Torrent _prioritet:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "Visa _inställingsdialog" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "Du försöker lägga till en magnetlänk, men DHT är avaktiverat. Distributed " "Hash Table (DHT) måste vara aktiverat på servern." #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "URL:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "Starta pausad" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Lägg till torrent från URL" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "Total uppladdning" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "Total nedladdning" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Standard" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Plats:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Flytta %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "Flytta %d torrents" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:342 #, c-format msgid "Created by %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Följ globala inställningar:" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Torrentprioritet:" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "Köplats:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Begränsa nedladdningshastighet (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Begränsa uppladdningshastighet (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Använd globala inställningar" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Stoppa vid ratio" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Seeda oavsett ratio" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "Alternativ för ratio:" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "Seed ratio max:" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "Max antal peers:" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "Multipla torrents (%d) egenskaper" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Klart" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Seeds" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Sänder" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Nedladdningar" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "Tar emot" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "Uppkopplad" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "PEX Peers" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "DHT Peers" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Tracker Peers" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "LTEP Peers" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "Återupptagna peers" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Inkommande peers" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "Peers T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Tillagd" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "Första tracker" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ID" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Köposition" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Senast aktiv" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "#" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "Annonserings URL" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "Antal seedare" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "Antal leechers" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "Senaste annonsering" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Senaste resultat" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "Scrape URL" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "Senaste scrape" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Radera" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Expandera alla" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Kollapsa alla" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "JSON tolkningsfel." #: src/util.c:347 msgid "Server responded, but with no result." msgstr "Serversvar, men utan resultat." #: src/util.c:385 msgid "None" msgstr "Ingen" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d dag" msgstr[1] "%d dagar" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d timme" msgstr[1] "%d timmar" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d minut" msgstr[1] "%d minuter" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "" msgstr[1] "" #~ msgid "Remove & Delete" #~ msgstr "Ta bort & radera" #~ msgid "Blocklist (%ld entries)" #~ msgstr "Blocklist (%ld antal)" #~ msgid "Remove with data" #~ msgstr "Ta bort inlusive data" transmission-remote-gtk-1.4.1/po/tr.po000066400000000000000000001072361341276053300177420ustar00rootroot00000000000000# Turkish translation for transmission-remote-gtk # Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 # This file is distributed under the same license as the transmission-remote-gtk package. # FIRST AUTHOR , 2012. # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2012-06-03 05:29+0000\n" "Last-Translator: Ebubekir KARUL \n" "Language-Team: Turkish \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 msgid "transmission-remote-gtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 msgid "Transmission Remote Gtk Team" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "İndiriliyor" #: src/torrent.c:378 msgid "Queued download" msgstr "" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "KOntrol için bekleniyor" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Kontrol Ediliyor" #: src/torrent.c:384 msgid "Queued seed" msgstr "" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Gönderiliyor" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Duraklatıldı" #: src/torrent.c:408 msgid "Unknown" msgstr "Bilinmeyen" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, c-format msgid "Tracker gave an error: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Hata" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "%d İndiriliyor @ %s" msgstr[1] "%d İndiriliyor @ %s" #: src/torrent-cell-renderer.c:337 msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "" msgstr[1] "" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "%d Gönderiliyor @ %s" msgstr[1] "%d Gönderiliyor @ %s" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Düşük" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Yüksek" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Normal" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Karışık" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "İsim" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Boyut" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "İlerleme" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "İndir" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Öncelik" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "Yok" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(Gizli)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "Herkese açık" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "Hata" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Tamamlandı" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "Kalan Süre" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "İndirildi" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Kaynaklar" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Gönderildi" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Sınırsız" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Durum" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Konum" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Yorum" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "İstemci" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Bu torrent tamamlandı." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Torrent eklendi." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "Sunucu belirlenmedi" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "Bağlanıyor..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Torrent silinsin mi \"%s\"?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "Genel" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "İzleyiciler" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Dosyalar" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Eşler" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Bağlı değil" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d İndiriliyor @ %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d Gönderiliyor @ %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Sınırsız" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Tercihler" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Devam et" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Duraklat" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Doğrula" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Taşı" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Sil" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 msgid "Remove and delete data" msgstr "" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Eylemler" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Başla" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "İndirme Sınırı" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Gönderme Sınırı" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Güncelleniyor..." #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "Bağlan" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Bağlantıyı Kes" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Ekle" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Adresten ekle" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Tümünü Sürdür" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Tümünü Duraklat" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Çıkış" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Grafik" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "_Görünüm" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Dizinler" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Torrent Detayları" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_İstatistikler" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "_Seçenekler" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "_Yerel Tercihler" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "_Uzak Tercihler" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_Dosya" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Bağlantıyı Kes" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Ekle" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "_Adresten ekle" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "_Çık" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Torrent" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "_Devam Et" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Duraklat" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "_Doğrula" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Taşı" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "_Tümüne Devam Et" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "_Tümünü Duraklat" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_Yardım" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_Hakkında" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Sunucu" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "Ülke" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "İndirme Hızı" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Gönderme Hızı" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Bayraklar" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Güncellemeler" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Güncelleme aralığı:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Torrentler" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Ekledikden sonra torrent dosyasını sil" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Komutlar" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "Etiket" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Komut" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 msgid "RSS Feeds" msgstr "" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "Adres:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Klasör" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Görünüm" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Grafik göster" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "Sistem Çekmecesi" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Sistem çekmecesinde göster" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "Sistem çekmecesine küçült" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Bildirimler" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Profil: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "İsim:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "Bağlantı" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Sunucu:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Port:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Kullanıcı Adı:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Şifre:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "Otomatik bağlantı" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "Zaman aşımı:" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Yerel Tercihler" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "Dizinler" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Durum" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "Bant genişliği sınırları" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "İndirme Hızı Limiti (KB/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Yükleme Limiti (KB/s)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "" #: src/trg-remote-prefs-dialog.c:403 msgid "Alternate days" msgstr "" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "Alternatif indirme hızı (KB/s)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "Alternatif yükleme hızı (KB/s)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Kuyruklar" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "Tekrar test et" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "Port açık" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "Port kapalı" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Port testi" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Sınanıyor..." #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Güncelle" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Engelli listesi" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "Bağlantılar" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Kaynak portu" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Test" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Gerekli" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Tercihe bağlı" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Şifreleme" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Protokol" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Engelli listesi" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "İndirme dizini" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Tamamlanmayan indirmeler dizini" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Önbellek boyutu (MB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Eklenen torrentleri indir" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "Uzak Tercihler" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Bant Genişliği" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Limitler" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Tümü" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "Aşağı Taşı" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "Yukarı Taşı" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Tamamlandı" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Tamamlanmadı" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Aktif" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "İstatistikler" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Sürüm" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Toplam İndirilme" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Toplam Gönderilme" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Dosyalar Eklendi" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "İstatistik" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Oturum" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "" #: src/trg-status-bar.c:145 #, c-format msgid "Connected: %s :: Transmission %s" msgstr "" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Torrentler yükleniyor..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Boş alan: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Limit: %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "İndirme: %s%s, Yükleme: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Torrent dosyaları" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Tüm dosyalar" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Yok)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Torrent Ekle" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Yüksek Öncelik" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Normal Öncelik" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Düşük Öncelik" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Atla" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Torrent Ekle" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "_Torrent dosyası:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "_Hedef klasör:" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "Torrent _önceliği:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "Adres:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "URL'den torrent ekle" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "Toplam yükleme" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "Toplam indirilme" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Varsayılan" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Konum:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Taşı %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:342 #, c-format msgid "Created by %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "İndirme hızı limiti (KB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Yükleme hızı limiti (KB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Genel ayarları kullan" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Tamamlandı" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Gönderiliyor" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "İndirilenler" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "Alınıyor" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "Bağlandı" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Eklendi" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "ID" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Kuyruk konumu" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Son aktivite" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "Duyuru Adresi" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Son Sonuç" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Sil" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Tümünü genişlet" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Tümünü daralt" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "" #: src/util.c:347 msgid "Server responded, but with no result." msgstr "" #: src/util.c:385 msgid "None" msgstr "Yok" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d gün" msgstr[1] "%d gün" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d saat" msgstr[1] "%d saat" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d dakika" msgstr[1] "%d dakika" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld saniye" msgstr[1] "%ld saniye" transmission-remote-gtk-1.4.1/po/uk.po000066400000000000000000001342701341276053300177320ustar00rootroot00000000000000# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Yuri Chornoivan , 2012. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2012-09-06 03:34+0000\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "Віддалене керування Transmission" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "Віддалене керування Transmission" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "Віддалене керування Transmission" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "Отримання метаданих" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "Завантажуються" #: src/torrent.c:378 msgid "Queued download" msgstr "Заплановане завантаження" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "Очікує перевірки" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "Перевіряються" #: src/torrent.c:384 msgid "Queued seed" msgstr "Заплановане поширення" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "Поширення" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "Призупинені" #: src/torrent.c:408 msgid "Unknown" msgstr "Невідомий" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%1$s з %2$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "%1$s з %2$s (%3$s), вивантажено %4$s (співвідношення: %5$s мета: %6$s)" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "%1$s з %2$s (%3$s), вивантажено %4$s (співвідношення: %5$s)" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "%1$s, завантажено %2$s (співвідношення: %3$s мета: %4$s)" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "%1$s, вивантажено %2$s (співвідношення: %3$s)" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "Час, що залишився, невідомий" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "Залишилося %s" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "%1$s %2$s, %3$s %4$s" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "%1$s %2$s" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "Неактивний" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "Завершено" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "У черзі на перевірку" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "Додано до черги завантаження" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "Додано до черги розповсюдження" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "Перевіряємо дані (перевірено %1$s)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "Співвідношення %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Вузли-координатори" #: src/torrent-cell-renderer.c:315 #, fuzzy, c-format msgid "Error: %s" msgstr "Помилка:" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "%d завантаження на %s" msgstr[1] "%d завантаження на %s" msgstr[2] "%d завантаження на %s" #: src/torrent-cell-renderer.c:337 #, fuzzy msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "Отримуємо метадані з %1$li вузла (виконано %2$s)" msgstr[1] "Отримуємо метадані з %1$li вузлів (виконано %2$s)" msgstr[2] "Отримуємо метадані з %1$li вузлів (виконано %2$s)" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "%d поширення на @ %s" msgstr[1] "%d поширення на @ %s" msgstr[2] "%d поширення на @ %s" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "Клієнт для transmission-daemon." #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "Низький" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "Високий" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "Звичайний" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "Все разом" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "Назва" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "Розмір" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "Поступ" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "Завантажити" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "Пріоритет" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "н/д" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(Приватний)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(Відкритий)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "З помилками" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "Завантаження" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "Завершено" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "Залишилось" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "Вивантаження" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "Завантажено" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "Поширювачі" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "Коефіцієнт" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "Вивантажено" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "П’явки" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "Обмеження коефіцієнта роздачі" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "Стан" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "Завершено" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "Розташування" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "Коментар" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "Клієнт" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "Цей торент завантажено." #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "Цей торент було додано." #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "Не вказано назви сервера" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "Невідома помилка при читанні налаштувань" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "З’єднання…" #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "Вилучити торент «%s»?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "Вилучити %d торентів?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "Вилучити торент «%s» і файли?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "Вилучити %d торентів і файли цих торентів?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "Загальне" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Трекери" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "Файли" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "Вузли" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" "Ця програма може працювати з Transmission %g та пізнішими версіями. У вашій " "системі встановлено версію %g." #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "Роз’єднано" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d завантаження на %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d поширення на @ %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "Запит %d/%d зазнав невдачі: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "Без обмежень" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "Властивості" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "Відновити" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "Призупинити" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "Перевірити" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "Повторити оголошення" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "Пересунути" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "Вилучити" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 #, fuzzy msgid "Remove and delete data" msgstr "Вилучити торент і файли" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "Дії" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "Розпочати" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "Пересунути вище у черзі" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "Пересунути нижче у черзі" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "Поставити в кінець черги" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "Поставити на початок черги" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "Обмеження швидкості завантаження" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "Обмеження швидкості вивантаження" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "Оновлення…" #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "З’єднатися" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "Від’єднатися" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "Додати" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "Додати за адресою" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "Відновити все" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "Призупинити все" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "Вийти" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "Графік" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "П_ерегляд" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "Стиль роботи Transmission" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "Компактний стиль Transmission" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "Класичний стиль" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "Впорядкувати" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "Вибір стану" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "Фільтри за каталогом" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Фільтри за торентом" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 #, fuzzy msgid "Directories first" msgstr "Каталоги" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "Параметри торента" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "_Статистика" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "П_араметри" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "_Локальні налаштування" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "Налаштування _сервера" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "_Файл" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "_Від’єднатися" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "_Додати" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "Додати за _адресою" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "Ви_йти" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "_Торент" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "П_родовжити" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "_Призупинити" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "Пере_вірити" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "Отримати _список вузлів" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "_Перемістити" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "_Відновити все" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "П_ризупинити всі" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "_Довідка" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "_Про програму" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "IP" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "Вузол" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "Країна" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "Швидкість звантаження" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "Швидкість вивантаження" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "Прапорці" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "Оновлення" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "Оновлювати тільки активні торенти" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "Повне оновлення кожні (?) оновлень" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "Інтервал оновлення:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "Інтервал оновлення під час згортання:" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "Проміжок між оновленнями:" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "Торенти" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "Додавати призупиненим" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "Вікно налаштувань торента при додаванні" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "Вилучити локальний файл .torrent після додавання" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "Команди" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "Мітка" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "Команда" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 #, fuzzy msgid "RSS Feeds" msgstr "Вузли" #: src/trg-preferences-dialog.c:656 #, fuzzy msgid "URL" msgstr "Адреса:" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "Каталоги віддаленого завантаження" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "Каталог" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "Перегляд" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "Показувати графік" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "Системний трей" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "Показувати в системному лотку" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "Мінімізувати до системного лотка" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "Сповіщення" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "Повідомлення про додані торенти" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "Повідомлення про завершені торенти" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "Профіль: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "Назва:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "З’єднання" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "Вузол:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "Порт:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "Користувач:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "Пароль:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "З’єднуватись автоматично" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "Тайм-аут:" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "Спроб:" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "Локальні налаштування" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "Каталоги" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "Стан" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "Обмеження каналу" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "Обмеження завантаження (КіБ/с)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "Обмеження вивантаження (КіБ/с)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "Різні значення обмежень" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "Різні обмеження швидкості активних торентів" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "Різні діапазони часів" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "Різні значення обмежень" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "Змінне обмеження завантаження (КіБ/с)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "Змінне обмеження вивантаження (КіБ/с)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "Обмеження коефіцієнта роздачі" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "Черги" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "Розмір черги завантаження" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "Розмір черги вивантаження" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "Ігнорувати статичні (у хвилинах)" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "Загальне обмеження кількості вузлів" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "Обмеження вузлів для кожного торента" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "Повторити тестування" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "Порт відкрито" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "Порт закрито" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "Перевірка порту" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "Перевірка…" #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "Оновити" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "Чорний список" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "З’єднання" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "Порт вузла" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "Перевірити" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "Обов’язковий" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "Бажаний" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "Припустимий" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "Шифрування" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "Випадковий порт при кожному завантаженні" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "Переспрямування порту" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "Протокол" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "Обмін вузлами (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "Розподілена таблиця хешів (DHT)" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "Пошук локальних вузлів" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "Чорний список" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "Адреса чорного списку:" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "Середовище" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "Каталог завантаження" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "Каталог незавершених завантажень" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "Скрипт, який виконується по закінченні завантаження" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "Розмір кеша (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "Поведінка" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "Змінювати назву не повністю завантажених файлів" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "Вилучати початкові торент-файли" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "Розпочинати завантаження доданих торентів" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "Налаштування сервера" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "Ширина каналу" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "Обмеження" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "Помилка запиту з кодом HTTP %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "Всі" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "Вниз чергою" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "Вгору чергою" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "Завершено" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "Не завершено" #: src/trg-state-selector.c:700 msgid "Active" msgstr "Активний" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "Статистика" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "Версія" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "Всього завантажено" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "Всього віддано" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "Додано файлів" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "Кількість сеансів" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "Час роботи" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "Статистика" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "Сеанс" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "Всього" #: src/trg-status-bar.c:145 #, fuzzy, c-format msgid "Connected: %s :: Transmission %s" msgstr "З’єднання: %s (Transmission %g)" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "Оновлення торентів…" #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "Вільне місце: %s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "Вимкнути різні обмеження швидкості" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "Увімкнути різні обмеження швидкості" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr " (Обмеження: %s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "Завант.: %s%s, вивант.: %s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "Файли торентів" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "Усі файли" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" "Неможливо прочитати торент-файл. Параметри файла недоступні, але ви попри це " "можете вивантажувати дані." #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "Не вдалося відкрити файл торента: %s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(Немає)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(Декілька)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "Додати торент" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "Високий пріоритет" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "Нормальний пріоритет" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "Низький пріоритет" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "Пропустити" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "Додати торент" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "Розпочати _призупиненим" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "_Торент-файл:" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "_Тека призначення:" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "Застосувати до всіх:" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "Прі_оритетність торента:" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "Показати вікно п_араметрів" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "Ви намагаєтеся додати маґнет-торент, але DHT вимкнено. Вам слід увімкнути " "розподілену таблицю хешів (DHT) у параметрах сервера." #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "Адреса:" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "Додавати призупиненим" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "Додати торент за адресою" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "Загальна швидкість вивантаження" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "Загальна швидкість завантаження" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "Типовий" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "Розташування:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "Пересунути %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "Перемістити %d торентів" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "Дії" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "Розмір:" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "Маємо:" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "Завантажено:" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "Вивантажено:" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "Стан:" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "Тривалість роботи:" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "Залишилось часу:" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "Час останньої активності:" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "Помилка:" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "Подробиці" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "Хеш:" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "Конфіденційність:" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "Походження:" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "Коментар:" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "Лише для цього трекеру — DHT та PEX вимкнено" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "Публічний торент" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "Створено автором %1$s з вик. %2$s" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "Створено з вик. %1$s" #: src/trg-torrent-props-dialog.c:342 #, fuzzy, c-format msgid "Created by %1$s" msgstr "Створено з вик. %1$s" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "Без помилок" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "Зараз активно" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "Використовувати глобальні обмеження" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "Пріоритет торента:" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "Місце у черзі:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "Обмежити швидкість завантаження (KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "Обмежити швидкість віддачі (KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "Використовувати загальні параметри" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "Зупиняти поширення при коефіцієнті віддачі" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "Поширювати незалежно від коефіцієнта" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "Режим коефіцієнта віддачі:" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "Обмеження коефіцієнта віддачі:" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "Обмеження вузлів:" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "Властивості декількох (%d) торентів" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "Інформація" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "Виконано" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "Вузли" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "Надсилання" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "Завантаження" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "Отримання" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "З’єднано" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "Вузли PEX" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "Вузли DHT" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Вузли-координатори" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "Вузли LTEP" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "Відновлені вузли" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Вузли вхідних з’єднань" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "Вузли T/I/E/H/X/L/R" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "Додано" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "Перший координатор" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "Ід." #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "Місце у черзі" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "Останній активний" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "Рівень" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "Адреса оголошення" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "Кількість вузлів" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "Кількість п’явок" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "Останнє оголошення" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "Останній результат" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "Адреса зішкріб-запиту" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "Останній зішкріб" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "Вилучити" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "За зростанням" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "За спаданням" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "Розкрити всі" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "Згорнути всі" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "Помилка декодування JSON." #: src/util.c:347 msgid "Server responded, but with no result." msgstr "Сервер відповів, але результат не отримано." #: src/util.c:385 msgid "None" msgstr "Нічого" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d день" msgstr[1] "%d дні" msgstr[2] "%d днів" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d година" msgstr[1] "%d години" msgstr[2] "%d годин" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d хвилина" msgstr[1] "%d хвилини" msgstr[2] "%d хвилин" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld секунда" msgstr[1] "%ld секунди" msgstr[2] "%ld секунд" #~ msgid "Downloading from %1$li of %2$li connected peer" #~ msgid_plural "Downloading from %1$li of %2$li connected peers" #~ msgstr[0] "Отримуємо з %1$li з %2$li з’єднаного вузла" #~ msgstr[1] "Отримуємо з %1$li з %2$li з’єднаних вузлів" #~ msgstr[2] "Отримуємо з %1$li з %2$li з’єднаних вузлів" #~ msgid "Seeding to %1$li of %2$li connected peer" #~ msgid_plural "Seeding to %1$li of %2$li connected peers" #~ msgstr[0] "Поширюємо на %1$li з %2$li з’єднаного вузла" #~ msgstr[1] "Поширюємо на %1$li з %2$li з’єднаних вузлів" #~ msgstr[2] "Поширюємо на %1$li з %2$li з’єднаних вузлів" #~ msgid "Remove & Delete" #~ msgstr "Вилучити торент і файли" #~ msgid "Blocklist (%ld entries)" #~ msgstr "Чорний список (%ld записів)" #~ msgid "Remove with data" #~ msgstr "Вилучити з файлами" transmission-remote-gtk-1.4.1/po/zh_CN.po000066400000000000000000001165711341276053300203200ustar00rootroot00000000000000# Chinese (Simplified) translation for transmission-remote-gtk # Copyright (c) 2017 Rosetta Contributors and Canonical Ltd 2017 # This file is distributed under the same license as the transmission-remote-gtk package. # Boyuan Yang <073plan@gmail.com>, 2016. # Sasasu , 2017 # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2017-02-06 23:48+0800\n" "Last-Translator: Sasasu \n" "Language-Team: Chinese (Simplified) \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Launchpad-Export-Date: 2016-07-28 13:52+0000\n" "X-Generator: Poedit 1.8.7.1\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "Transmission 远程管理工具" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "远程管理 Transmission BT 下载客户端" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 #, fuzzy msgid "transmission-remote-gtk" msgstr "Transmission 远程管理工具" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 #, fuzzy msgid "Transmission Remote Gtk Team" msgstr "Transmission 远程管理工具" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 #, fuzzy msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" "transmission-remote-gtk 让您能够使用 Transmission BT 下载客户端的 RPC 接口进" "行远程管理。" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 #, fuzzy msgid "Features:" msgstr "功能" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 #, fuzzy msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" "远程添加(文件/URL)、启动、停止、删除任务、删除任务和文件、校验、重发布种" "子。" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 #, fuzzy msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "作为 .torrent 文件处理程序(例如,经由网页浏览器调用)。" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 #, fuzzy msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" "设置种子属性,例如速度、做种、节点限制、文件属性、添加/编辑/删除 tracker 服务" "器。" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 #, fuzzy msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "更改远程设置,例如全局限制、下载目录以及连接首选项。" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "正在下载元信息" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "正在下载" #: src/torrent.c:378 msgid "Queued download" msgstr "已加入列队的下载" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "等待检查" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "正在检查" #: src/torrent.c:384 msgid "Queued seed" msgstr "已加入列队的种子" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "做种中" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "已暂停" #: src/torrent.c:408 msgid "Unknown" msgstr "未知" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "%2$s 中 %1$s (%3$s)" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "%2$s 中 %1$s (%3$s), 已上传 %4$s (分享率:%5$s 目标:%6$s)" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "%2$s 中 %1$s (%3$s), 已上传 %4$s (分享率:%5$s)" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "%1$s,已上传 %2$s (分享比率:%3$s 目标:%4$s)" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "%1$s, 已上传 %2$s (分享比率: %3$s)" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "剩余时间未知" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "剩余时间 %s" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "%1$s %2$s,%3$s %4$s" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "空闲" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "已完成" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "已加入校验队列" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "已加入下载队列" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "已加入做种队列" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "正在校验数据 (%1$s 已检查)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "分享比率 %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "Tracker 给出一个警告:\"%s\"" #: src/torrent-cell-renderer.c:314 #, c-format msgid "Tracker gave an error: \"%s\"" msgstr "Tracker 给出一个错误:\"%s\"" #: src/torrent-cell-renderer.c:315 #, c-format msgid "Error: %s" msgstr "错误:%s" #: src/torrent-cell-renderer.c:329 msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "正在从 %1$ 下载" #: src/torrent-cell-renderer.c:337 msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "正在从 %1$ 下载元信息" #: src/torrent-cell-renderer.c:348 msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "正在为 %1$ 做种" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "一个 transmission-daemon 的远程客户端。" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "低" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "高" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "正常" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "混合" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "名称" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "大小" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "进度" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "下载" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "优先级" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "不适用" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "(私有)" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "(公共)" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "错误" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "已完成" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "估计剩余时间" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "已下载" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "做种者" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "分享率" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "已上传" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "吸血鬼" #: src/trg-general-panel.c:342 msgid "Ratio limit" msgstr "分享比率限制" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "已损坏" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "状态" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "完成于" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "位置" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "注释" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "客户端" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "启动时最小化" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "这个种子已经完成。" #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "这个种子已被添加。" #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "未设置主机名" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "获取配置时发生未知错误" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "正在连接…" #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "移除种子 “%s”?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "移除 %d 个种子?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "是否移除项目并删除种子 “%s”?" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "是否移除这些项目并删除这 %d 个种子?" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "通用" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "Trackers" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "文件" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "节点" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "本应用程序只支持 Transmission %g 或更新版本,但是您正在使用 %g。" #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "连接已断开" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "%d 下载中 @ %s" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "%d 做种中 @ %s" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "请求 %d/%d 失败: %s" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "无限制" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "属性" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "继续" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "暂停" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "校验" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "重发布" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "移动" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "移除" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 msgid "Remove and delete data" msgstr "移除并删除数据" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "操作" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "现在开始" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "向上移动" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "向下移动" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "移至队列底部" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "移至队列顶部" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "下载限速" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "上传限速" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "正在更新.…" #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "连接" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "断开连接" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "添加" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "从 URL 添加" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "全部继续" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "全部暂停" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "退出" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "图表" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "查看(_V)" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "Transmission 风格" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "Transmission 紧凑风格" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "经典风格" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "排序" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "状态过滤器" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "目录过滤器" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "Tracker 过滤器" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 msgid "Directories first" msgstr "先显示目录" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "种子细节" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "统计信息(_S)" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "简易信息聚合(_R)" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "选项(_O)" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "本地首选项(_L)" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "远程首选项(_R)" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "文件(_F)" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "断开连接(_D)" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "添加(_A)" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "从 URL 添加(_U)" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "退出(_Q)" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "种子(_T)" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "续传(_R)" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "暂停(_P)" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "校验(_V)" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "重发布(_A)" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "移动(_M)" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "全部继续(_R)" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "全部暂停(_P)" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "帮助(_H)" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "关于(_A)" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "主机" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "国家" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "城市" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "下载速度" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "上传速度" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "标识" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "信息更新" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "只更新活跃种子的信息" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "每(?)次更新进行一次完整更新" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "更新间隔:" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "最小化时的更新间隔:" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "会话更新间隔:" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "种子" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "将新添加任务置为暂停状态" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "为新添加任务打开选项对话框" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "添加后删除本地 .torrent 文件" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "命令" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "标签" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "命令" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 msgid "RSS Feeds" msgstr "RSS Feeds" #: src/trg-preferences-dialog.c:656 msgid "URL" msgstr "URL" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "远程下载目录" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "目录" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "视图" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "显示图表" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "系统托盘" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "在系统托盘中显示(需要在 unity 中具有白名单)" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "在系统托盘显示" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "最小化至系统托盘" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "通知" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "种子添加通知" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "种子完成通知" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "配置文件: " #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "名称:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "连接" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "主机:" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "端口:" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "RPC URL 路径:" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "用户名:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "密码:" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "自动连接" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "SSL" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "验证 SSL 证书" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "超时:" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "重试次数:" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "本地首选项" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "目录" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "状态" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "带宽限制" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "下行限制 (KiB/s)" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "上行限制 (KiB/s)" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "临时限制" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "启用临时速度限制" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "临时限制时间范围" #: src/trg-remote-prefs-dialog.c:403 #, fuzzy msgid "Alternate days" msgstr "临时限制" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "临时下载限制 (KiB/s)" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "临时上传限制 (KiB/s)" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "种子分享比率限制" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "队列" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "下载队列大小" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "做种队列大小" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "忽略无速度种子(分钟)" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "全局节点限制" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "单个种子节点限制" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "再次测试" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "端口 开放" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "端口 关闭" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "端口测试" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "正在测试…" #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "更新" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 #, fuzzy msgid "Blocklist (%" msgstr "黑名单" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "连接" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "端口" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "测试" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "必需" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "偏好" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "容忍" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "加密" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "在启动时选择随机端口" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "对等端口转发(UPnP)" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "协议" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "节点交换 (PEX)" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "分布式哈希表(DHT)" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "本地节点发现" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "黑名单" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "黑名单 URL" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "运行环境" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "下载目录" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "未完成下载目录" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "种子完成后运行脚本" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "缓存大小 (MiB)" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "行为" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "重命名部分完成的文件" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "删除原始种子文件" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "添加种子后立即开始任务" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "远程首选项" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "带宽" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "限制" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "请求失败,HTTP 代码 %d" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "处理 RSS 订阅失败 \"%s\": %s" #: src/trg-state-selector.c:675 msgid "All" msgstr "全部" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "下载队列" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "上传队列" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "已完成" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "未完成" #: src/trg-state-selector.c:700 msgid "Active" msgstr "活跃" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "统计信息" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "版本" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "下载总计" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "上传总计" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "文件已添加" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "会话数" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "活动时间" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "统计信息" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "会话" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "累计" #: src/trg-status-bar.c:145 #, c-format msgid "Connected: %s :: Transmission %s" msgstr "已连接:%s :: Transmission %s" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "上传种子..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "可用空间:%s" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "禁用临时速度限制" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "启用临时速度限制" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr "(限制:%s)" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "下载:%s%s,上传:%s%s" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "种子文件" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "所有文件" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "无法解析种子文件。文件选项不可用但你依然可以尝试上传" #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "无法打开种子文件:%s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "(无)" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "(多个)" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "添加一个种子" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "高优先级" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "普通优先级" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "低优先级" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "跳过" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "添加种子" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "启动已暂停的任务(_P)" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "种子文件(_T):" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "目标文件夹(_D):" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "应用于全部" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "种子优先级(_P):" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "显示选项对话框(_O)" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "你正在添加一个磁力连接,但是 DHT 被禁用,分布式哈希表 (DHT) 应该在远程设置中" "开启" #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "将新添加任务置为暂停状态" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "从 URL 地址添加种子" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "上传总计" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "下载总计" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "默认" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "位置:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "移动 %s" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "移动 %d 个种子" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "活动" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "种子大小:" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "具有:" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "已下载:" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "已上传:" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "状态:" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "运行时间:" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "剩余时间:" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "上次活动:" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "错误:" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "详细信息" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "哈希:" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "隐私" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "来源" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "备注:" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "私有 tracker -- DHT 和 PEX 已被禁用" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "公共种子" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "由 %1$s 在 %2$s 创建" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "创建于 %1$s" #: src/trg-torrent-props-dialog.c:342 #, c-format msgid "Created by %1$s" msgstr "由 %1$s 创建" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "无错误" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "当前活跃" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "同全局设置" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "种子优先级:" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "队列位置:" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "下载速度限制(KiB/s)" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "上传速度限制(KiB/s)" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "使用全局设置" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "达到指定比率后停止做种" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "无视比率进行做种" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "做种率模式:" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "做种比率限制:" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "节点限制:" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "多个种子 (%d) 属性" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "信息" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "完成" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "种子" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "正在发送" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "下载内容" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "正在接收" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "已连接" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "PEX 节点" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "DHT 节点" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "Tracker 节点" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "LTEP 节点" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "Resumed 节点" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "Incoming 节点" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "T/I/E/H/X/L/R 节点" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "添加时间" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "第一个 Tracker" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "队列位置" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "最近活动" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "序号" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "Tracker服务器 URL" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "种子数" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "吸血鬼数" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "最后发布" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "最近结果" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "访问 URL" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "最近访问" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "删除" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "升序" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "降序" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "全部展开" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "全部收起" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "JSON 解码错误。" #: src/util.c:347 msgid "Server responded, but with no result." msgstr "服务器已回应,但是没有给出结果。" #: src/util.c:385 msgid "None" msgstr "无" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "%d 天" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "%d 小时" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "%d 分钟" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "%ld 秒" # G_GINT64_FORMAT is %li not %ld #~ msgid "Blocklist (%li entries)" #~ msgstr "黑名单 (%li 条)" transmission-remote-gtk-1.4.1/po/zh_TW.po000066400000000000000000001075441341276053300203520ustar00rootroot00000000000000# Chinese (Traditional) translation for transmission-remote-gtk # Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 # This file is distributed under the same license as the transmission-remote-gtk package. # FIRST AUTHOR , 2012. # msgid "" msgstr "" "Project-Id-Version: transmission-remote-gtk\n" "Report-Msgid-Bugs-To: https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/issues\n" "POT-Creation-Date: 2018-11-02 17:13-0400\n" "PO-Revision-Date: 2012-10-22 07:06+0000\n" "Last-Translator: Walter Cheuk \n" "Language-Team: Chinese (Traditional) \n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Launchpad-Export-Date: 2014-06-12 07:44+0000\n" "X-Generator: Launchpad (build 17045)\n" #: data/io.github.TransmissionRemoteGtk.desktop.in:3 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:8 #: src/trg-main-window.c:2736 msgid "Transmission Remote" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:4 #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:10 msgid "Remotely manage the Transmission BitTorrent client" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:6 msgid "transmission-remote-gtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.desktop.in:11 msgid "p2p;bittorrent;transmission;rpc;" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:9 msgid "Transmission Remote Gtk Team" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:14 msgid "" "Transmission Remote Gtk allows you to remotely manage the Transmission " "BitTorrent client using its RPC interface." msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:17 msgid "Features:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:19 msgid "" "Remotely add (file/url), start, stop, remove, remove and delete, verify, " "reannounce torrents" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:20 msgid "Works as a .torrent handler (eg. from a web browser)" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:21 msgid "" "Set torrent properties such as speed, seed, peer limits, file priorities, " "add/edit/remove trackers" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:22 msgid "" "Change remote settings like global limits, download directory, and " "connectivity preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:33 msgid "This is a minor release with some improvements:" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:35 msgid "Rename app-id to io.github.TransmissionRemoteGtk" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:36 msgid "Add configuration of alternate speed days to preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:37 msgid "Add menu option to copy magnet links" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:38 msgid "Add Ctrl+q keybinding to quit" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:39 msgid "Fix building with GeoIP support" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:40 msgid "Fix setting speeds in preferences" msgstr "" #: data/io.github.TransmissionRemoteGtk.appdata.xml.in:41 msgid "Improve search behavior in file view" msgstr "" #: src/torrent.c:374 src/torrent.c:394 msgid "Metadata Downloading" msgstr "" #: src/torrent.c:376 src/torrent.c:396 src/trg-state-selector.c:677 msgid "Downloading" msgstr "下載中" #: src/torrent.c:378 msgid "Queued download" msgstr "已排隊的下載" #: src/torrent.c:380 src/torrent.c:404 msgid "Waiting To Check" msgstr "等待檢查中" #: src/torrent.c:382 src/torrent.c:402 src/trg-state-selector.c:703 msgid "Checking" msgstr "檢查中" #: src/torrent.c:384 msgid "Queued seed" msgstr "已排隊的種子" #: src/torrent.c:386 src/torrent.c:400 src/trg-remote-prefs-dialog.c:428 #: src/trg-state-selector.c:684 src/trg-torrent-props-dialog.c:446 msgid "Seeding" msgstr "作種中" #: src/torrent.c:388 src/torrent.c:398 src/torrent-cell-renderer.c:282 #: src/trg-state-selector.c:691 msgid "Paused" msgstr "已暫停" #: src/torrent.c:408 msgid "Unknown" msgstr "未知" #. %1$s is how much we've got, #. %2$s is how much we'll have when done, #. %3$s%% is a percentage of the two #: src/torrent-cell-renderer.c:154 #, c-format msgid "%1$s of %2$s (%3$s)" msgstr "" #: src/torrent-cell-renderer.c:164 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)" msgstr "" #: src/torrent-cell-renderer.c:180 #, c-format msgid "%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)" msgstr "" #: src/torrent-cell-renderer.c:197 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)" msgstr "%1$s,已上傳 %2$s (分享率:%3$s 目標:%4$s)" #. %1$s is the torrent's total size, #. %2$s is how much we've uploaded, #. %3$s is our upload-to-download ratio #: src/torrent-cell-renderer.c:211 #, c-format msgid "%1$s, uploaded %2$s (Ratio: %3$s)" msgstr "%1$s,已上傳 %2$s(分享率:%3$s)" #: src/torrent-cell-renderer.c:227 msgid "Remaining time unknown" msgstr "未知剩餘時間" #. time remaining #: src/torrent-cell-renderer.c:232 #, c-format msgid "%s remaining" msgstr "" #. 1==down arrow, 2==down speed, 3==up arrow, 4==down speed #: src/torrent-cell-renderer.c:256 #, c-format msgid "%1$s %2$s, %3$s %4$s" msgstr "" #. bandwidth speed + unicode arrow #: src/torrent-cell-renderer.c:260 src/torrent-cell-renderer.c:263 #, c-format msgid "%1$s %2$s" msgstr "" #: src/torrent-cell-renderer.c:267 msgid "Idle" msgstr "閒置" #: src/torrent-cell-renderer.c:281 msgid "Finished" msgstr "已完成" #: src/torrent-cell-renderer.c:284 msgid "Queued for verification" msgstr "排隊檢驗" #: src/torrent-cell-renderer.c:286 msgid "Queued for download" msgstr "排隊等候下載" #: src/torrent-cell-renderer.c:288 msgid "Queued for seeding" msgstr "排隊等候作種" #: src/torrent-cell-renderer.c:291 #, c-format msgid "Verifying data (%1$s tested)" msgstr "正在校驗資料(%1$s 已檢驗)" #: src/torrent-cell-renderer.c:299 #, c-format msgid "Ratio %s" msgstr "分享率 %s" #: src/torrent-cell-renderer.c:313 #, c-format msgid "Tracker gave a warning: \"%s\"" msgstr "" #: src/torrent-cell-renderer.c:314 #, fuzzy, c-format msgid "Tracker gave an error: \"%s\"" msgstr "追蹤器用戶" #: src/torrent-cell-renderer.c:315 #, c-format msgid "Error: %s" msgstr "" #: src/torrent-cell-renderer.c:329 #, fuzzy msgid "Downloading from %1$" msgid_plural "Downloading from %1$" msgstr[0] "下載中" #: src/torrent-cell-renderer.c:337 msgid "Downloading metadata from %1$" msgid_plural "Downloading metadata from %1$" msgstr[0] "" #: src/torrent-cell-renderer.c:348 #, fuzzy msgid "Seeding to %1$" msgid_plural "Seeding to %1$" msgstr[0] "作種中" #: src/trg-about-window.c:59 msgid "A remote client to transmission-daemon." msgstr "一個 transmission-daemon 的遠端客戶端" #: src/trg-cell-renderer-priority.c:78 src/trg-general-panel.c:202 #: src/trg-main-window.c:2095 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:415 msgid "Low" msgstr "低" #: src/trg-cell-renderer-priority.c:80 src/trg-general-panel.c:208 #: src/trg-main-window.c:2091 src/trg-torrent-add-dialog.c:383 #: src/trg-torrent-props-dialog.c:417 msgid "High" msgstr "高" #: src/trg-cell-renderer-priority.c:82 src/trg-general-panel.c:205 #: src/trg-main-window.c:2093 src/trg-torrent-add-dialog.c:382 #: src/trg-torrent-props-dialog.c:416 msgid "Normal" msgstr "一般" #: src/trg-cell-renderer-priority.c:84 msgid "Mixed" msgstr "" #: src/trg-files-tree-view.c:207 src/trg-general-panel.c:316 #: src/trg-preferences-dialog.c:653 src/trg-torrent-add-dialog.c:284 #: src/trg-torrent-tree-view.c:56 msgid "Name" msgstr "名稱" #. add "size" column #: src/trg-files-tree-view.c:211 src/trg-general-panel.c:319 #: src/trg-torrent-add-dialog.c:302 src/trg-torrent-tree-view.c:61 msgid "Size" msgstr "大小" #: src/trg-files-tree-view.c:213 src/trg-peers-tree-view.c:74 msgid "Progress" msgstr "進度" #. add "enabled" column #: src/trg-files-tree-view.c:215 src/trg-torrent-add-dialog.c:315 #: src/trg-torrent-add-dialog.c:665 src/trg-files-tree-view-common.c:69 msgid "Download" msgstr "下載" #. add priority column #: src/trg-files-tree-view.c:217 src/trg-general-panel.c:349 #: src/trg-main-window.c:2084 src/trg-torrent-add-dialog.c:331 #: src/trg-torrent-tree-view.c:149 msgid "Priority" msgstr "優先權" #: src/trg-general-panel.c:176 src/trg-general-panel.c:250 #: src/trg-torrent-props-dialog.c:344 src/util.c:487 msgid "N/A" msgstr "" #: src/trg-general-panel.c:194 msgid "(Private)" msgstr "" #: src/trg-general-panel.c:194 msgid "(Public)" msgstr "" #: src/trg-general-panel.c:238 src/trg-main-window.c:1156 #: src/trg-main-window.c:1569 src/trg-main-window.c:2219 #: src/trg-rss-window.c:207 src/trg-rss-window.c:221 #: src/trg-state-selector.c:557 src/trg-torrent-add-url-dialog.c:71 #: src/util.c:333 msgid "Error" msgstr "" #: src/trg-general-panel.c:321 msgid "Rate Down" msgstr "下載速率" #: src/trg-general-panel.c:323 src/trg-torrent-tree-view.c:155 msgid "Completed" msgstr "已完成" #: src/trg-general-panel.c:326 src/trg-torrent-tree-view.c:127 msgid "ETA" msgstr "預估剩餘時間" #: src/trg-general-panel.c:328 msgid "Rate Up" msgstr "上傳速率" #: src/trg-general-panel.c:330 src/trg-torrent-tree-view.c:132 msgid "Downloaded" msgstr "已下載" #: src/trg-general-panel.c:333 msgid "Seeders" msgstr "種子數" #: src/trg-general-panel.c:335 src/trg-stats-dialog.c:321 #: src/trg-torrent-tree-view.c:135 msgid "Ratio" msgstr "分享率" #: src/trg-general-panel.c:337 src/trg-torrent-tree-view.c:129 msgid "Uploaded" msgstr "" #: src/trg-general-panel.c:340 src/trg-torrent-tree-view.c:74 msgid "Leechers" msgstr "下載數" #: src/trg-general-panel.c:342 #, fuzzy msgid "Ratio limit" msgstr "種子分享率限制" #: src/trg-general-panel.c:344 msgid "Corrupted" msgstr "" #: src/trg-general-panel.c:347 src/trg-torrent-tree-view.c:67 msgid "Status" msgstr "狀態" #: src/trg-general-panel.c:351 msgid "Completed At" msgstr "完成時間" #: src/trg-general-panel.c:354 src/trg-torrent-tree-view.c:143 msgid "Location" msgstr "位置" #: src/trg-general-panel.c:357 msgid "Comment" msgstr "備註" #: src/trg-gtk-app.c:183 src/trg-peers-tree-view.c:78 msgid "Client" msgstr "" #: src/trg-gtk-app.c:192 msgid "Min On Start" msgstr "" #: src/trg-main-window.c:368 msgid "This torrent has completed." msgstr "這個種子已經完成。" #: src/trg-main-window.c:380 msgid "This torrent has been added." msgstr "這個種子已經被加入。" #: src/trg-main-window.c:624 msgid "No hostname set" msgstr "" #: src/trg-main-window.c:627 msgid "Unknown error getting settings" msgstr "" #: src/trg-main-window.c:647 msgid "Connecting..." msgstr "正在連線..." #: src/trg-main-window.c:916 #, c-format msgid "Remove torrent \"%s\"?" msgstr "要移除種子 \"%s\"嗎?" #: src/trg-main-window.c:917 #, c-format msgid "Remove %d torrents?" msgstr "要移除 %d 個種子嗎?" #: src/trg-main-window.c:939 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "" #: src/trg-main-window.c:941 #, c-format msgid "Remove and delete %d torrents?" msgstr "" #: src/trg-main-window.c:1040 src/trg-preferences-dialog.c:947 #: src/trg-remote-prefs-dialog.c:761 msgid "General" msgstr "一般" #: src/trg-main-window.c:1049 src/trg-torrent-props-dialog.c:621 msgid "Trackers" msgstr "追蹤器" #: src/trg-main-window.c:1057 src/trg-torrent-props-dialog.c:590 msgid "Files" msgstr "檔案" #: src/trg-main-window.c:1065 src/trg-remote-prefs-dialog.c:467 #: src/trg-torrent-props-dialog.c:464 src/trg-torrent-props-dialog.c:604 #: src/trg-trackers-tree-view.c:194 msgid "Peers" msgstr "用戶" #: src/trg-main-window.c:1148 #, c-format msgid "This application supports Transmission %g and later, you have %g." msgstr "" #: src/trg-main-window.c:1214 src/trg-status-bar.c:78 src/trg-status-bar.c:108 msgid "Disconnected" msgstr "已斷線" #: src/trg-main-window.c:1259 #, c-format msgid "%d Downloading @ %s" msgstr "" #: src/trg-main-window.c:1266 #, c-format msgid "%d Seeding @ %s" msgstr "" #: src/trg-main-window.c:1317 #, c-format msgid "Request %d/%d failed: %s" msgstr "" #: src/trg-main-window.c:2139 msgid "No Limit" msgstr "" #: src/trg-main-window.c:2240 src/trg-menu-bar.c:720 src/trg-toolbar.c:228 msgid "Properties" msgstr "" #: src/trg-main-window.c:2243 msgid "Copy Magnet Link" msgstr "" #: src/trg-main-window.c:2246 src/trg-toolbar.c:221 msgid "Resume" msgstr "" #: src/trg-main-window.c:2249 src/trg-toolbar.c:224 msgid "Pause" msgstr "暫停" #: src/trg-main-window.c:2252 msgid "Verify" msgstr "校驗" #: src/trg-main-window.c:2255 msgid "Re-announce" msgstr "重新發佈" #: src/trg-main-window.c:2258 src/trg-torrent-move-dialog.c:122 #: src/trg-torrent-move-dialog.c:129 msgid "Move" msgstr "" #: src/trg-main-window.c:2261 src/trg-menu-bar.c:756 src/trg-toolbar.c:232 msgid "Remove" msgstr "" #: src/trg-main-window.c:2264 src/trg-menu-bar.c:762 src/trg-toolbar.c:236 msgid "Remove and delete data" msgstr "" #: src/trg-main-window.c:2288 src/trg-preferences-dialog.c:957 msgid "Actions" msgstr "" #: src/trg-main-window.c:2317 src/trg-menu-bar.c:772 msgid "Start Now" msgstr "" #: src/trg-main-window.c:2320 src/trg-menu-bar.c:777 msgid "Move Up Queue" msgstr "" #: src/trg-main-window.c:2323 src/trg-menu-bar.c:784 msgid "Move Down Queue" msgstr "" #: src/trg-main-window.c:2326 src/trg-menu-bar.c:791 msgid "Bottom Of Queue" msgstr "" #: src/trg-main-window.c:2329 src/trg-menu-bar.c:795 msgid "Top Of Queue" msgstr "" #: src/trg-main-window.c:2338 src/trg-main-window.c:2421 msgid "Down Limit" msgstr "" #: src/trg-main-window.c:2343 src/trg-main-window.c:2425 msgid "Up Limit" msgstr "" #: src/trg-main-window.c:2372 src/trg-main-window.c:2379 #: src/trg-remote-prefs-dialog.c:565 msgid "Updating..." msgstr "" #: src/trg-main-window.c:2393 src/trg-menu-bar.c:677 src/trg-toolbar.c:200 msgid "Connect" msgstr "連線" #: src/trg-main-window.c:2400 src/trg-toolbar.c:211 msgid "Disconnect" msgstr "斷線" #: src/trg-main-window.c:2404 src/trg-toolbar.c:214 #: src/trg-trackers-tree-view.c:288 src/trg-trackers-tree-view.c:315 msgid "Add" msgstr "加入" #: src/trg-main-window.c:2408 msgid "Add from URL" msgstr "從網址加入" #: src/trg-main-window.c:2412 msgid "Resume All" msgstr "" #: src/trg-main-window.c:2416 msgid "Pause All" msgstr "全部暫停" #: src/trg-main-window.c:2432 msgid "Quit" msgstr "結束" #: src/trg-main-window.c:2546 src/trg-menu-bar.c:571 msgid "Graph" msgstr "圖表" #: src/trg-menu-bar.c:491 msgid "_View" msgstr "檢視(_V)" #: src/trg-menu-bar.c:500 msgid "Transmission Style" msgstr "" #: src/trg-menu-bar.c:510 msgid "Transmission Compact Style" msgstr "" #: src/trg-menu-bar.c:520 msgid "Classic Style" msgstr "" #: src/trg-menu-bar.c:526 msgid "Sort" msgstr "" #: src/trg-menu-bar.c:531 src/trg-preferences-dialog.c:718 msgid "State selector" msgstr "狀態選擇器" #: src/trg-menu-bar.c:537 src/trg-preferences-dialog.c:725 msgid "Directory filters" msgstr "" #: src/trg-menu-bar.c:546 src/trg-preferences-dialog.c:732 msgid "Tracker filters" msgstr "追蹤器過濾" #: src/trg-menu-bar.c:555 src/trg-preferences-dialog.c:739 msgid "Directories first" msgstr "" #: src/trg-menu-bar.c:563 src/trg-preferences-dialog.c:746 msgid "Torrent Details" msgstr "種子詳細資訊" #: src/trg-menu-bar.c:577 msgid "_Statistics" msgstr "" #: src/trg-menu-bar.c:584 msgid "_RSS" msgstr "" #: src/trg-menu-bar.c:597 msgid "_Options" msgstr "選項 (_O)" #: src/trg-menu-bar.c:603 msgid "_Local Preferences" msgstr "本地偏好設定(_L)" #: src/trg-menu-bar.c:610 msgid "_Remote Preferences" msgstr "遠端偏好設定(_R)" #: src/trg-menu-bar.c:670 msgid "_File" msgstr "檔案(_F)" #: src/trg-menu-bar.c:683 msgid "_Disconnect" msgstr "切斷連線(_D)" #: src/trg-menu-bar.c:689 msgid "_Add" msgstr "加入(_A)" #: src/trg-menu-bar.c:694 msgid "Add from _URL" msgstr "從網址加入(_U)" #: src/trg-menu-bar.c:700 msgid "_Quit" msgstr "結束〈_Q〉" #: src/trg-menu-bar.c:713 msgid "_Torrent" msgstr "種子 (_T)" #: src/trg-menu-bar.c:725 msgid "_Copy Magnet Link" msgstr "" #: src/trg-menu-bar.c:730 msgid "_Resume" msgstr "" #: src/trg-menu-bar.c:735 msgid "_Pause" msgstr "暫停(_P)" #: src/trg-menu-bar.c:740 msgid "_Verify" msgstr "校驗〈_V〉" #: src/trg-menu-bar.c:746 msgid "Re-_announce" msgstr "重新發佈〈_A〉" #: src/trg-menu-bar.c:751 msgid "_Move" msgstr "" #: src/trg-menu-bar.c:803 msgid "_Resume All" msgstr "" #: src/trg-menu-bar.c:809 msgid "_Pause All" msgstr "暫停全部(_P)" #: src/trg-menu-bar.c:821 msgid "_Help" msgstr "說明 (_H)" #: src/trg-menu-bar.c:827 msgid "_About" msgstr "關於(_A)" #: src/trg-peers-tree-view.c:54 msgid "IP" msgstr "" #: src/trg-peers-tree-view.c:58 src/trg-trackers-tree-view.c:213 msgid "Host" msgstr "" #: src/trg-peers-tree-view.c:63 msgid "Country" msgstr "" #: src/trg-peers-tree-view.c:67 msgid "City" msgstr "" #: src/trg-peers-tree-view.c:70 src/trg-torrent-tree-view.c:121 msgid "Down Speed" msgstr "" #: src/trg-peers-tree-view.c:72 src/trg-torrent-tree-view.c:124 msgid "Up Speed" msgstr "" #: src/trg-peers-tree-view.c:76 msgid "Flags" msgstr "" #: src/trg-preferences-dialog.c:409 msgid "Updates" msgstr "" #: src/trg-preferences-dialog.c:411 msgid "Update active torrents only" msgstr "只更新活動中的種子" #: src/trg-preferences-dialog.c:418 msgid "Full update every (?) updates" msgstr "" #: src/trg-preferences-dialog.c:432 msgid "Update interval:" msgstr "" #: src/trg-preferences-dialog.c:436 msgid "Minimised update interval:" msgstr "" #: src/trg-preferences-dialog.c:441 msgid "Session update interval:" msgstr "" #: src/trg-preferences-dialog.c:443 msgid "Torrents" msgstr "種子" #: src/trg-preferences-dialog.c:445 msgid "Start paused" msgstr "" #: src/trg-preferences-dialog.c:449 msgid "Options dialog on add" msgstr "" #: src/trg-preferences-dialog.c:454 src/trg-torrent-add-dialog.c:737 msgid "Delete local .torrent file after adding" msgstr "新增後刪除本地端的 .torrent 檔" #: src/trg-preferences-dialog.c:607 msgid "Commands" msgstr "" #: src/trg-preferences-dialog.c:617 src/trg-preferences-dialog.c:691 msgid "Label" msgstr "" #: src/trg-preferences-dialog.c:620 msgid "Command" msgstr "" #: src/trg-preferences-dialog.c:643 src/trg-preferences-dialog.c:968 #: src/trg-rss-window.c:274 msgid "RSS Feeds" msgstr "" #: src/trg-preferences-dialog.c:656 msgid "URL" msgstr "" #: src/trg-preferences-dialog.c:681 msgid "Remote Download Directories" msgstr "遠端下載目錄" #: src/trg-preferences-dialog.c:694 msgid "Directory" msgstr "" #: src/trg-preferences-dialog.c:716 src/trg-preferences-dialog.c:952 msgid "View" msgstr "檢視" #: src/trg-preferences-dialog.c:754 msgid "Show graph" msgstr "顯示圖表" #: src/trg-preferences-dialog.c:761 msgid "System Tray" msgstr "" #: src/trg-preferences-dialog.c:764 msgid "Show in system tray (needs whitelisting in unity)" msgstr "" #: src/trg-preferences-dialog.c:766 msgid "Show in system tray" msgstr "" #: src/trg-preferences-dialog.c:776 msgid "Minimise to system tray" msgstr "" #: src/trg-preferences-dialog.c:786 msgid "Notifications" msgstr "" #: src/trg-preferences-dialog.c:788 msgid "Torrent added notifications" msgstr "種子已新增通知" #: src/trg-preferences-dialog.c:792 msgid "Torrent complete notifications" msgstr "種子已完成通知" #: src/trg-preferences-dialog.c:819 msgid "Profile: " msgstr "" #: src/trg-preferences-dialog.c:845 msgid "Name:" msgstr "名稱:" #: src/trg-preferences-dialog.c:850 src/trg-preferences-dialog.c:942 msgid "Connection" msgstr "連線" #: src/trg-preferences-dialog.c:853 msgid "Host:" msgstr "" #: src/trg-preferences-dialog.c:857 msgid "Port:" msgstr "" #: src/trg-preferences-dialog.c:859 msgid "RPC URL Path:" msgstr "" #: src/trg-preferences-dialog.c:862 msgid "Username:" msgstr "使用者名稱:" #: src/trg-preferences-dialog.c:866 msgid "Password:" msgstr "" #: src/trg-preferences-dialog.c:868 msgid "Automatically connect" msgstr "自動連線" #: src/trg-preferences-dialog.c:874 msgid "SSL" msgstr "" #: src/trg-preferences-dialog.c:877 msgid "Validate SSL Certificate" msgstr "" #: src/trg-preferences-dialog.c:885 msgid "Timeout:" msgstr "" #: src/trg-preferences-dialog.c:889 msgid "Retries:" msgstr "" #: src/trg-preferences-dialog.c:931 src/trg-toolbar.c:243 msgid "Local Preferences" msgstr "本地偏好設定" #: src/trg-preferences-dialog.c:962 msgid "Directories" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Sun" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Mon" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Tue" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Wed" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Thu" msgstr "" #: src/trg-remote-prefs-dialog.c:322 msgid "Fri" msgstr "" #: src/trg-remote-prefs-dialog.c:322 #, fuzzy msgid "Sat" msgstr "狀態" #: src/trg-remote-prefs-dialog.c:369 msgid "Bandwidth limits" msgstr "" #: src/trg-remote-prefs-dialog.c:373 msgid "Down Limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:380 msgid "Up Limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:385 msgid "Alternate limits" msgstr "" #: src/trg-remote-prefs-dialog.c:390 msgid "Alternate speed limits active" msgstr "" #: src/trg-remote-prefs-dialog.c:397 msgid "Alternate time range" msgstr "" #: src/trg-remote-prefs-dialog.c:403 msgid "Alternate days" msgstr "" #: src/trg-remote-prefs-dialog.c:408 msgid "Alternate down limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:413 msgid "Alternate up limit (KiB/s)" msgstr "" #: src/trg-remote-prefs-dialog.c:432 msgid "Seed ratio limit" msgstr "種子分享率限制" #: src/trg-remote-prefs-dialog.c:439 msgid "Queues" msgstr "" #: src/trg-remote-prefs-dialog.c:443 msgid "Download queue size" msgstr "下載佇列大小" #: src/trg-remote-prefs-dialog.c:451 msgid "Seed queue size" msgstr "" #: src/trg-remote-prefs-dialog.c:459 msgid "Ignore stalled (minutes)" msgstr "" #: src/trg-remote-prefs-dialog.c:472 msgid "Global peer limit" msgstr "全域連線限制" #: src/trg-remote-prefs-dialog.c:477 msgid "Per torrent peer limit" msgstr "每個種子的連接數限制" #: src/trg-remote-prefs-dialog.c:490 msgid "Retest" msgstr "" #: src/trg-remote-prefs-dialog.c:501 msgid "Port is open" msgstr "" #: src/trg-remote-prefs-dialog.c:505 msgid "Port is closed" msgstr "" #: src/trg-remote-prefs-dialog.c:521 src/trg-remote-prefs-dialog.c:590 msgid "Port test" msgstr "" #: src/trg-remote-prefs-dialog.c:522 msgid "Testing..." msgstr "" #: src/trg-remote-prefs-dialog.c:537 src/trg-remote-prefs-dialog.c:645 msgid "Update" msgstr "" #: src/trg-remote-prefs-dialog.c:542 src/trg-remote-prefs-dialog.c:636 msgid "Blocklist (%" msgstr "" #: src/trg-remote-prefs-dialog.c:584 src/trg-remote-prefs-dialog.c:766 msgid "Connections" msgstr "連線" #: src/trg-remote-prefs-dialog.c:588 msgid "Peer port" msgstr "使用的連接埠" #: src/trg-remote-prefs-dialog.c:591 msgid "Test" msgstr "" #: src/trg-remote-prefs-dialog.c:595 msgid "Required" msgstr "" #: src/trg-remote-prefs-dialog.c:596 msgid "Preferred" msgstr "" #: src/trg-remote-prefs-dialog.c:597 msgid "Tolerated" msgstr "" #: src/trg-remote-prefs-dialog.c:608 msgid "Encryption" msgstr "" #: src/trg-remote-prefs-dialog.c:612 msgid "Random peer port on start" msgstr "啟動時使用隨機連接埠" #: src/trg-remote-prefs-dialog.c:617 msgid "Peer port forwarding" msgstr "連接埠轉發" #: src/trg-remote-prefs-dialog.c:620 msgid "Protocol" msgstr "" #: src/trg-remote-prefs-dialog.c:623 msgid "Peer exchange (PEX)" msgstr "用戶交換〈PEX〉" #: src/trg-remote-prefs-dialog.c:627 msgid "Distributed Hash Table (DHT)" msgstr "" #: src/trg-remote-prefs-dialog.c:631 msgid "Local peer discovery" msgstr "" #: src/trg-remote-prefs-dialog.c:634 msgid "Blocklist" msgstr "" #: src/trg-remote-prefs-dialog.c:654 msgid "Blocklist URL:" msgstr "" #: src/trg-remote-prefs-dialog.c:672 msgid "Environment" msgstr "" #: src/trg-remote-prefs-dialog.c:676 msgid "Download directory" msgstr "下載目錄" #: src/trg-remote-prefs-dialog.c:680 msgid "Incomplete download dir" msgstr "未完成下載目錄" #: src/trg-remote-prefs-dialog.c:687 msgid "Torrent done script" msgstr "種子完成後要執行的腳本" #: src/trg-remote-prefs-dialog.c:696 msgid "Cache size (MiB)" msgstr "快取大小〈 MiB〉" #: src/trg-remote-prefs-dialog.c:699 msgid "Behavior" msgstr "" #: src/trg-remote-prefs-dialog.c:703 msgid "Rename partial files" msgstr "" #: src/trg-remote-prefs-dialog.c:708 msgid "Trash original torrent files" msgstr "" #: src/trg-remote-prefs-dialog.c:713 msgid "Start added torrents" msgstr "啟動已新增的種子" #: src/trg-remote-prefs-dialog.c:739 src/trg-toolbar.c:247 msgid "Remote Preferences" msgstr "遠端偏好設定" #: src/trg-remote-prefs-dialog.c:771 src/trg-torrent-props-dialog.c:408 msgid "Bandwidth" msgstr "" #: src/trg-remote-prefs-dialog.c:776 src/trg-torrent-props-dialog.c:635 msgid "Limits" msgstr "" #: src/trg-rss-window.c:197 src/util.c:351 #, c-format msgid "Request failed with HTTP code %d" msgstr "" #: src/trg-rss-window.c:214 #, c-format msgid "Error parsing RSS feed \"%s\": %s" msgstr "" #: src/trg-state-selector.c:675 msgid "All" msgstr "" #: src/trg-state-selector.c:680 src/trg-state-selector.c:753 msgid "Queue Down" msgstr "" #: src/trg-state-selector.c:687 src/trg-state-selector.c:757 msgid "Queue Up" msgstr "" #: src/trg-state-selector.c:694 msgid "Complete" msgstr "完成" #: src/trg-state-selector.c:697 msgid "Incomplete" msgstr "未完成" #: src/trg-state-selector.c:700 msgid "Active" msgstr "活動中" #: src/trg-stats-dialog.c:296 msgid "Statistics" msgstr "" #: src/trg-stats-dialog.c:315 msgid "Version" msgstr "" #: src/trg-stats-dialog.c:317 msgid "Download Total" msgstr "總計下載" #: src/trg-stats-dialog.c:319 msgid "Upload Total" msgstr "總計上傳" #: src/trg-stats-dialog.c:323 msgid "Files Added" msgstr "" #: src/trg-stats-dialog.c:325 msgid "Session Count" msgstr "" #: src/trg-stats-dialog.c:327 msgid "Time Active" msgstr "" #: src/trg-stats-dialog.c:332 msgid "Statistic" msgstr "" #: src/trg-stats-dialog.c:334 msgid "Session" msgstr "" #: src/trg-stats-dialog.c:337 msgid "Cumulative" msgstr "" #: src/trg-status-bar.c:145 #, fuzzy, c-format msgid "Connected: %s :: Transmission %s" msgstr "已連線:%s 〈Transmission %g〉" #: src/trg-status-bar.c:163 msgid "Updating torrents..." msgstr "正在更新種子..." #: src/trg-status-bar.c:176 #, c-format msgid "Free space: %s" msgstr "" #: src/trg-status-bar.c:188 msgid "Disable alternate speed limits" msgstr "" #: src/trg-status-bar.c:189 msgid "Enable alternate speed limits" msgstr "" #: src/trg-status-bar.c:226 src/trg-status-bar.c:233 #, c-format msgid " (Limit: %s)" msgstr "" #: src/trg-status-bar.c:238 #, c-format msgid "Down: %s%s, Up: %s%s" msgstr "" #: src/trg-torrent-add-dialog.c:392 msgid "Torrent files" msgstr "種子檔案" #: src/trg-torrent-add-dialog.c:397 msgid "All files" msgstr "所有檔案" #: src/trg-torrent-add-dialog.c:432 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "無法解析種子檔案。無法取得檔案偏好設定,但你仍然可以嘗試上傳它。" #: src/trg-torrent-add-dialog.c:445 #, c-format msgid "Unable to open torrent file: %s" msgstr "無法開啟種子檔:%s" #: src/trg-torrent-add-dialog.c:538 msgid "(None)" msgstr "" #: src/trg-torrent-add-dialog.c:540 msgid "(Multiple)" msgstr "" #: src/trg-torrent-add-dialog.c:563 msgid "Add a Torrent" msgstr "加入種子" #: src/trg-torrent-add-dialog.c:656 src/trg-files-tree-view-common.c:54 msgid "High Priority" msgstr "高優先權" #: src/trg-torrent-add-dialog.c:659 src/trg-files-tree-view-common.c:58 msgid "Normal Priority" msgstr "一般優先權" #: src/trg-torrent-add-dialog.c:662 src/trg-files-tree-view-common.c:62 msgid "Low Priority" msgstr "低優先權" #: src/trg-torrent-add-dialog.c:668 src/trg-files-tree-view-common.c:73 msgid "Skip" msgstr "" #. window #: src/trg-torrent-add-dialog.c:707 msgid "Add Torrent" msgstr "加入種子" #: src/trg-torrent-add-dialog.c:730 msgid "Start _paused" msgstr "" #: src/trg-torrent-add-dialog.c:747 msgid "_Torrent file:" msgstr "種子檔案(_T):" #: src/trg-torrent-add-dialog.c:766 msgid "_Destination folder:" msgstr "" #: src/trg-torrent-add-dialog.c:775 msgid "Apply to all:" msgstr "" #: src/trg-torrent-add-dialog.c:777 msgid "Torrent _priority:" msgstr "種子優先權(_P):" #: src/trg-torrent-add-dialog.c:893 msgid "Show _options dialog" msgstr "顯示選項對話窗(_O)" #: src/trg-torrent-add-url-dialog.c:65 msgid "" "You are trying to add a magnet torrent, but DHT is disabled. Distributed " "Hash Table (DHT) should be enabled in remote settings." msgstr "" "你正嘗試新增一個磁力連結種子,但是 DHT 已經被停用。DHT 應該在遠端設定中被啟" "用。" #: src/trg-torrent-add-url-dialog.c:124 msgid "URL:" msgstr "" #: src/trg-torrent-add-url-dialog.c:127 msgid "Start Paused" msgstr "" #: src/trg-torrent-add-url-dialog.c:130 msgid "Add torrent from URL" msgstr "從網址加入種子" #: src/trg-torrent-graph.c:415 msgid "Total Uploading" msgstr "總計上傳速度" #: src/trg-torrent-graph.c:423 msgid "Total Downloading" msgstr "總計下載速度" #: src/trg-torrent-model.c:407 msgid "Default" msgstr "" #: src/trg-torrent-move-dialog.c:119 src/trg-torrent-props-dialog.c:255 msgid "Location:" msgstr "位置:" #: src/trg-torrent-move-dialog.c:166 #, c-format msgid "Move %s" msgstr "" #: src/trg-torrent-move-dialog.c:168 #, c-format msgid "Move %d torrents" msgstr "移動 %d 個種子" #: src/trg-torrent-props-dialog.c:201 msgid "Activity" msgstr "" #: src/trg-torrent-props-dialog.c:206 msgid "Torrent size:" msgstr "種子大小:" #: src/trg-torrent-props-dialog.c:211 msgid "Have:" msgstr "" #: src/trg-torrent-props-dialog.c:216 msgid "Downloaded:" msgstr "已下載:" #: src/trg-torrent-props-dialog.c:221 msgid "Uploaded:" msgstr "" #: src/trg-torrent-props-dialog.c:226 msgid "State:" msgstr "" #: src/trg-torrent-props-dialog.c:231 msgid "Running time:" msgstr "" #: src/trg-torrent-props-dialog.c:236 msgid "Remaining time:" msgstr "" #: src/trg-torrent-props-dialog.c:241 msgid "Last activity:" msgstr "" #: src/trg-torrent-props-dialog.c:246 msgid "Error:" msgstr "" #: src/trg-torrent-props-dialog.c:250 msgid "Details" msgstr "詳細資訊" #: src/trg-torrent-props-dialog.c:261 msgid "Hash:" msgstr "" #: src/trg-torrent-props-dialog.c:267 msgid "Privacy:" msgstr "" #: src/trg-torrent-props-dialog.c:273 msgid "Origin:" msgstr "" #: src/trg-torrent-props-dialog.c:290 msgid "Comment:" msgstr "備註" #: src/trg-torrent-props-dialog.c:325 msgid "Private to this tracker -- DHT and PEX disabled" msgstr "將此追蹤器設為私人 -- 停用 DHT 與 PEX" #: src/trg-torrent-props-dialog.c:327 msgid "Public torrent" msgstr "公開的種子" #: src/trg-torrent-props-dialog.c:337 #, c-format msgid "Created by %1$s on %2$s" msgstr "" #: src/trg-torrent-props-dialog.c:340 #, c-format msgid "Created on %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:342 #, c-format msgid "Created by %1$s" msgstr "" #: src/trg-torrent-props-dialog.c:375 msgid "No errors" msgstr "" #: src/trg-torrent-props-dialog.c:379 msgid "Active now" msgstr "" #: src/trg-torrent-props-dialog.c:412 msgid "Honor global limits" msgstr "" #: src/trg-torrent-props-dialog.c:422 msgid "Torrent priority:" msgstr "種子優先權" #: src/trg-torrent-props-dialog.c:428 msgid "Queue Position:" msgstr "" #: src/trg-torrent-props-dialog.c:433 msgid "Limit download speed (KiB/s)" msgstr "限制下載速度〈(KiB/s〉" #: src/trg-torrent-props-dialog.c:441 msgid "Limit upload speed (KiB/s)" msgstr "" #: src/trg-torrent-props-dialog.c:449 msgid "Use global settings" msgstr "" #: src/trg-torrent-props-dialog.c:450 msgid "Stop seeding at ratio" msgstr "" #: src/trg-torrent-props-dialog.c:451 msgid "Seed regardless of ratio" msgstr "持續作種" #: src/trg-torrent-props-dialog.c:454 msgid "Seed ratio mode:" msgstr "" #: src/trg-torrent-props-dialog.c:462 msgid "Seed ratio limit:" msgstr "" #: src/trg-torrent-props-dialog.c:468 msgid "Peer limit:" msgstr "" #: src/trg-torrent-props-dialog.c:541 #, c-format msgid "Multiple (%d) torrent properties" msgstr "多個〈%d〉種子屬性" #: src/trg-torrent-props-dialog.c:573 msgid "Information" msgstr "" #: src/trg-torrent-tree-view.c:64 msgid "Done" msgstr "" #: src/trg-torrent-tree-view.c:69 msgid "Seeds" msgstr "" #: src/trg-torrent-tree-view.c:71 msgid "Sending" msgstr "" #: src/trg-torrent-tree-view.c:77 msgid "Downloads" msgstr "" #: src/trg-torrent-tree-view.c:80 msgid "Receiving" msgstr "" #: src/trg-torrent-tree-view.c:84 msgid "Connected" msgstr "已連線" #: src/trg-torrent-tree-view.c:86 msgid "PEX Peers" msgstr "PEX 用戶" #: src/trg-torrent-tree-view.c:91 msgid "DHT Peers" msgstr "DHT 用戶" #: src/trg-torrent-tree-view.c:97 msgid "Tracker Peers" msgstr "追蹤器用戶" #: src/trg-torrent-tree-view.c:101 msgid "LTEP Peers" msgstr "LTEP 用戶" #: src/trg-torrent-tree-view.c:106 msgid "Resumed Peers" msgstr "" #: src/trg-torrent-tree-view.c:112 msgid "Incoming Peers" msgstr "" #: src/trg-torrent-tree-view.c:117 msgid "Peers T/I/E/H/X/L/R" msgstr "" #: src/trg-torrent-tree-view.c:137 msgid "Added" msgstr "已加入" #: src/trg-torrent-tree-view.c:140 msgid "First Tracker" msgstr "第一個追蹤器" #: src/trg-torrent-tree-view.c:146 msgid "ID" msgstr "" #: src/trg-torrent-tree-view.c:152 msgid "Queue Position" msgstr "" #: src/trg-torrent-tree-view.c:158 msgid "Last Active" msgstr "" #: src/trg-trackers-tree-view.c:172 msgid "Tier" msgstr "" #: src/trg-trackers-tree-view.c:178 msgid "Announce URL" msgstr "發布網址" #: src/trg-trackers-tree-view.c:196 msgid "Seeder Count" msgstr "" #: src/trg-trackers-tree-view.c:199 msgid "Leecher Count" msgstr "下載數" #: src/trg-trackers-tree-view.c:203 msgid "Last Announce" msgstr "最後發佈" #: src/trg-trackers-tree-view.c:206 msgid "Last Result" msgstr "最後結果" #: src/trg-trackers-tree-view.c:208 msgid "Scrape URL" msgstr "" #: src/trg-trackers-tree-view.c:210 msgid "Last Scrape" msgstr "" #: src/trg-trackers-tree-view.c:309 msgid "Delete" msgstr "" #: src/trg-tree-view.c:281 msgid "Ascending" msgstr "" #: src/trg-tree-view.c:291 msgid "Descending" msgstr "" #: src/trg-files-tree-view-common.c:80 msgid "Expand All" msgstr "" #: src/trg-files-tree-view-common.c:85 msgid "Collapse All" msgstr "" #: src/util.c:46 msgid "KiB" msgstr "" #: src/util.c:47 msgid "MiB" msgstr "" #: src/util.c:48 msgid "GiB" msgstr "" #: src/util.c:49 msgid "TiB" msgstr "" #: src/util.c:52 msgid "KiB/s" msgstr "" #: src/util.c:53 msgid "MiB/s" msgstr "" #: src/util.c:54 msgid "GiB/s" msgstr "" #: src/util.c:55 msgid "TiB/s" msgstr "" #: src/util.c:342 msgid "JSON decoding error." msgstr "" #: src/util.c:347 msgid "Server responded, but with no result." msgstr "" #: src/util.c:385 msgid "None" msgstr "" #: src/util.c:431 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "" msgstr[1] "" #: src/util.c:432 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "" msgstr[1] "" #: src/util.c:434 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "" msgstr[1] "" #: src/util.c:437 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "" msgstr[1] "" #~ msgid "Downloading from %1$li of %2$li connected peer" #~ msgid_plural "Downloading from %1$li of %2$li connected peers" #~ msgstr[0] "正在從 %2$li 個中的 %1$li 個已連線的用戶下載" #~ msgid "Seeding to %1$li of %2$li connected peer" #~ msgid_plural "Seeding to %1$li of %2$li connected peers" #~ msgstr[0] "正在做種給 %2$li 個中的 %1$li 個已連線用戶" transmission-remote-gtk-1.4.1/src/000077500000000000000000000000001341276053300171155ustar00rootroot00000000000000transmission-remote-gtk-1.4.1/src/Makefile.am000066400000000000000000000116301341276053300211520ustar00rootroot00000000000000# # transmission-remote-gtk - A GTK RPC client to Transmission # Copyright (C) 2011 Alan Fitton # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # bin_PROGRAMS = transmission-remote-gtk transmission_remote_gtk_SOURCES = \ trg-cell-renderer-speed.c \ trg-cell-renderer-counter.c \ trg-cell-renderer-size.c \ trg-cell-renderer-ratio.c \ trg-cell-renderer-eta.c \ trg-cell-renderer-priority.c \ trg-cell-renderer-wanted.c \ trg-cell-renderer-file-icon.c \ trg-cell-renderer-epoch.c \ trg-cell-renderer-numgteqthan.c \ torrent-cell-renderer.c \ trg-remote-prefs-dialog.c \ trg-torrent-props-dialog.c \ trg-torrent-add-url-dialog.c \ trg-torrent-add-dialog.c \ trg-torrent-move-dialog.c \ trg-preferences-dialog.c \ trg-stats-dialog.c \ trg-about-window.c \ trg-destination-combo.c \ trg-state-selector.c \ trg-general-panel.c \ trg-torrent-graph.c \ trg-icons.c \ icons.c \ trg-toolbar.c \ trg-menu-bar.c \ trg-status-bar.c \ trg-file-parser.c \ trg-json-widgets.c \ trg-model.c \ trg-sortable-filtered-model.c \ trg-files-tree.c \ trg-files-model.c \ trg-files-tree-view-common.c \ trg-files-tree-view.c \ trg-files-model-common.c \ trg-trackers-model.c \ trg-trackers-tree-view.c \ trg-peers-model.c \ trg-peers-tree-view.c \ trg-torrent-model.c \ trg-torrent-tree-view.c \ trg-persistent-tree-view.c \ trg-tree-view.c \ util.c \ hig.c \ bencode.c \ trg-prefs.c \ remote-exec.c \ trg-gtk-app.c \ requests.c \ torrent.c \ session-get.c \ json.c \ trg-client.c \ trg-main-window.c \ main.c \ upload.c noinst_HEADERS = \ trg-cell-renderer-speed.h \ trg-cell-renderer-counter.h \ trg-cell-renderer-size.h \ trg-cell-renderer-ratio.h \ trg-cell-renderer-eta.h \ trg-cell-renderer-priority.h \ trg-cell-renderer-wanted.h \ trg-cell-renderer-file-icon.h \ trg-cell-renderer-epoch.h \ trg-cell-renderer-numgteqthan.h \ torrent-cell-renderer.h \ trg-remote-prefs-dialog.h \ trg-torrent-props-dialog.h \ trg-torrent-add-url-dialog.h \ trg-torrent-add-dialog.h \ trg-torrent-move-dialog.h \ trg-preferences-dialog.h \ trg-stats-dialog.h \ trg-about-window.h \ trg-destination-combo.h \ trg-state-selector.h \ trg-general-panel.h \ trg-torrent-graph.h \ trg-icons.h \ icons.h \ trg-toolbar.h \ trg-menu-bar.h \ trg-status-bar.h \ trg-file-parser.h \ trg-json-widgets.h \ trg-model.h \ trg-sortable-filtered-model.h \ trg-files-tree.h \ trg-files-model.h \ trg-files-tree-view-common.h \ trg-files-tree-view.h \ trg-files-model-common.h \ trg-trackers-model.h \ trg-trackers-tree-view.h \ trg-peers-model.h \ trg-peers-tree-view.h \ trg-torrent-model.h \ trg-torrent-tree-view.h \ trg-persistent-tree-view.h \ trg-tree-view.h \ util.h \ hig.h \ bencode.h \ trg-prefs.h \ remote-exec.h \ trg-gtk-app.h \ requests.h \ torrent.h \ session-get.h \ json.h \ trg-client.h \ trg-main-window.h \ upload.h \ protocol-constants.h \ icon-turtle.h transmission_remote_gtk_CPPFLAGS = \ -DLOCALEDIR=\""$(localedir)"\" \ -I$(top_srcdir)/extern transmission_remote_gtk_CFLAGS = \ $(TRG_CFLAGS) \ $(GEOIP_CFLAGS) \ $(NOTIFY_CFLAGS) \ $(MRSS_CFLAGS) \ $(APPINDICATOR_CFLAGS) \ $(PROXY_CFLAGS) transmission_remote_gtk_LDFLAGS = \ $(LIBM) \ $(TRG_LIBS) \ $(GEOIP_LIBS) \ $(NOTIFY_LIBS) \ $(PROXY_LIBS) \ $(APPINDICATOR_LIBS) \ $(MRSS_CFLAGS) if HAVE_RSS transmission_remote_gtk_LDFLAGS += ${top_builddir}/extern/rss-glib/librss.la transmission_remote_gtk_SOURCES += trg-rss-model.c trg-rss-window.c trg-rss-cell-renderer.c noinst_HEADERS += trg-rss-model.h trg-rss-window.h trg-rss-cell-renderer.h endif if WIN32 .rc.o: windres $^ -o $@ %.o : %.rc windres $^ -o $@ transmission_remote_gtk_CFLAGS += -mms-bitfields -mwin32 -mwindows transmission_remote_gtk_LDFLAGS += -Wl,--allow-multiple-definition -lws2_32 -lintl transmission_remote_gtk_SOURCES += win32.rc win32-mailslot.c else %.1: %.pod $(POD2MAN) --release="$(PACKAGE_VERSION)" --center="Transmission Remote GTK" $< > $@ EXTRA_DIST = transmission-remote-gtk.pod CLEANFILES = transmission-remote-gtk.1 man_MANS = transmission-remote-gtk.1 endif transmission-remote-gtk-1.4.1/src/bencode.c000066400000000000000000000154051341276053300206650ustar00rootroot00000000000000/* * C implementation of a bencode decoder. * This is the format defined by BitTorrent: * http://wiki.theory.org/BitTorrentSpecification#bencoding * * The only external requirements are a few [standard] function calls and * the gint64 type. Any sane system should provide all of these things. * * See the bencode.h header file for usage information. * * This is released into the public domain: * http://en.wikipedia.org/wiki/Public_Domain * * Written by: * Mike Frysinger * And improvements from: * Gilles Chanteperdrix */ /* * This implementation isn't optimized at all as I wrote it to support a bogus * system. I have no real interest in this format. Feel free to send me * patches (so long as you don't copyright them and you release your changes * into the public domain as well). */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include /* malloc() realloc() free() strtoll() */ #include /* memset() */ #include #include #include "bencode.h" static be_node *be_alloc(be_type type) { be_node *ret = g_malloc0(sizeof(be_node)); if (ret) ret->type = type; return ret; } static gint64 _be_decode_int(const char **data, gint64 * data_len) { char *endp; gint64 ret = strtoll(*data, &endp, 10); *data_len -= (endp - *data); *data = endp; return ret; } gint64 be_str_len(be_node * node) { gint64 ret = 0; if (node->val.s) memcpy(&ret, node->val.s - sizeof(ret), sizeof(ret)); return ret; } static char *_be_decode_str(const char **data, gint64 * data_len) { gint64 sllen = _be_decode_int(data, data_len); long slen = sllen; unsigned long len; char *ret = NULL; /* slen is signed, so negative values get rejected */ if (sllen < 0) return ret; /* reject attempts to allocate large values that overflow the * size_t type which is used with malloc() */ if (sizeof(gint64) != sizeof(long)) if (sllen != slen) return ret; /* make sure we have enough data left */ if (sllen > *data_len - 1) return ret; /* switch from signed to unsigned so we don't overflow below */ len = slen; if (**data == ':') { char *_ret = g_malloc(sizeof(sllen) + len + 1); memcpy(_ret, &sllen, sizeof(sllen)); ret = _ret + sizeof(sllen); memcpy(ret, *data + 1, len); ret[len] = '\0'; *data += len + 1; *data_len -= len + 1; } return ret; } static be_node *_be_decode(const char **data, gint64 * data_len) { be_node *ret = NULL; char dc; if (!*data_len) return ret; dc = **data; if (dc == 'l') { unsigned int i = 0; ret = be_alloc(BE_LIST); --(*data_len); ++(*data); while (**data != 'e') { ret->val.l = g_realloc(ret->val.l, (i + 2) * sizeof(*ret->val.l)); ret->val.l[i] = _be_decode(data, data_len); if (!ret->val.l[i]) break; ++i; } --(*data_len); ++(*data); if (i > 0) ret->val.l[i] = NULL; return ret; } else if (dc == 'd') { unsigned int i = 0; ret = be_alloc(BE_DICT); --(*data_len); ++(*data); while (**data != 'e') { ret->val.d = g_realloc(ret->val.d, (i + 2) * sizeof(*ret->val.d)); ret->val.d[i].key = _be_decode_str(data, data_len); ret->val.d[i].val = _be_decode(data, data_len); if (!ret->val.l[i]) break; ++i; } --(*data_len); ++(*data); if (i > 0) ret->val.d[i].val = NULL; return ret; } else if (dc == 'i') { ret = be_alloc(BE_INT); --(*data_len); ++(*data); ret->val.i = _be_decode_int(data, data_len); if (**data != 'e') return NULL; --(*data_len); ++(*data); return ret; } else if (isdigit(dc)) { ret = be_alloc(BE_STR); ret->val.s = _be_decode_str(data, data_len); return ret; } return ret; } be_node *be_decoden(const char *data, gint64 len) { return _be_decode(&data, &len); } be_node *be_decode(const char *data) { return be_decoden(data, strlen(data)); } gboolean be_validate_node(be_node * node, gint type) { if (!node || node->type != type) return FALSE; else return TRUE; } static inline void _be_free_str(char *str) { if (str) g_free(str - sizeof(gint64)); } void be_free(be_node * node) { switch (node->type) { case BE_STR: _be_free_str(node->val.s); break; case BE_INT: break; case BE_LIST: { unsigned int i; if (node->val.l) { for (i = 0; node->val.l[i]; ++i) be_free(node->val.l[i]); g_free(node->val.l); } break; } case BE_DICT: { unsigned int i; if (node->val.d) { for (i = 0; node->val.d[i].val; ++i) { _be_free_str(node->val.d[i].key); be_free(node->val.d[i].val); } g_free(node->val.d); } break; } } g_free(node); } be_node *be_dict_find(be_node * node, char *key, int type) { int i; for (i = 0; node->val.d[i].val; ++i) { if (!strcmp(node->val.d[i].key, key)) { be_node *cn = node->val.d[i].val; if (type < 0 || cn->type == type) return node->val.d[i].val; } } return NULL; } #ifdef BE_DEBUG #include #include static void _be_dump_indent(ssize_t indent) { while (indent-- > 0) printf(" "); } static void _be_dump(be_node * node, ssize_t indent) { size_t i; _be_dump_indent(indent); indent = abs(indent); switch (node->type) { case BE_STR: printf("str = %s (len = %lli)\n", node->val.s, be_str_len(node)); break; case BE_INT: printf("int = %lli\n", node->val.i); break; case BE_LIST: puts("list ["); for (i = 0; node->val.l[i]; ++i) _be_dump(node->val.l[i], indent + 1); _be_dump_indent(indent); puts("]"); break; case BE_DICT: puts("dict {"); for (i = 0; node->val.d[i].val; ++i) { _be_dump_indent(indent + 1); printf("%s => ", node->val.d[i].key); _be_dump(node->val.d[i].val, -(indent + 1)); } _be_dump_indent(indent); puts("}"); break; } } void be_dump(be_node * node) { _be_dump(node, 0); } #endif transmission-remote-gtk-1.4.1/src/bencode.h000066400000000000000000000030171341276053300206660ustar00rootroot00000000000000/* * C implementation of a bencode decoder. * This is the format defined by BitTorrent: * http://wiki.theory.org/BitTorrentSpecification#bencoding * * The only external requirements are a few [standard] function calls and * the gint64 type. Any sane system should provide all of these things. * * This is released into the public domain. * Written by Mike Frysinger . */ /* USAGE: * - pass the string full of the bencoded data to be_decode() * - parse the resulting tree however you like * - call be_free() on the tree to release resources */ #ifndef _BENCODE_H #define _BENCODE_H #ifdef __cplusplus extern "C" { #endif typedef enum { BE_STR, BE_INT, BE_LIST, BE_DICT } be_type; struct be_dict; struct be_node; /* * XXX: the "val" field of be_dict and be_node can be confusing ... */ typedef struct be_dict { char *key; struct be_node *val; } be_dict; typedef struct be_node { be_type type; union { char *s; gint64 i; struct be_node **l; struct be_dict *d; } val; } be_node; gint64 be_str_len(be_node * node); be_node *be_decode(const char *bencode); be_node *be_decoden(const char *bencode, gint64 bencode_len); void be_free(be_node * node); void be_dump(be_node * node); be_node *be_dict_find(be_node * node, char *key, int type); gboolean be_validate_node(be_node * node, gint type); #ifdef __cplusplus } #endif #endif transmission-remote-gtk-1.4.1/src/gtk.suppression000066400000000000000000000123001341276053300222120ustar00rootroot00000000000000# # Valgrind suppression file for Gtk+ 2.12 # # Format specification: # http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress # # # glibc Ubuntu Edgy # { libc: getpwnam_r Memcheck:Addr4 obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/tls/i686/cmov/libc-*.so obj:/lib/ld-*.so fun:__libc_dlopen_mode fun:__nss_lookup_function obj:/lib/tls/i686/cmov/libc-*.so fun:__nss_passwd_lookup fun:getpwnam_r fun:g_get_any_init_do fun:g_get_home_dir fun:gtk_rc_add_initial_default_files fun:_gtk_rc_init fun:post_parse_hook fun:g_option_context_parse fun:gtk_parse_args fun:gtk_init_check fun:gtk_init } { libc: getpwnam_r Memcheck:Addr4 obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/tls/i686/cmov/libc-*.so obj:/lib/ld-*.so fun:__libc_dlopen_mode fun:__nss_lookup_function obj:/lib/tls/i686/cmov/libc-*.so fun:__nss_passwd_lookup fun:getpwnam_r fun:g_get_any_init_do fun:g_get_home_dir fun:gtk_rc_add_initial_default_files fun:_gtk_rc_init fun:post_parse_hook fun:g_option_context_parse fun:gtk_parse_args fun:gtk_init_check fun:gtk_init } { libc: getpwnam_r Memcheck:Addr4 obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/tls/i686/cmov/libc-*.so obj:/lib/ld-*.so fun:__libc_dlopen_mode fun:__nss_lookup_function fun:__nss_next fun:getpwnam_r fun:g_get_any_init_do fun:g_get_home_dir fun:gtk_rc_add_initial_default_files fun:_gtk_rc_init fun:post_parse_hook fun:g_option_context_parse fun:gtk_parse_args fun:gtk_init_check fun:gtk_init } { libc: getpwnam_r Memcheck:Addr4 obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/ld-*.so obj:/lib/tls/i686/cmov/libc-*.so obj:/lib/ld-*.so fun:__libc_dlopen_mode fun:__nss_lookup_function fun:__nss_next fun:getpwnam_r fun:g_get_any_init_do fun:g_get_home_dir fun:gtk_rc_add_initial_default_files fun:_gtk_rc_init fun:post_parse_hook fun:g_option_context_parse fun:gtk_parse_args fun:gtk_init_check fun:gtk_init } # # glibc Ubuntu feisty # { getpwnam_r Memcheck:Leak fun:malloc obj:/lib/libc-2.5.so fun:__nss_database_lookup obj:* obj:* fun:getpwnam_r } # # X # { XSupportsLocale Memcheck:Addr4 obj:/lib/ld-*.so obj:/lib/tls/i686/cmov/libdl-*.so obj:/lib/ld-*.so obj:/lib/tls/i686/cmov/libdl-*.so fun:dlopen obj:/usr/lib/libX11.so.6.2.0 fun:_XlcDynamicLoad fun:_XOpenLC fun:_XlcCurrentLC fun:XSupportsLocale fun:_gdk_x11_initialize_locale fun:_gdk_windowing_init fun:gdk_pre_parse_libgtk_only fun:pre_parse_hook fun:g_option_context_parse fun:gtk_parse_args fun:gtk_init_check fun:gtk_init fun:main } { Xcursor Memcheck:Leak fun:malloc obj:/usr/lib/libXcursor.so.1.0.2 obj:/usr/lib/libXcursor.so.1.0.2 fun:XcursorXcFileLoadImages fun:XcursorFileLoadImages fun:XcursorLibraryLoadImages fun:XcursorShapeLoadImages fun:XcursorTryShapeCursor fun:XCreateGlyphCursor fun:XCreateFontCursor fun:gdk_cursor_new_for_display } { XcursorGetTheme Memcheck:Leak fun:malloc fun:/usr/lib/libX11.so.6.2.0 fun:/usr/lib/libX11.so.6.2.0 fun:XrmGetStringDatabase fun:XGetDefault fun:_XcursorGetDisplayInfo fun:XcursorGetTheme } { XOpenDisplay Memcheck:Leak fun:calloc fun:XOpenDisplay } { XOpenDisplay Memcheck:Leak fun:malloc fun:XOpenDisplay } # # fontconfig # { fontconfig Memcheck:Leak fun:realloc fun:FcPatternObjectInsertElt fun:FcPatternObjectAddWithBinding } { pango_fc_font_map_load_fontset Memcheck:Leak fun:malloc fun:FcLangSetCreate fun:FcLangSetCopy fun:FcValueSave fun:FcPatternObjectAddWithBinding fun:FcPatternObjectAdd fun:FcFontRenderPrepare fun:pango_fc_font_map_load_fontset fun:pango_font_map_load_fontset } { pango_font_map_load_fontset Memcheck:Leak fun:malloc fun:FcPatternObjectAddWithBinding fun:FcPatternObjectAdd fun:FcFontRenderPrepare fun:pango_fc_font_map_load_fontset fun:pango_font_map_load_fontset } { pango_fc_font_map_load_fontset Memcheck:Leak fun:malloc fun:FcStrStaticName fun:FcPatternObjectAddWithBinding fun:FcPatternObjectAdd fun:FcFontRenderPrepare fun:pango_fc_font_map_load_fontset } { pango_fc_font_map_list_families Memcheck:Leak fun:malloc fun:FcStrStaticName fun:FcPatternObjectAddWithBinding fun:FcPatternAdd fun:FcFontSetList fun:FcFontList fun:pango_fc_font_map_list_families } # # freetype # { freetype FT_Init_FreeType Memcheck:Leak fun:malloc obj:/usr/lib/libfreetype.so.6.3.10 fun:ft_mem_qalloc fun:ft_mem_alloc fun:FT_New_Library fun:FT_Init_FreeType } # # glib # { glib g_rand_new Memcheck:Leak fun:calloc fun:g_malloc0 fun:g_rand_new_with_seed_array fun:g_rand_new fun:g_random_int } transmission-remote-gtk-1.4.1/src/hig.c000066400000000000000000000121021341276053300200240ustar00rootroot00000000000000/* * This file Copyright (C) Mnemosyne LLC * * This file is licensed by the GPL version 2. Works owned by the * Transmission project are granted a special exemption to clause 2 (b) * so that the bulk of its code can remain under the MIT license. * This exemption does not extend to derived works not owned by * the Transmission project. * * $Id: hig.c 13677 2012-12-16 22:51:29Z jordan $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "hig.h" GtkWidget* hig_workarea_create (void) { GtkWidget * grid = gtk_grid_new (); gtk_container_set_border_width (GTK_CONTAINER (grid), GUI_PAD_BIG); gtk_grid_set_row_spacing (GTK_GRID (grid), GUI_PAD); gtk_grid_set_column_spacing (GTK_GRID (grid), GUI_PAD_BIG); return grid; } void hig_workarea_add_section_divider (GtkWidget * t, guint * row) { GtkWidget * w = gtk_alignment_new (0.0f, 0.0f, 0.0f, 0.0f); gtk_widget_set_size_request (w, 0u, 6u); gtk_grid_attach (GTK_GRID (t), w, 0, *row, 2, 1); ++ * row; } void hig_workarea_add_section_title_widget (GtkWidget * t, guint * row, GtkWidget * w) { gtk_widget_set_hexpand (w, TRUE); gtk_grid_attach (GTK_GRID (t), w, 0, *row, 2, 1); ++ * row; } void hig_workarea_add_section_title (GtkWidget * t, guint * row, const char * section_title) { char buf[512]; GtkWidget * l; g_snprintf (buf, sizeof (buf), "%s", section_title); l = gtk_label_new (buf); gtk_misc_set_alignment (GTK_MISC (l), 0.0f, 0.5f); gtk_label_set_use_markup (GTK_LABEL (l), TRUE); hig_workarea_add_section_title_widget (t, row, l); } void hig_workarea_add_wide_control (GtkWidget * t, guint * row, GtkWidget * w) { gtk_widget_set_hexpand (w, TRUE); gtk_widget_set_margin_left (w, 18); gtk_grid_attach (GTK_GRID (t), w, 0, *row, 2, 1); ++ * row; } void hig_workarea_add_wide_tall_control (GtkWidget * t, guint * row, GtkWidget * w) { gtk_widget_set_hexpand (w, TRUE); gtk_widget_set_vexpand (w, TRUE); hig_workarea_add_wide_control (t, row, w); } GtkWidget * hig_workarea_add_wide_checkbutton (GtkWidget * t, guint * row, const char * mnemonic_string, gboolean is_active) { GtkWidget * w = gtk_check_button_new_with_mnemonic (mnemonic_string); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), is_active); hig_workarea_add_wide_control (t, row, w); return w; } void hig_workarea_add_label_w (GtkWidget * t, guint row, GtkWidget * w) { gtk_widget_set_margin_left (w, 18); if (GTK_IS_MISC (w)) gtk_misc_set_alignment (GTK_MISC (w), 0.0f, 0.5f); if (GTK_IS_LABEL (w)) gtk_label_set_use_markup (GTK_LABEL (w), TRUE); gtk_grid_attach (GTK_GRID (t), w, 0, row, 1, 1); } static void hig_workarea_add_tall_control (GtkWidget * t, guint row, GtkWidget * control) { if (GTK_IS_MISC (control)) gtk_misc_set_alignment (GTK_MISC (control), 0.0f, 0.5f); g_object_set (control, "expand", TRUE, NULL); gtk_grid_attach (GTK_GRID (t), control, 1, row, 1, 1); } static void hig_workarea_add_control (GtkWidget * t, guint row, GtkWidget * control) { if (GTK_IS_MISC (control)) gtk_misc_set_alignment (GTK_MISC (control), 0.0f, 0.5f); gtk_widget_set_hexpand (control, TRUE); gtk_grid_attach (GTK_GRID (t), control, 1, row, 1, 1); } void hig_workarea_add_row_w (GtkWidget * t, guint * row, GtkWidget * label, GtkWidget * control, GtkWidget * mnemonic) { hig_workarea_add_label_w (t, *row, label); hig_workarea_add_control (t, *row, control); if (GTK_IS_LABEL (label)) gtk_label_set_mnemonic_widget (GTK_LABEL (label), mnemonic ? mnemonic : control); ++ * row; } GtkWidget* hig_workarea_add_row (GtkWidget * t, guint * row, const char * mnemonic_string, GtkWidget * control, GtkWidget * mnemonic) { GtkWidget * l = gtk_label_new_with_mnemonic (mnemonic_string); hig_workarea_add_row_w (t, row, l, control, mnemonic); return l; } GtkWidget* hig_workarea_add_tall_row (GtkWidget * table, guint * row, const char * mnemonic_string, GtkWidget * control, GtkWidget * mnemonic) { GtkWidget * l = gtk_label_new_with_mnemonic (mnemonic_string); GtkWidget * h = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); GtkWidget * v = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start (GTK_BOX (h), l, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (v), h, FALSE, FALSE, GUI_PAD_SMALL); hig_workarea_add_label_w (table, *row, v); hig_workarea_add_tall_control (table, *row, control); if (GTK_IS_LABEL (l)) gtk_label_set_mnemonic_widget (GTK_LABEL (l), mnemonic ? mnemonic : control); ++ * row; return l; } transmission-remote-gtk-1.4.1/src/hig.h000066400000000000000000000057331341276053300200450ustar00rootroot00000000000000/* * This file Copyright (C) Mnemosyne LLC * * This file is licensed by the GPL version 2. Works owned by the * Transmission project are granted a special exemption to clause 2 (b) * so that the bulk of its code can remain under the MIT license. * This exemption does not extend to derived works not owned by * the Transmission project. * * $Id: hig.h 13625 2012-12-05 17:29:46Z jordan $ */ #ifndef GTR_HIG_H #define GTR_HIG_H #include /** *** utility code for making dialog layout that follows the Gnome HIG. *** see section 8.2.2, Visual Design > Window Layout > Dialogs. **/ GtkWidget* hig_workarea_create (void); void hig_workarea_add_section_divider (GtkWidget * table, guint * row); void hig_workarea_add_section_title_widget (GtkWidget * t, guint * row, GtkWidget * w); void hig_workarea_add_section_title (GtkWidget * table, guint * row, const char * section_title); void hig_workarea_add_wide_tall_control (GtkWidget * table, guint * row, GtkWidget * w); void hig_workarea_add_wide_control (GtkWidget * table, guint * row, GtkWidget * w); GtkWidget* hig_workarea_add_wide_checkbutton (GtkWidget * table, guint * row, const char * mnemonic_string, gboolean is_active); void hig_workarea_add_label_w (GtkWidget * table, guint row, GtkWidget * label_widget); GtkWidget* hig_workarea_add_tall_row (GtkWidget * table, guint * row, const char * mnemonic_string, GtkWidget * control, GtkWidget * mnemonic_or_null_for_control); GtkWidget* hig_workarea_add_row (GtkWidget * table, guint * row, const char * mnemonic_string, GtkWidget * control, GtkWidget * mnemonic_or_null_for_control); void hig_workarea_add_row_w (GtkWidget * table, guint * row, GtkWidget * label, GtkWidget * control, GtkWidget * mnemonic_or_null_for_control); enum { GUI_PAD_SMALL = 3, GUI_PAD = 6, GUI_PAD_BIG = 12, GUI_PAD_LARGE = 12 }; #endif /* GTR_HIG_H */ transmission-remote-gtk-1.4.1/src/icon-turtle.h000066400000000000000000000063651341276053300215450ustar00rootroot00000000000000/* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ #ifdef __SUNPRO_C #pragma align 4 (blue_turtle) #endif #ifdef __GNUC__ static const guint8 blue_turtle[] __attribute__ ((__aligned__(4))) = #else static const guint8 blue_turtle[] = #endif { "" /* Pixbuf magic (0x47646b50) */ "GdkP" /* length: header (24) + pixel_data (315) */ "\0\0\1S" /* pixdata_type (0x2010002) */ "\2\1\0\2" /* rowstride (80) */ "\0\0\0P" /* width (20) */ "\0\0\0\24" /* height (14) */ "\0\0\0\16" /* pixel_data: */ "\304\377\377\377\0\3" "66\377@77\377p55\3770\205\377\377\377\0\1\0\0\0" "\0\211\377\377\377\0\2" "66\3770<<\377\317\202\77\77\377\377\2>>\377\377" "::\377\237\204\377\377\377\0\1\0\0\0\0\210\377\377\377\0\14" "66\3770" "BB\377\360FF\377\377II\377\377JJ\377\377HH\377\377DD\377\377==\377\237" "\377\377\377\0" "99\377`\77\77\377\377;;\377\237\207\377\377\377\0\4" "5" "5\377\20FF\377\360KK\377\377OO\377\377\202QQ\377\377\7PP\377\377NN\377" "\377II\377\377EE\377\377FF\377\377II\377\377[[\377\267\207\377\377\377" "\0\3EE\377\261NN\377\377TT\377\377\204VV\377\377\3UU\377\377ee\377\331" "\252\252\377\214\202\377\377\377f\1\377\377\377@\207\377\377\377\0\3" "\377\377\377F\224\224\377\240YY\377\377\204ZZ\377\377\3XX\377\377kk\377" "\274\377\377\377\31\202\377\377\377\0\1\0\0\0\0\210\377\377\377\0\2m" "m\377wvv\377\305\204\377\377\377f\3\230\230\377\237TT\377\377FF\377\237" "\202\377\377\377\0\1\0\0\0\0\323\377\377\377\0" }; /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ #ifdef __SUNPRO_C #pragma align 4 (grey_turtle) #endif #ifdef __GNUC__ static const guint8 grey_turtle[] __attribute__ ((__aligned__(4))) = #else static const guint8 grey_turtle[] = #endif { "" /* Pixbuf magic (0x47646b50) */ "GdkP" /* length: header (24) + pixel_data (315) */ "\0\0\1S" /* pixdata_type (0x2010002) */ "\2\1\0\2" /* rowstride (80) */ "\0\0\0P" /* width (20) */ "\0\0\0\24" /* height (14) */ "\0\0\0\16" /* pixel_data: */ "\304\377\377\377\0\3\3\3\3@\5\5\5p\2\2\2" "0\205\377\377\377\0\1\0\0\0" "\0\211\377\377\377\0\2\3\3\3" "0\13\13\13\317\202\17\17\17\377\2\16\16" "\16\377\11\11\11\237\204\377\377\377\0\1\0\0\0\0\210\377\377\377\0\14" "\4\4\4" "0\23\23\23\360\27\27\27\377\33\33\33\377\34\34\34\377\32\32\32" "\377\25\25\25\377\14\14\14\237\377\377\377\0\7\7\7`\17\17\17\377\12\12" "\12\237\207\377\377\377\0\4\2\2\2\20\27\27\27\360\36\36\36\377###\377" "\202%%%\377\7$$$\377!!!\377\33\33\33\377\26\26\26\377\30\30\30\377\33" "\33\33\377222\267\207\377\377\377\0\3\26\26\26\261\"\"\"\377)))\377\204" "+++\377\3***\377\77\77\77\331\225\225\225\214\202\377\377\377f\1\377" "\377\377@\207\377\377\377\0\3\377\377\377Fyyy\240///\377\204000\377\3" "...\377FFF\274\377\377\377\31\202\377\377\377\0\1\0\0\0\0\210\377\377" "\377\0\2HHHwTTT\305\204\377\377\377f\3~~~\237)))\377\27\27\27\237\202" "\377\377\377\0\1\0\0\0\0\323\377\377\377\0" }; transmission-remote-gtk-1.4.1/src/icons.c000066400000000000000000000144211341276053300203760ustar00rootroot00000000000000/* * icons.[ch] written by Paolo Bacchilega, who writes: * "There is no problem for me, you can license my code * under whatever licence you wish :)" * * $Id: icons.c 12639 2011-08-07 18:41:13Z jordan $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include /* strcmp */ #include #include #include #include "icons.h" #define VOID_PIXBUF_KEY "void-pixbuf" static const char *get_static_string(const char *s) { static GStringChunk *static_strings = NULL; if (s == NULL) return NULL; if (static_strings == NULL) static_strings = g_string_chunk_new(1024); return g_string_chunk_insert_const(static_strings, s); } typedef struct { GtkIconTheme *icon_theme; int icon_size; GHashTable *cache; } IconCache; static IconCache *icon_cache[7] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static GdkPixbuf *create_void_pixbuf(int width, int height) { GdkPixbuf *p; p = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width, height); gdk_pixbuf_fill(p, 0xFFFFFF00); return p; } static int get_size_in_pixels(GtkWidget * widget, GtkIconSize icon_size) { int width, height; gtk_icon_size_lookup_for_settings(gtk_widget_get_settings(widget), icon_size, &width, &height); return MAX(width, height); } static IconCache *icon_cache_new(GtkWidget * for_widget, int icon_size) { IconCache *icon_cache; g_return_val_if_fail(for_widget != NULL, NULL); icon_cache = g_new0(IconCache, 1); icon_cache->icon_theme = gtk_icon_theme_get_for_screen(gtk_widget_get_screen(for_widget)); icon_cache->icon_size = get_size_in_pixels(for_widget, icon_size); icon_cache->cache = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_object_unref); g_hash_table_insert(icon_cache->cache, (void *) VOID_PIXBUF_KEY, create_void_pixbuf(icon_cache->icon_size, icon_cache->icon_size)); return icon_cache; } static const char *_icon_cache_get_icon_key(GIcon * icon) { const char *key = NULL; if (G_IS_THEMED_ICON(icon)) { char **icon_names; char *name; g_object_get(icon, "names", &icon_names, NULL); name = g_strjoinv(",", icon_names); key = get_static_string(name); g_free(name); g_strfreev(icon_names); } else if (G_IS_FILE_ICON(icon)) { GFile *file; char *filename; file = g_file_icon_get_file(G_FILE_ICON(icon)); filename = g_file_get_path(file); key = get_static_string(filename); g_free(filename); g_object_unref(file); } return key; } static GdkPixbuf *get_themed_icon_pixbuf(GThemedIcon * icon, int size, GtkIconTheme * icon_theme) { char **icon_names = NULL; GtkIconInfo *icon_info; GdkPixbuf *pixbuf; GError *error = NULL; g_object_get(icon, "names", &icon_names, NULL); icon_info = gtk_icon_theme_choose_icon(icon_theme, (const char **) icon_names, size, 0); if (icon_info == NULL) icon_info = gtk_icon_theme_lookup_icon(icon_theme, "text-x-generic", size, GTK_ICON_LOOKUP_USE_BUILTIN); pixbuf = gtk_icon_info_load_icon(icon_info, &error); if (pixbuf == NULL) { if (error && error->message) g_warning("could not load icon pixbuf: %s\n", error->message); g_clear_error(&error); } gtk_icon_info_free(icon_info); g_strfreev(icon_names); return pixbuf; } static GdkPixbuf *get_file_icon_pixbuf(GFileIcon * icon, int size) { GFile *file; char *filename; GdkPixbuf *pixbuf; file = g_file_icon_get_file(icon); filename = g_file_get_path(file); pixbuf = gdk_pixbuf_new_from_file_at_size(filename, size, -1, NULL); g_free(filename); g_object_unref(file); return pixbuf; } static GdkPixbuf *_get_icon_pixbuf(GIcon * icon, int size, GtkIconTheme * theme) { if (icon == NULL) return NULL; if (G_IS_THEMED_ICON(icon)) return get_themed_icon_pixbuf(G_THEMED_ICON(icon), size, theme); if (G_IS_FILE_ICON(icon)) return get_file_icon_pixbuf(G_FILE_ICON(icon), size); return NULL; } static GdkPixbuf *icon_cache_get_mime_type_icon(IconCache * icon_cache, const char *mime_type) { GIcon *icon; const char *key = NULL; GdkPixbuf *pixbuf; icon = g_content_type_get_icon(mime_type); key = _icon_cache_get_icon_key(icon); if (key == NULL) key = VOID_PIXBUF_KEY; pixbuf = g_hash_table_lookup(icon_cache->cache, key); if (pixbuf != NULL) { g_object_ref(pixbuf); g_object_unref(G_OBJECT(icon)); return pixbuf; } pixbuf = _get_icon_pixbuf(icon, icon_cache->icon_size, icon_cache->icon_theme); if (pixbuf != NULL) g_hash_table_insert(icon_cache->cache, (gpointer) key, g_object_ref(pixbuf)); g_object_unref(G_OBJECT(icon)); return pixbuf; } GdkPixbuf *gtr_get_mime_type_icon(const char *mime_type, GtkIconSize icon_size, GtkWidget * for_widget) { int n; switch (icon_size) { case GTK_ICON_SIZE_MENU: n = 1; break; case GTK_ICON_SIZE_SMALL_TOOLBAR: n = 2; break; case GTK_ICON_SIZE_LARGE_TOOLBAR: n = 3; break; case GTK_ICON_SIZE_BUTTON: n = 4; break; case GTK_ICON_SIZE_DND: n = 5; break; case GTK_ICON_SIZE_DIALOG: n = 6; break; default /*GTK_ICON_SIZE_INVALID */ : n = 0; break; } if (icon_cache[n] == NULL) icon_cache[n] = icon_cache_new(for_widget, icon_size); return icon_cache_get_mime_type_icon(icon_cache[n], mime_type); } const char *gtr_get_mime_type_from_filename(const char *file G_GNUC_UNUSED) { char *tmp = g_content_type_guess(file, NULL, 0, NULL); const char *ret = get_static_string(tmp); g_free(tmp); return ret; } transmission-remote-gtk-1.4.1/src/icons.h000066400000000000000000000010751341276053300204040ustar00rootroot00000000000000/* * icons.[ch] written by Paolo Bacchilega, who writes: * "There is no problem for me, you can license * my code under whatever licence you wish :)" * * $Id: icons.h 11709 2011-01-19 13:48:47Z jordan $ */ #ifndef GTR_ICONS_H #define GTR_ICONS_H #define DIRECTORY_MIME_TYPE "folder" #define UNKNOWN_MIME_TYPE "unknown" const char *gtr_get_mime_type_from_filename(const char *file); GdkPixbuf *gtr_get_mime_type_icon(const char *mime_type, GtkIconSize icon_size, GtkWidget * for_widget); #endif transmission-remote-gtk-1.4.1/src/installer-gtk2.nsi000066400000000000000000000712511341276053300225000ustar00rootroot00000000000000!include "MUI2.nsh" ;!include "FileAssociation.nsh" ;!include "ProtocolAssociation.nsh" !include "x64.nsh" ;-------------------------------- ; The name of the installer Name "Transmission Remote GTK" ; The file to write !ifndef REV OutFile "transmission-remote-gtk-1.1-installer.exe" !else OutFile "transmission-remote-gtk-${REV}-installer.exe" !endif ; The default installation directory !define ProgramFilesDir "Transmission Remote GTK" RequestExecutionLevel admin ;-------------------------------- XPStyle on Var StartMenuFolder !define MUI_ICON "transmission_large.ico" !define MUI_UNICON "transmission_large.ico" !define MUI_HEADERIMAGE ;!define MUI_HEADERIMAGE_BITMAP "logo.bmp" ;!define MUI_WELCOMEFINISHPAGE_BITMAP "nsis_wizard.bmp" ;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "nsis_wizard.bmp" ;!define MUI_COMPONENTSPAGE_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\colorful.bmp" !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_ABORTWARNING ;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" ;!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show ReadMe" ;!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED ; Pages !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "..\COPYING" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_WELCOME !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_FINISH ;-------------------------------- !insertmacro MUI_LANGUAGE "English" !insertmacro MUI_RESERVEFILE_LANGDLL ; English LangString NAME_SecTransmissionRemoteGTK ${LANG_ENGLISH} "Transmission Remote GTK (required)" LangString DESC_SecTransmissionRemoteGTK ${LANG_ENGLISH} "The application." LangString NAME_GeoIP ${LANG_ENGLISH} "GeoIP database" LangString DESC_GeoIP ${LANG_ENGLISH} "Shows the country of origin for a peer" LangString NAME_SecGlibGtkEtc ${LANG_ENGLISH} "Glib, GTK, and other dependencies (recommended)." LangString DESC_SecGlibGtkEtc ${LANG_ENGLISH} "If unset, you'll need to install these yourself." LangString NAME_SecDesktopIcon ${LANG_ENGLISH} "Create icon on desktop" LangString DESC_SecDesktopIcon ${LANG_ENGLISH} "If set, a shortcut for Transmission Remote will be created on the desktop." ;LangString NAME_SecFiletypeAssociations ${LANG_ENGLISH} "Register Filetype Associations" ;LangString DESC_SecFiletypeAssociations ${LANG_ENGLISH} "Register Associations to Transmission Remote" ;LangString NAME_SecRegiterTorrent ${LANG_ENGLISH} "Register .torrent" ;LangString DESC_SecRegiterTorrent ${LANG_ENGLISH} "Register .torrent to Transmission Remote" ;LangString NAME_SecRegiterMagnet ${LANG_ENGLISH} "Register Magnet URI" ;LangString DESC_SecRegiterMagnet ${LANG_ENGLISH} "Register Magnet URI to Transmission Remote" ;LangString DESC_SecGeoIPDatabase ${LANG_ENGLISH} "GeoIP database" ;LangString NAME_SecLanguages ${LANG_ENGLISH} "Languages" ;LangString DESC_SecLanguages ${LANG_ENGLISH} "Languages for Transmission Remote" ;-------------------------------- ; The stuff to install Section $(NAME_SecTransmissionRemoteGTK) SecTransmissionRemoteGTK SectionIn RO SetOutPath $INSTDIR File /oname=README.TXT "..\README" File /oname=COPYING.TXT "..\COPYING" File /oname=ChangeLog.TXT "..\ChangeLog" File /oname=AUTHORS.TXT "..\AUTHORS" ; Set output path to the installation directory. SetOutPath $INSTDIR\bin ; Put file there File ".libs\transmission-remote-gtk.exe" SetOutPath $INSTDIR\share\icons\hicolor\scalable\apps File "C:\MinGW\msys\1.0\share\icons\hicolor\scalable\apps\transmission-remote-gtk.svg" SetOutPath $INSTDIR\share\icons\hicolor\48x48\apps File "C:\MinGW\msys\1.0\share\icons\hicolor\48x48\apps\transmission-remote-gtk.png" SetOutPath $INSTDIR\share\icons\hicolor\32x32\apps File "C:\MinGW\msys\1.0\share\icons\hicolor\32x32\apps\transmission-remote-gtk.png" SetOutPath $INSTDIR\share\icons\hicolor\24x24\apps File "C:\MinGW\msys\1.0\share\icons\hicolor\24x24\apps\transmission-remote-gtk.png" SetOutPath $INSTDIR\share\icons\hicolor\22x22\apps File "C:\MinGW\msys\1.0\share\icons\hicolor\22x22\apps\transmission-remote-gtk.png" SetOutPath $INSTDIR\share\icons\hicolor\16x16\apps File "C:\MinGW\msys\1.0\share\icons\hicolor\16x16\apps\transmission-remote-gtk.png" !ifndef PORTABLE ; Write the installation path into the registry WriteRegStr HKLM "SOFTWARE\TransmissionRemoteGTK" "Install_Dir" "$INSTDIR" ; Write the uninstall keys for Windows WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" "DisplayName" "Transmission Remote GTK" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" "Publisher" "Alan Fitton" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" "DisplayIcon" "$INSTDIR\bin\transmission-remote-gtk.exe,0" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" "NoRepair" 1 WriteUninstaller "uninstall.exe" !endif !insertmacro MUI_STARTMENU_WRITE_BEGIN Application SetShellVarContext current CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Transmission Remote GTK.lnk" "$INSTDIR\bin\transmission-remote-gtk.exe" "" "$INSTDIR\bin\transmission-remote-gtk.exe" 0 !ifndef PORTABLE SetShellVarContext all CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Transmission Remote GTK.lnk" "$INSTDIR\bin\transmission-remote-gtk.exe" "" "$INSTDIR\bin\transmission-remote-gtk.exe" 0 !endif !insertmacro MUI_STARTMENU_WRITE_END SectionEnd Section $(NAME_GeoIP) SecGeoIP SetOutPath $INSTDIR File "..\GeoIP.dat" File "..\GeoIPv6.dat" SectionEnd Section $(NAME_SecGlibGtkEtc) SecGlibGtkEtc SetOutPath $INSTDIR\bin File "C:\MinGW\msys\1.0\bin\libgtk-win32-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libffi-5.dll" File "C:\MinGW\msys\1.0\bin\libcairo-gobject-2.dll" File "C:\MinGW\msys\1.0\bin\libcrypto-8.dll" File "C:\MinGW\msys\1.0\bin\libssl-8.dll" File "C:\MinGW\msys\1.0\bin\freetype6.dll" File "C:\MinGW\msys\1.0\bin\libatk-1.0-0.dll" File "C:\MinGW\msys\1.0\bin\libcairo-2.dll" File "C:\MinGW\msys\1.0\bin\libcurl-4.dll" File "C:\MinGW\msys\1.0\bin\libexpat-1.dll" File "C:\MinGW\msys\1.0\bin\libfontconfig-1.dll" File "C:\MinGW\msys\1.0\bin\libgdk-win32-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libgdk_pixbuf-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libgio-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libglib-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libgmodule-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libgobject-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libgthread-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libjson-glib-1.0-0.dll" File "C:\MinGW\msys\1.0\bin\libpango-1.0-0.dll" File "C:\MinGW\msys\1.0\bin\libpangocairo-1.0-0.dll" File "C:\MinGW\msys\1.0\bin\libpangoft2-1.0-0.dll" File "C:\MinGW\msys\1.0\bin\libpangowin32-1.0-0.dll" File "C:\MinGW\msys\1.0\bin\libpng14-14.dll" File "C:\MinGW\msys\1.0\bin\zlib1.dll" File "C:\MinGW\msys\1.0\bin\libintl-8.dll" File "C:\MinGW\msys\1.0\bin\intl.dll" File "C:\MinGW\msys\1.0\bin\libiconv-2.dll" File "C:\MinGW\msys\1.0\bin\gspawn-win32-helper-console.exe" File "C:\MinGW\msys\1.0\bin\gspawn-win32-helper.exe" File "C:\MinGW\msys\1.0\bin\libproxy.dll" File "C:\MinGW\msys\1.0\bin\libmodman.dll" File "C:\MinGW\msys\1.0\bin\libstdc++-6.dll" File "C:\MinGW\msys\1.0\bin\libgcc_s_sjlj-1.dll" File "C:\MinGW\msys\1.0\bin\libgcc_s_dw2-1.dll" SetOutPath $INSTDIR\lib\gtk-2.0\2.10.0\engines File "C:\MinGW\msys\1.0\lib\gtk-2.0\2.10.0\engines\libpixmap.dll" File "C:\MinGW\msys\1.0\lib\gtk-2.0\2.10.0\engines\libwimp.dll" SetOutPath $INSTDIR\lib\gtk-2.0\modules File "C:\MinGW\msys\1.0\lib\gtk-2.0\modules\libgail.dll" SetOutPath $INSTDIR\etc\gtk-2.0 File "C:\MinGW\msys\1.0\etc\gtk-2.0\gtkrc" SetOutPath $INSTDIR\share\themes\MS-Windows\gtk-2.0 File "C:\MinGW\msys\1.0\share\themes\MS-Windows\gtk-2.0\gtkrc" SetOutPath $INSTDIR\share\locale\ca\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\ca\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\ca\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\ca\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\cs\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\cs\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\cs\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\cs\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\de\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\de\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\de\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\de\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\es\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\es\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\es\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\es\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\fr\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\fr\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\fr\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\fr\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\it\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\it\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\it\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\it\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\ko\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\ko\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\ko\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\ko\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\lt\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\lt\LC_MESSAGES\*.mo" #File "C:\MinGW\share\locale\lt\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\lt\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\pl\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\pl\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\pl\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\pl\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\pt_BR\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\pt_BR\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\pt_BR\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\pt_BR\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\ru\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\ru\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\ru\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\ru\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\sv\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\sv\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\sv\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\sv\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\tr\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\tr\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\tr\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\tr\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\uk\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\uk\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\uk\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\uk\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\locale\zh_TW\LC_MESSAGES File /x dos2unix.mo "C:\MinGW\msys\1.0\share\locale\zh_TW\LC_MESSAGES\*.mo" File /x gcc.mo /x cpplib.mo "C:\MinGW\share\locale\zh_TW\LC_MESSAGES\*.mo" File "C:\MinGW\msys\1.0\lib\locale\zh_TW\LC_MESSAGES\*.mo" SetOutPath $INSTDIR\share\icons\hicolor File "C:\MinGW\msys\1.0\share\icons\hicolor\index.theme" File "C:\MinGW\msys\1.0\share\icons\hicolor\icon-theme.cache" SectionEnd ; Optional section (can be disabled by the user) Section /o $(NAME_SecDesktopIcon) SecDesktopIcon SetShellVarContext current SetOutPath "$INSTDIR\bin" CreateShortCut "$DESKTOP\Transmission Remote GTK.lnk" "$INSTDIR\bin\transmission-remote-gtk.exe" "" "$INSTDIR\bin\transmission-remote-gtk.exe" 0 SectionEnd ;!ifndef PORTABLE ;SubSection $(NAME_SecFiletypeAssociations) SecFiletypeAssociations ; Section $(NAME_SecRegiterTorrent) SecRegiterTorrent ; ${registerExtension} "$INSTDIR\Transmission Remote.exe" ".torrent" "Transmission Remote Torrent" ; SectionEnd ; Section $(NAME_SecRegiterMagnet) SecRegiterMagnet ; ${registerProtocol} "$INSTDIR\Transmission Remote.exe" "magnet" "Magnet URI" ; SectionEnd ;SubSectionEnd ;!endif ; Translation ;SectionGroup $(NAME_SecLanguages) SecLanguages ; Section /o "Brazilian Portuguese" SecLanguagesBrazilianPortuguese ; CreateDirectory "$INSTDIR\pt-BR" ; SetOutPath "$INSTDIR\pt-BR" ; File "TransmissionClientNew\bin\Release\pt-BR\Transmission Remote.resources.dll" ; SectionEnd ; Section /o "Chinese" SecLanguagesChinese ; CreateDirectory "$INSTDIR\zh-CN" ; SetOutPath "$INSTDIR\zh-CN" ; File "TransmissionClientNew\bin\Release\zh-CN\Transmission Remote.resources.dll" ; SectionEnd ;SectionGroupEnd ;-------------------------------- ; Uninstaller Section "Uninstall" ;!ifndef PORTABLE ; Unregister File Association ; ${unregisterExtension} ".torrent" "Transmission Remote Torrent" ; ${unregisterProtocol} "magnet" "Magnet URI" ;!endif ; Remove files and uninstaller Delete "$INSTDIR\AUTHORS.TXT" Delete "$INSTDIR\bin\freetype6.dll" Delete "$INSTDIR\bin\gspawn-win32-helper-console.exe" Delete "$INSTDIR\bin\gspawn-win32-helper.exe" Delete "$INSTDIR\bin\intl.dll" Delete "$INSTDIR\bin\libatk-1.0-0.dll" Delete "$INSTDIR\bin\libcairo-2.dll" Delete "$INSTDIR\bin\libcairo-gobject-2.dll" Delete "$INSTDIR\bin\libcrypto-8.dll" Delete "$INSTDIR\bin\libcurl-4.dll" Delete "$INSTDIR\bin\libexpat-1.dll" Delete "$INSTDIR\bin\libffi-5.dll" Delete "$INSTDIR\bin\libfontconfig-1.dll" Delete "$INSTDIR\bin\libgcc_s_dw2-1.dll" Delete "$INSTDIR\bin\libgcc_s_sjlj-1.dll" Delete "$INSTDIR\bin\libgdk-win32-2.0-0.dll" Delete "$INSTDIR\bin\libgdk_pixbuf-2.0-0.dll" Delete "$INSTDIR\bin\libgio-2.0-0.dll" Delete "$INSTDIR\bin\libglib-2.0-0.dll" Delete "$INSTDIR\bin\libgmodule-2.0-0.dll" Delete "$INSTDIR\bin\libgobject-2.0-0.dll" Delete "$INSTDIR\bin\libgthread-2.0-0.dll" Delete "$INSTDIR\bin\libgtk-win32-2.0-0.dll" Delete "$INSTDIR\bin\libiconv-2.dll" Delete "$INSTDIR\bin\libintl-8.dll" Delete "$INSTDIR\bin\libjson-glib-1.0-0.dll" Delete "$INSTDIR\bin\libmodman.dll" Delete "$INSTDIR\bin\libpango-1.0-0.dll" Delete "$INSTDIR\bin\libpangocairo-1.0-0.dll" Delete "$INSTDIR\bin\libpangoft2-1.0-0.dll" Delete "$INSTDIR\bin\libpangowin32-1.0-0.dll" Delete "$INSTDIR\bin\libpng14-14.dll" Delete "$INSTDIR\bin\libproxy.dll" Delete "$INSTDIR\bin\libssl-8.dll" Delete "$INSTDIR\bin\libstdc++-6.dll" Delete "$INSTDIR\bin\transmission-remote-gtk.exe" Delete "$INSTDIR\bin\zlib1.dll" Delete "$INSTDIR\ChangeLog.TXT" Delete "$INSTDIR\COPYING.TXT" Delete "$INSTDIR\etc\gtk-2.0\gtkrc" Delete "$INSTDIR\GeoIP.dat" Delete "$INSTDIR\GeoIPv6.dat" Delete "$INSTDIR\lib\gtk-2.0\2.10.0\engines\libpixmap.dll" Delete "$INSTDIR\lib\gtk-2.0\2.10.0\engines\libwimp.dll" Delete "$INSTDIR\lib\gtk-2.0\modules\libgail.dll" Delete "$INSTDIR\README.TXT" Delete "$INSTDIR\share\icons\hicolor\16x16\apps\transmission-remote-gtk.png" Delete "$INSTDIR\share\icons\hicolor\22x22\apps\transmission-remote-gtk.png" Delete "$INSTDIR\share\icons\hicolor\24x24\apps\transmission-remote-gtk.png" Delete "$INSTDIR\share\icons\hicolor\32x32\apps\transmission-remote-gtk.png" Delete "$INSTDIR\share\icons\hicolor\48x48\apps\transmission-remote-gtk.png" Delete "$INSTDIR\share\icons\hicolor\icon-theme.cache" Delete "$INSTDIR\share\icons\hicolor\index.theme" Delete "$INSTDIR\share\icons\hicolor\scalable\apps\transmission-remote-gtk.svg" Delete "$INSTDIR\share\locale\ca\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\ca\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\ca\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\ca\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\ca\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\ca\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\ca\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\ca\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\ca\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\cs\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\cs\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\cs\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\cs\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\cs\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\cs\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\cs\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\cs\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\cs\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\it\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\it\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\it\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\it\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\it\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\it\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\it\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\it\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\it\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\lt\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\lt\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\lt\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\lt\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\lt\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\lt\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\pt_BR\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\pt_BR\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\pt_BR\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\pt_BR\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\pt_BR\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\pt_BR\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\pt_BR\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\pt_BR\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\pt_BR\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\sv\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\sv\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\sv\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\sv\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\sv\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\sv\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\sv\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\sv\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\sv\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\tr\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\tr\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\tr\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\tr\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\tr\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\tr\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\tr\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\tr\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\tr\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\atk10.mo" Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\gettext-tools.mo" Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\gtk20-properties.mo" Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\gtk20.mo" Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\transmission-remote-gtk.mo" Delete "$INSTDIR\share\themes\MS-Windows\gtk-2.0\gtkrc" Delete "$INSTDIR\uninstall.exe" ; Remove shortcuts, if any !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder SetShellVarContext current Delete "$SMPROGRAMS\$StartMenuFolder\*.*" RMDir "$SMPROGRAMS\$StartMenuFolder" !ifndef PORTABLE SetShellVarContext all Delete "$SMPROGRAMS\$StartMenuFolder\*.*" RMDir "$SMPROGRAMS\$StartMenuFolder" !endif ; Remove directories used RMDir "$INSTDIR\share\themes\MS-Windows\gtk-2.0" RMDir "$INSTDIR\share\themes\MS-Windows" RMDir "$INSTDIR\share\themes" RMDir "$INSTDIR\share\locale\zh_TW\LC_MESSAGES" RMDir "$INSTDIR\share\locale\zh_TW" RMDir "$INSTDIR\share\locale\uk\LC_MESSAGES" RMDir "$INSTDIR\share\locale\uk" RMDir "$INSTDIR\share\locale\tr\LC_MESSAGES" RMDir "$INSTDIR\share\locale\tr" RMDir "$INSTDIR\share\locale\sv\LC_MESSAGES" RMDir "$INSTDIR\share\locale\sv" RMDir "$INSTDIR\share\locale\ru\LC_MESSAGES" RMDir "$INSTDIR\share\locale\ru" RMDir "$INSTDIR\share\locale\pt_BR\LC_MESSAGES" RMDir "$INSTDIR\share\locale\pt_BR" RMDir "$INSTDIR\share\locale\pl\LC_MESSAGES" RMDir "$INSTDIR\share\locale\pl" RMDir "$INSTDIR\share\locale\lt\LC_MESSAGES" RMDir "$INSTDIR\share\locale\lt" RMDir "$INSTDIR\share\locale\ko\LC_MESSAGES" RMDir "$INSTDIR\share\locale\ko" RMDir "$INSTDIR\share\locale\it\LC_MESSAGES" RMDir "$INSTDIR\share\locale\it" RMDir "$INSTDIR\share\locale\fr\LC_MESSAGES" RMDir "$INSTDIR\share\locale\fr" RMDir "$INSTDIR\share\locale\es\LC_MESSAGES" RMDir "$INSTDIR\share\locale\es" RMDir "$INSTDIR\share\locale\de\LC_MESSAGES" RMDir "$INSTDIR\share\locale\de" RMDir "$INSTDIR\share\locale\cs\LC_MESSAGES" RMDir "$INSTDIR\share\locale\cs" RMDir "$INSTDIR\share\locale\ca\LC_MESSAGES" RMDir "$INSTDIR\share\locale\ca" RMDir "$INSTDIR\share\locale" RMDir "$INSTDIR\share\icons\hicolor\scalable\apps" RMDir "$INSTDIR\share\icons\hicolor\scalable" RMDir "$INSTDIR\share\icons\hicolor\48x48\apps" RMDir "$INSTDIR\share\icons\hicolor\48x48" RMDir "$INSTDIR\share\icons\hicolor\32x32\apps" RMDir "$INSTDIR\share\icons\hicolor\32x32" RMDir "$INSTDIR\share\icons\hicolor\24x24\apps" RMDir "$INSTDIR\share\icons\hicolor\24x24" RMDir "$INSTDIR\share\icons\hicolor\22x22\apps" RMDir "$INSTDIR\share\icons\hicolor\22x22" RMDir "$INSTDIR\share\icons\hicolor\16x16\apps" RMDir "$INSTDIR\share\icons\hicolor\16x16" RMDir "$INSTDIR\share\icons\hicolor" RMDir "$INSTDIR\share\icons" RMDir "$INSTDIR\share" RMDir "$INSTDIR\lib\gtk-2.0\modules" RMDir "$INSTDIR\lib\gtk-2.0\2.10.0\engines" RMDir "$INSTDIR\lib\gtk-2.0\2.10.0" RMDir "$INSTDIR\lib\gtk-2.0" RMDir "$INSTDIR\lib" RMDir "$INSTDIR\etc\gtk-2.0" RMDir "$INSTDIR\etc" RMDir "$INSTDIR\bin" RMDir "$INSTDIR" DeleteRegKey /ifempty HKCU "SOFTWARE\TransmissionRemoteGTK" !ifndef PORTABLE DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" !endif SectionEnd !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecTransmissionRemoteGTK} $(DESC_SecTransmissionRemoteGTK) !insertmacro MUI_DESCRIPTION_TEXT ${SecGeoIP} $(DESC_GeoIP) !insertmacro MUI_DESCRIPTION_TEXT ${SecGlibGtkEtc} $(DESC_SecGlibGtkEtc) !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopIcon} $(DESC_SecDesktopIcon) ; !insertmacro MUI_DESCRIPTION_TEXT ${SecFiletypeAssociations} $(DESC_SecFiletypeAssociations) ; !insertmacro MUI_DESCRIPTION_TEXT ${SecGeoIPDatabase} $(DESC_SecGeoIPDatabase) ; !insertmacro MUI_DESCRIPTION_TEXT ${SecLanguages} $(DESC_SecLanguages) ; !insertmacro MUI_DESCRIPTION_TEXT ${SecRegiterTorrent} $(DESC_SecRegiterTorrent) ; !insertmacro MUI_DESCRIPTION_TEXT ${SecRegiterMagnet} $(DESC_SecRegiterMagnet) !insertmacro MUI_FUNCTION_DESCRIPTION_END Function .onInit System::Call 'kernel32::CreateMutexA(i 0, i 0, t "Transmission Remote GTK") ?e' Pop $R0 StrCmp $R0 0 +3 MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." Abort !insertmacro MUI_LANGDLL_DISPLAY !ifdef PORTABLE StrCpy $INSTDIR "\${ProgramFilesDir}" !else ${If} ${RunningX64} StrCpy $INSTDIR "$PROGRAMFILES64\${ProgramFilesDir}" ${Else} StrCpy $INSTDIR "$PROGRAMFILES\${ProgramFilesDir}" ${Endif} !endif FunctionEnd transmission-remote-gtk-1.4.1/src/installer.nsi000066400000000000000000000643071341276053300216370ustar00rootroot00000000000000!include "MUI2.nsh" ;!include "FileAssociation.nsh" ;!include "ProtocolAssociation.nsh" !include "x64.nsh" ;-------------------------------- ; The name of the installer Name "Transmission Remote GTK" ; The file to write !ifndef REV OutFile "transmission-remote-gtk-1.0.2-installer.exe" !else OutFile "transmission-remote-gtk-${REV}-installer.exe" !endif ; The default installation directory !define ProgramFilesDir "Transmission Remote GTK" RequestExecutionLevel admin ;-------------------------------- XPStyle on Var StartMenuFolder !define MUI_ICON "transmission_large.ico" !define MUI_UNICON "transmission_large.ico" !define MUI_HEADERIMAGE ;!define MUI_HEADERIMAGE_BITMAP "logo.bmp" ;!define MUI_WELCOMEFINISHPAGE_BITMAP "nsis_wizard.bmp" ;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "nsis_wizard.bmp" ;!define MUI_COMPONENTSPAGE_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\colorful.bmp" !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_ABORTWARNING ;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" ;!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show ReadMe" ;!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED ; Pages !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "..\COPYING" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_WELCOME !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_FINISH ;-------------------------------- !insertmacro MUI_LANGUAGE "English" !insertmacro MUI_RESERVEFILE_LANGDLL ; English LangString NAME_SecTransmissionRemoteGTK ${LANG_ENGLISH} "Transmission Remote GTK (required)" LangString DESC_SecTransmissionRemoteGTK ${LANG_ENGLISH} "The application." LangString NAME_GeoIP ${LANG_ENGLISH} "GeoIP database" LangString DESC_GeoIP ${LANG_ENGLISH} "Shows the country of origin for a peer" LangString NAME_SecGlibGtkEtc ${LANG_ENGLISH} "Glib, GTK, and other dependencies (recommended)." LangString DESC_SecGlibGtkEtc ${LANG_ENGLISH} "If unset, you'll need to install these yourself." LangString NAME_SecDesktopIcon ${LANG_ENGLISH} "Create icon on desktop" LangString DESC_SecDesktopIcon ${LANG_ENGLISH} "If set, a shortcut for Transmission Remote will be created on the desktop." ;LangString NAME_SecFiletypeAssociations ${LANG_ENGLISH} "Register Filetype Associations" ;LangString DESC_SecFiletypeAssociations ${LANG_ENGLISH} "Register Associations to Transmission Remote" ;LangString NAME_SecRegiterTorrent ${LANG_ENGLISH} "Register .torrent" ;LangString DESC_SecRegiterTorrent ${LANG_ENGLISH} "Register .torrent to Transmission Remote" ;LangString NAME_SecRegiterMagnet ${LANG_ENGLISH} "Register Magnet URI" ;LangString DESC_SecRegiterMagnet ${LANG_ENGLISH} "Register Magnet URI to Transmission Remote" ;LangString DESC_SecGeoIPDatabase ${LANG_ENGLISH} "GeoIP database" ;LangString NAME_SecLanguages ${LANG_ENGLISH} "Languages" ;LangString DESC_SecLanguages ${LANG_ENGLISH} "Languages for Transmission Remote" ;-------------------------------- ; The stuff to install Section $(NAME_SecTransmissionRemoteGTK) SecTransmissionRemoteGTK SectionIn RO SetOutPath $INSTDIR File /oname=README.TXT "..\README" File /oname=COPYING.TXT "..\COPYING" File /oname=ChangeLog.TXT "..\ChangeLog" File /oname=AUTHORS.TXT "..\AUTHORS" ; Set output path to the installation directory. SetOutPath $INSTDIR\bin ; Put file there File ".libs\transmission-remote-gtk.exe" #SetOutPath $INSTDIR\etc\gtk-2.0 #File "C:\MinGW\msys\1.0\etc\gtk-2.0\gtkrc" #SetOutPath $INSTDIR\share\themes\MS-Windows\gtk-2.0 #File "C:\MinGW\msys\1.0\share\themes\MS-Windows\gtk-2.0\gtkrc" SetOutPath $INSTDIR\share\locale\uk\LC_MESSAGES File "C:\MinGW\msys\1.0\lib\locale\uk\LC_MESSAGES\transmission-remote-gtk.mo" SetOutPath $INSTDIR\share\locale\fr\LC_MESSAGES File "C:\MinGW\msys\1.0\lib\locale\fr\LC_MESSAGES\transmission-remote-gtk.mo" SetOutPath $INSTDIR\share\locale\ru\LC_MESSAGES File "C:\MinGW\msys\1.0\lib\locale\ru\LC_MESSAGES\transmission-remote-gtk.mo" SetOutPath $INSTDIR\share\locale\pl\LC_MESSAGES File "C:\MinGW\msys\1.0\lib\locale\pl\LC_MESSAGES\transmission-remote-gtk.mo" SetOutPath $INSTDIR\share\locale\ko\LC_MESSAGES File "C:\MinGW\msys\1.0\lib\locale\ko\LC_MESSAGES\transmission-remote-gtk.mo" SetOutPath $INSTDIR\share\locale\es\LC_MESSAGES File "C:\MinGW\msys\1.0\lib\locale\es\LC_MESSAGES\transmission-remote-gtk.mo" SetOutPath $INSTDIR\share\locale\de\LC_MESSAGES File "C:\MinGW\msys\1.0\lib\locale\de\LC_MESSAGES\transmission-remote-gtk.mo" SetOutPath $INSTDIR\share\locale\lt\LC_MESSAGES File "C:\MinGW\msys\1.0\lib\locale\lt\LC_MESSAGES\transmission-remote-gtk.mo" SetOutPath $INSTDIR\share\icons\hicolor\scalable\apps File "C:\MinGW\msys\1.0\share\icons\hicolor\scalable\apps\transmission-remote-gtk.svg" SetOutPath $INSTDIR\share\icons\hicolor\48x48\apps File "C:\MinGW\msys\1.0\share\icons\hicolor\48x48\apps\transmission-remote-gtk.png" SetOutPath $INSTDIR\share\icons\hicolor\32x32\apps File "C:\MinGW\msys\1.0\share\icons\hicolor\32x32\apps\transmission-remote-gtk.png" SetOutPath $INSTDIR\share\icons\hicolor\24x24\apps File "C:\MinGW\msys\1.0\share\icons\hicolor\24x24\apps\transmission-remote-gtk.png" SetOutPath $INSTDIR\share\icons\hicolor\22x22\apps File "C:\MinGW\msys\1.0\share\icons\hicolor\22x22\apps\transmission-remote-gtk.png" SetOutPath $INSTDIR\share\icons\hicolor\16x16\apps File "C:\MinGW\msys\1.0\share\icons\hicolor\16x16\apps\transmission-remote-gtk.png" !ifndef PORTABLE ; Write the installation path into the registry WriteRegStr HKLM "SOFTWARE\TransmissionRemoteGTK" "Install_Dir" "$INSTDIR" ; Write the uninstall keys for Windows WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" "DisplayName" "Transmission Remote GTK" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" "Publisher" "Alan Fitton" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" "DisplayIcon" "$INSTDIR\bin\transmission-remote-gtk.exe,0" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" "NoRepair" 1 WriteUninstaller "uninstall.exe" !endif !insertmacro MUI_STARTMENU_WRITE_BEGIN Application SetShellVarContext current CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Transmission Remote GTK.lnk" "$INSTDIR\bin\transmission-remote-gtk.exe" "" "$INSTDIR\bin\transmission-remote-gtk.exe" 0 !ifndef PORTABLE SetShellVarContext all CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Transmission Remote GTK.lnk" "$INSTDIR\bin\transmission-remote-gtk.exe" "" "$INSTDIR\bin\transmission-remote-gtk.exe" 0 !endif !insertmacro MUI_STARTMENU_WRITE_END SectionEnd Section $(NAME_GeoIP) SecGeoIP SetOutPath $INSTDIR File "..\GeoIP.dat" File "..\GeoIPv6.dat" SectionEnd Section $(NAME_SecGlibGtkEtc) SecGlibGtkEtc SetOutPath $INSTDIR\bin File "C:\MinGW\msys\1.0\bin\libgtk-3-0.dll" File "C:\MinGW\msys\1.0\bin\libffi-5.dll" File "C:\MinGW\msys\1.0\bin\libcairo-gobject-2.dll" File "C:\MinGW\msys\1.0\bin\libeay32.dll" File "C:\MinGW\msys\1.0\bin\libssl32.dll" File "C:\MinGW\msys\1.0\bin\freetype6.dll" File "C:\MinGW\msys\1.0\bin\libatk-1.0-0.dll" File "C:\MinGW\msys\1.0\bin\libcairo-2.dll" File "C:\MinGW\msys\1.0\bin\libcurl.dll" File "C:\MinGW\msys\1.0\bin\libexpat-1.dll" File "C:\MinGW\msys\1.0\bin\libfontconfig-1.dll" File "C:\MinGW\msys\1.0\bin\libgdk-3-0.dll" File "C:\MinGW\msys\1.0\bin\libgdk_pixbuf-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libgio-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libglib-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libgmodule-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libgobject-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libgthread-2.0-0.dll" File "C:\MinGW\msys\1.0\bin\libjson-glib-1.0-0.dll" File "C:\MinGW\msys\1.0\bin\libpango-1.0-0.dll" File "C:\MinGW\msys\1.0\bin\libpangocairo-1.0-0.dll" File "C:\MinGW\msys\1.0\bin\libpangoft2-1.0-0.dll" File "C:\MinGW\msys\1.0\bin\libpangowin32-1.0-0.dll" File "C:\MinGW\msys\1.0\bin\libpng14-14.dll" File "C:\MinGW\msys\1.0\bin\zlib1.dll" File "C:\MinGW\msys\1.0\bin\libintl-8.dll" File "C:\MinGW\msys\1.0\bin\intl.dll" File "C:\MinGW\msys\1.0\bin\libiconv-2.dll" File "C:\MinGW\msys\1.0\bin\gspawn-win32-helper-console.exe" File "C:\MinGW\msys\1.0\bin\gspawn-win32-helper.exe" File "C:\MinGW\msys\1.0\bin\libproxy.dll" File "C:\MinGW\msys\1.0\bin\libmodman.dll" File "C:\MinGW\msys\1.0\bin\libstdc++-6.dll" File "C:\MinGW\msys\1.0\bin\libgcc_s_sjlj-1.dll" File "C:\MinGW\msys\1.0\bin\libgcc_s_dw2-1.dll" #SetOutPath $INSTDIR\lib\gtk-2.0\2.10.0\engines #File "C:\MinGW\msys\1.0\lib\gtk-2.0\2.10.0\engines\libpixmap.dll" #File "C:\MinGW\msys\1.0\lib\gtk-2.0\2.10.0\engines\libwimp.dll" #SetOutPath $INSTDIR\lib\gtk-2.0\modules #File "C:\MinGW\msys\1.0\lib\gtk-2.0\modules\libgail.dll" #SetOutPath $INSTDIR\share\locale\lt\LC_MESSAGES #File "C:\MinGW\share\locale\lt\LC_MESSAGES\gtk30.mo" #File "C:\MinGW\share\locale\lt\LC_MESSAGES\gtk30-properties.mo" #File "C:\MinGW\share\locale\lt\LC_MESSAGES\glib20.mo" #File "C:\MinGW\share\locale\lt\LC_MESSAGES\gdk-pixbuf.mo" #File "C:\MinGW\share\locale\lt\LC_MESSAGES\atk10.mo" #SetOutPath $INSTDIR\share\locale\uk\LC_MESSAGES #File "C:\MinGW\share\locale\uk\LC_MESSAGES\libiconv.mo" #File "C:\MinGW\share\locale\uk\LC_MESSAGES\gtk30.mo" #File "C:\MinGW\share\locale\uk\LC_MESSAGES\gtk30-properties.mo" #File "C:\MinGW\share\locale\uk\LC_MESSAGES\glib20.mo" #File "C:\MinGW\share\locale\uk\LC_MESSAGES\gettext-tools.mo" #File "C:\MinGW\share\locale\uk\LC_MESSAGES\gettext-runtime.mo" #File "C:\MinGW\share\locale\uk\LC_MESSAGES\gdk-pixbuf.mo" #File "C:\MinGW\share\locale\uk\LC_MESSAGES\atk10.mo" SetOutPath $INSTDIR\share\locale\fr\LC_MESSAGES File "C:\MinGW\msys\1.0\share\locale\fr\LC_MESSAGES\gtk30.mo" File "C:\MinGW\msys\1.0\share\locale\fr\LC_MESSAGES\gtk30-properties.mo" #File "C:\MinGW\share\locale\fr\LC_MESSAGES\glib20.mo" File "C:\MinGW\share\locale\fr\LC_MESSAGES\gettext-runtime.mo" #File "C:\MinGW\share\locale\fr\LC_MESSAGES\gdk-pixbuf.mo" #File "C:\MinGW\share\locale\fr\LC_MESSAGES\atk10.mo" SetOutPath $INSTDIR\share\locale\ru\LC_MESSAGES File "C:\MinGW\share\locale\ru\LC_MESSAGES\libiconv.mo" #File "C:\MinGW\share\locale\ru\LC_MESSAGES\gtk30.mo" #File "C:\MinGW\share\locale\ru\LC_MESSAGES\gtk30-properties.mo" #File "C:\MinGW\share\locale\ru\LC_MESSAGES\glib20.mo" File "C:\MinGW\share\locale\ru\LC_MESSAGES\gettext-tools.mo" File "C:\MinGW\share\locale\ru\LC_MESSAGES\gettext-runtime.mo" #File "C:\MinGW\share\locale\ru\LC_MESSAGES\gdk-pixbuf.mo" #File "C:\MinGW\share\locale\ru\LC_MESSAGES\atk10.mo" SetOutPath $INSTDIR\share\locale\pl\LC_MESSAGES File "C:\MinGW\share\locale\pl\LC_MESSAGES\libiconv.mo" #File "C:\MinGW\share\locale\pl\LC_MESSAGES\gtk30.mo" #File "C:\MinGW\share\locale\pl\LC_MESSAGES\gtk30-properties.mo" #File "C:\MinGW\share\locale\pl\LC_MESSAGES\glib20.mo" File "C:\MinGW\share\locale\pl\LC_MESSAGES\gettext-tools.mo" File "C:\MinGW\share\locale\pl\LC_MESSAGES\gettext-runtime.mo" #File "C:\MinGW\share\locale\pl\LC_MESSAGES\gdk-pixbuf.mo" #File "C:\MinGW\share\locale\pl\LC_MESSAGES\atk10.mo" SetOutPath $INSTDIR\share\locale\ko\LC_MESSAGES #File "C:\MinGW\share\locale\ko\LC_MESSAGES\gtk30.mo" #File "C:\MinGW\share\locale\ko\LC_MESSAGES\gtk30-properties.mo" #File "C:\MinGW\share\locale\ko\LC_MESSAGES\glib20.mo" File "C:\MinGW\share\locale\ko\LC_MESSAGES\gettext-tools.mo" File "C:\MinGW\share\locale\ko\LC_MESSAGES\gettext-runtime.mo" #File "C:\MinGW\share\locale\ko\LC_MESSAGES\gdk-pixbuf.mo" #File "C:\MinGW\share\locale\ko\LC_MESSAGES\atk10.mo" SetOutPath $INSTDIR\share\locale\es\LC_MESSAGES File "C:\MinGW\share\locale\es\LC_MESSAGES\libiconv.mo" #File "C:\MinGW\share\locale\es\LC_MESSAGES\gtk30.mo" #File "C:\MinGW\share\locale\es\LC_MESSAGES\gtk30-properties.mo" #File "C:\MinGW\share\locale\es\LC_MESSAGES\glib20.mo" File "C:\MinGW\share\locale\es\LC_MESSAGES\gettext-tools.mo" File "C:\MinGW\share\locale\es\LC_MESSAGES\gettext-runtime.mo" #File "C:\MinGW\share\locale\es\LC_MESSAGES\gdk-pixbuf.mo" #File "C:\MinGW\share\locale\es\LC_MESSAGES\atk10.mo" SetOutPath $INSTDIR\share\locale\de\LC_MESSAGES File "C:\MinGW\share\locale\de\LC_MESSAGES\libiconv.mo" #File "C:\MinGW\share\locale\de\LC_MESSAGES\gtk30.mo" #File "C:\MinGW\share\locale\de\LC_MESSAGES\gtk30-properties.mo" #File "C:\MinGW\share\locale\de\LC_MESSAGES\glib20.mo" File "C:\MinGW\share\locale\de\LC_MESSAGES\gettext-tools.mo" File "C:\MinGW\share\locale\de\LC_MESSAGES\gettext-runtime.mo" #File "C:\MinGW\share\locale\de\LC_MESSAGES\gdk-pixbuf.mo" #File "C:\MinGW\share\locale\de\LC_MESSAGES\atk10.mo" SetOutPath $INSTDIR\share\icons\hicolor File "C:\MinGW\msys\1.0\share\icons\hicolor\index.theme" File "C:\MinGW\msys\1.0\share\icons\hicolor\icon-theme.cache" SectionEnd ; Optional section (can be disabled by the user) Section /o $(NAME_SecDesktopIcon) SecDesktopIcon SetShellVarContext current SetOutPath "$INSTDIR\bin" CreateShortCut "$DESKTOP\Transmission Remote GTK.lnk" "$INSTDIR\bin\transmission-remote-gtk.exe" "" "$INSTDIR\bin\transmission-remote-gtk.exe" 0 SectionEnd ;!ifndef PORTABLE ;SubSection $(NAME_SecFiletypeAssociations) SecFiletypeAssociations ; Section $(NAME_SecRegiterTorrent) SecRegiterTorrent ; ${registerExtension} "$INSTDIR\Transmission Remote.exe" ".torrent" "Transmission Remote Torrent" ; SectionEnd ; Section $(NAME_SecRegiterMagnet) SecRegiterMagnet ; ${registerProtocol} "$INSTDIR\Transmission Remote.exe" "magnet" "Magnet URI" ; SectionEnd ;SubSectionEnd ;!endif ; Translation ;SectionGroup $(NAME_SecLanguages) SecLanguages ; Section /o "Brazilian Portuguese" SecLanguagesBrazilianPortuguese ; CreateDirectory "$INSTDIR\pt-BR" ; SetOutPath "$INSTDIR\pt-BR" ; File "TransmissionClientNew\bin\Release\pt-BR\Transmission Remote.resources.dll" ; SectionEnd ; Section /o "Chinese" SecLanguagesChinese ; CreateDirectory "$INSTDIR\zh-CN" ; SetOutPath "$INSTDIR\zh-CN" ; File "TransmissionClientNew\bin\Release\zh-CN\Transmission Remote.resources.dll" ; SectionEnd ;SectionGroupEnd ;-------------------------------- ; Uninstaller Section "Uninstall" ;!ifndef PORTABLE ; Unregister File Association ; ${unregisterExtension} ".torrent" "Transmission Remote Torrent" ; ${unregisterProtocol} "magnet" "Magnet URI" ;!endif ; Remove files and uninstaller Delete "$INSTDIR\COPYING.txt" Delete "$INSTDIR\README.txt" Delete "$INSTDIR\AUTHORS.txt" Delete "$INSTDIR\ChangeLog.txt" Delete "$INSTDIR\GeoIP.dat" Delete "$INSTDIR\GeoIPv6.dat" Delete "$INSTDIR\uninstall.exe" Delete "$INSTDIR\bin\transmission-remote-gtk.exe" Delete "$INSTDIR\bin\freetype6.dll" Delete "$INSTDIR\bin\intl.dll" Delete "$INSTDIR\bin\libatk-1.0-0.dll" Delete "$INSTDIR\bin\libcairo-2.dll" Delete "$INSTDIR\bin\libcurl.dll" Delete "$INSTDIR\bin\libexpat-1.dll" Delete "$INSTDIR\bin\libfontconfig-1.dll" Delete "$INSTDIR\bin\libgdk-3-0.dll" Delete "$INSTDIR\bin\libgdk_pixbuf-2.0-0.dll" Delete "$INSTDIR\bin\libgio-2.0-0.dll" Delete "$INSTDIR\bin\libglib-2.0-0.dll" Delete "$INSTDIR\bin\libgmodule-2.0-0.dll" Delete "$INSTDIR\bin\libgobject-2.0-0.dll" Delete "$INSTDIR\bin\libgthread-2.0-0.dll" Delete "$INSTDIR\bin\libjson-glib-1.0-0.dll" Delete "$INSTDIR\bin\libpango-1.0-0.dll" Delete "$INSTDIR\bin\libpangocairo-1.0-0.dll" Delete "$INSTDIR\bin\libpangoft2-1.0-0.dll" Delete "$INSTDIR\bin\libpangowin32-1.0-0.dll" Delete "$INSTDIR\bin\libpng14-14.dll" Delete "$INSTDIR\bin\intl.dll" Delete "$INSTDIR\bin\libintl-8.dll" Delete "$INSTDIR\bin\libiconv-2.dll" Delete "$INSTDIR\bin\zlib1.dll" Delete "$INSTDIR\bin\libgtk-3-0.dll" Delete "$INSTDIR\bin\libffi-5.dll" Delete "$INSTDIR\bin\libcairo-gobject-2.dll" Delete "$INSTDIR\bin\libeay32.dll" Delete "$INSTDIR\bin\libssl32.dll" Delete "$INSTDIR\bin\libproxy.dll" Delete "$INSTDIR\bin\libmodman.dll" Delete "$INSTDIR\bin\libstdc++-6.dll" Delete "$INSTDIR\bin\libgcc_s_sjlj-1.dll" Delete "$INSTDIR\bin\libgcc_s_dw2-1.dll" Delete "$INSTDIR\bin\gspawn-win32-helper-console.exe" Delete "$INSTDIR\bin\gspawn-win32-helper.exe" #Delete "$INSTDIR\lib\gtk-2.0\2.10.0\engines\libpixmap.dll" #Delete "$INSTDIR\lib\gtk-2.0\2.10.0\engines\libwimp.dll" #Delete "$INSTDIR\lib\gtk-2.0\modules\libgail.dll" #Delete "$INSTDIR\etc\gtk-2.0\gtkrc" Delete "$INSTDIR\share\icons\hicolor\16x16\apps\transmission-remote-gtk.png" Delete "$INSTDIR\share\icons\hicolor\22x22\apps\transmission-remote-gtk.png" Delete "$INSTDIR\share\icons\hicolor\24x24\apps\transmission-remote-gtk.png" Delete "$INSTDIR\share\icons\hicolor\32x32\apps\transmission-remote-gtk.png" Delete "$INSTDIR\share\icons\hicolor\48x48\apps\transmission-remote-gtk.png" Delete "$INSTDIR\share\icons\hicolor\icon-theme.cache" Delete "$INSTDIR\share\icons\hicolor\index.theme" Delete "$INSTDIR\share\icons\hicolor\scalable\apps\transmission-remote-gtk.svg" #Delete "$INSTDIR\share\locale\de\LC_MESSAGES\atk10.mo" #Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gettext-tools.mo" #Delete "$INSTDIR\share\locale\de\LC_MESSAGES\glib20.mo" #Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gtk30-properties.mo" #Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gtk30.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\de\LC_MESSAGES\transmission-remote-gtk.mo" #Delete "$INSTDIR\share\locale\lt\LC_MESSAGES\atk10.mo" #Delete "$INSTDIR\share\locale\lt\LC_MESSAGES\gdk-pixbuf.mo" #Delete "$INSTDIR\share\locale\lt\LC_MESSAGES\glib20.mo" #Delete "$INSTDIR\share\locale\lt\LC_MESSAGES\gtk30-properties.mo" #Delete "$INSTDIR\share\locale\lt\LC_MESSAGES\gtk30.mo" Delete "$INSTDIR\share\locale\lt\LC_MESSAGES\transmission-remote-gtk.mo" #Delete "$INSTDIR\share\locale\es\LC_MESSAGES\atk10.mo" #Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gettext-tools.mo" #Delete "$INSTDIR\share\locale\es\LC_MESSAGES\glib20.mo" #Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gtk30-properties.mo" #Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gtk30.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\es\LC_MESSAGES\transmission-remote-gtk.mo" #Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\atk10.mo" #Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gettext-tools.mo" #Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\glib20.mo" #Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gtk30-properties.mo" #Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\gtk30.mo" Delete "$INSTDIR\share\locale\ko\LC_MESSAGES\transmission-remote-gtk.mo" #Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\atk10.mo" #Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gettext-tools.mo" #Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\glib20.mo" #Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gtk30-properties.mo" #Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gtk30.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\transmission-remote-gtk.mo" #Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\atk10.mo" #Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gettext-runtime.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gettext-tools.mo" #Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\glib20.mo" #Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gtk30-properties.mo" #Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gtk30.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\libiconv.mo" Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\transmission-remote-gtk.mo" #Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\atk10.mo" #Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\gdk-pixbuf.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\gettext-runtime.mo" #Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\glib20.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\gtk30-properties.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\gtk30.mo" Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\transmission-remote-gtk.mo" #Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\atk10.mo" #Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gdk-pixbuf.mo" #Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gettext-runtime.mo" #Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gettext-tools.mo" #Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\glib20.mo" #Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gtk30-properties.mo" #Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gtk30.mo" #Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\libiconv.mo" #Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\transmission-remote-gtk.mo" #Delete "$INSTDIR\share\themes\MS-Windows\gtk-2.0\gtkrc" Delete "$INSTDIR\share\perl5\5.8\Locale\Script.pod" Delete "$INSTDIR\share\perl5\5.8\Locale\Script.pm" Delete "$INSTDIR\share\perl5\5.8\Locale\Maketext\TPJ13.pod" Delete "$INSTDIR\share\perl5\5.8\Locale\Maketext\GutsLoader.pm" Delete "$INSTDIR\share\perl5\5.8\Locale\Maketext\Guts.pm" Delete "$INSTDIR\share\perl5\5.8\Locale\Maketext.pod" Delete "$INSTDIR\share\perl5\5.8\Locale\Maketext.pm" Delete "$INSTDIR\share\perl5\5.8\Locale\Language.pod" Delete "$INSTDIR\share\perl5\5.8\Locale\Language.pm" Delete "$INSTDIR\share\perl5\5.8\Locale\Currency.pod" Delete "$INSTDIR\share\perl5\5.8\Locale\Currency.pm" Delete "$INSTDIR\share\perl5\5.8\Locale\Country.pod" Delete "$INSTDIR\share\perl5\5.8\Locale\Country.pm" Delete "$INSTDIR\share\perl5\5.8\Locale\Constants.pod" Delete "$INSTDIR\share\perl5\5.8\Locale\Constants.pm" ; Remove shortcuts, if any !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder SetShellVarContext current Delete "$SMPROGRAMS\$StartMenuFolder\*.*" RMDir "$SMPROGRAMS\$StartMenuFolder" !ifndef PORTABLE SetShellVarContext all Delete "$SMPROGRAMS\$StartMenuFolder\*.*" RMDir "$SMPROGRAMS\$StartMenuFolder" !endif ; Remove directories used #RMDir "$INSTDIR\share\themes\MS-Windows\gtk-2.0" #RMDir "$INSTDIR\share\themes\MS-Windows" RMDir "$INSTDIR\share\themes" #RMDir "$INSTDIR\share\locale\uk\LC_MESSAGES" #RMDir "$INSTDIR\share\locale\uk" RMDir "$INSTDIR\share\locale\fr\LC_MESSAGES" RMDir "$INSTDIR\share\locale\fr" RMDir "$INSTDIR\share\locale\ru\LC_MESSAGES" RMDir "$INSTDIR\share\locale\ru" RMDir "$INSTDIR\share\locale\pl\LC_MESSAGES" RMDir "$INSTDIR\share\locale\pl" RMDir "$INSTDIR\share\locale\ko\LC_MESSAGES" RMDir "$INSTDIR\share\locale\ko" RMDir "$INSTDIR\share\locale\es\LC_MESSAGES" RMDir "$INSTDIR\share\locale\es" RMDir "$INSTDIR\share\locale\de\LC_MESSAGES" RMDir "$INSTDIR\share\locale\de" RMDir "$INSTDIR\share\locale\lt\LC_MESSAGES" RMDir "$INSTDIR\share\locale\lt" RMDir "$INSTDIR\share\locale" RMDir "$INSTDIR\share\icons\hicolor\scalable\apps" RMDir "$INSTDIR\share\icons\hicolor\scalable" RMDir "$INSTDIR\share\icons\hicolor\48x48\apps" RMDir "$INSTDIR\share\icons\hicolor\48x48" RMDir "$INSTDIR\share\icons\hicolor\32x32\apps" RMDir "$INSTDIR\share\icons\hicolor\32x32" RMDir "$INSTDIR\share\icons\hicolor\24x24\apps" RMDir "$INSTDIR\share\icons\hicolor\24x24" RMDir "$INSTDIR\share\icons\hicolor\22x22\apps" RMDir "$INSTDIR\share\icons\hicolor\22x22" RMDir "$INSTDIR\share\icons\hicolor\16x16\apps" RMDir "$INSTDIR\share\icons\hicolor\16x16" RMDir "$INSTDIR\share\icons\hicolor" RMDir "$INSTDIR\share\icons" RMDir "$INSTDIR\share\perl5\5.8\Locale\Maketext" RMDir "$INSTDIR\share\perl5\5.8\Locale" RMDir "$INSTDIR\share\perl5\5.8" RMDir "$INSTDIR\share\perl5" RMDir "$INSTDIR\share" #RMDir "$INSTDIR\etc\gtk-2.0" RMDir "$INSTDIR\etc" #RMDir "$INSTDIR\lib\gtk-2.0\modules" #RMDir "$INSTDIR\lib\gtk-2.0\2.10.0\engines" #RMDir "$INSTDIR\lib\gtk-2.0\2.10.0" #RMDir "$INSTDIR\lib\gtk-2.0" RMDir "$INSTDIR\lib" RMDir "$INSTDIR\bin" RMDir "$INSTDIR" DeleteRegKey /ifempty HKCU "SOFTWARE\TransmissionRemoteGTK" !ifndef PORTABLE DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TransmissionRemoteGTK" !endif SectionEnd !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecTransmissionRemoteGTK} $(DESC_SecTransmissionRemoteGTK) !insertmacro MUI_DESCRIPTION_TEXT ${SecGeoIP} $(DESC_GeoIP) !insertmacro MUI_DESCRIPTION_TEXT ${SecGlibGtkEtc} $(DESC_SecGlibGtkEtc) !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopIcon} $(DESC_SecDesktopIcon) ; !insertmacro MUI_DESCRIPTION_TEXT ${SecFiletypeAssociations} $(DESC_SecFiletypeAssociations) ; !insertmacro MUI_DESCRIPTION_TEXT ${SecGeoIPDatabase} $(DESC_SecGeoIPDatabase) ; !insertmacro MUI_DESCRIPTION_TEXT ${SecLanguages} $(DESC_SecLanguages) ; !insertmacro MUI_DESCRIPTION_TEXT ${SecRegiterTorrent} $(DESC_SecRegiterTorrent) ; !insertmacro MUI_DESCRIPTION_TEXT ${SecRegiterMagnet} $(DESC_SecRegiterMagnet) !insertmacro MUI_FUNCTION_DESCRIPTION_END Function .onInit System::Call 'kernel32::CreateMutexA(i 0, i 0, t "Transmission Remote GTK") ?e' Pop $R0 StrCmp $R0 0 +3 MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." Abort !insertmacro MUI_LANGDLL_DISPLAY !ifdef PORTABLE StrCpy $INSTDIR "\${ProgramFilesDir}" !else ${If} ${RunningX64} StrCpy $INSTDIR "$PROGRAMFILES64\${ProgramFilesDir}" ${Else} StrCpy $INSTDIR "$PROGRAMFILES\${ProgramFilesDir}" ${Endif} !endif FunctionEnd transmission-remote-gtk-1.4.1/src/json.c000066400000000000000000000061211341276053300202320ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "protocol-constants.h" #include "requests.h" #include "json.h" /* JSON helper functions */ gchar *trg_serialize(JsonNode * req) { JsonGenerator *generator; gsize length; gchar *response; generator = json_generator_new(); json_generator_set_root(generator, req); response = json_generator_to_data(generator, &length); g_object_unref(generator); return response; } JsonObject *trg_deserialize(trg_response * response, GError ** error) { JsonParser *parser; JsonNode *root; JsonObject *ret = NULL; parser = json_parser_new(); json_parser_load_from_data(parser, response->raw, response->size, error); if (*error == NULL) { root = json_parser_get_root(parser); #ifdef DEBUG if (g_getenv("TRG_SHOW_INCOMING") != NULL) { g_debug("<=(INcoming)<=: %s", response->raw); } else if (g_getenv("TRG_SHOW_INCOMING_PRETTY") != NULL) { JsonGenerator *pg; gsize len; gchar *pgdata; pg = json_generator_new(); g_object_set(pg, "pretty", TRUE, NULL); json_generator_set_root(pg, root); pgdata = json_generator_to_data(pg, &len); g_debug("<=(incoming)<=:\n%s\n", pgdata); g_free(pgdata); g_object_unref(pg); } #endif ret = json_node_get_object(root); json_object_ref(ret); } g_object_unref(parser); return ret; } JsonObject *node_get_arguments(JsonNode * req) { JsonObject *rootObj = json_node_get_object(req); return get_arguments(rootObj); } JsonObject *get_arguments(JsonObject * req) { return json_object_get_object_member(req, PARAM_ARGUMENTS); } gdouble json_double_to_progress(JsonNode * n) { return json_node_really_get_double(n) * 100.0; } gdouble json_node_really_get_double(JsonNode * node) { GValue a = G_VALUE_INIT; json_node_get_value(node, &a); switch (G_VALUE_TYPE(&a)) { case G_TYPE_INT64: return (gdouble) g_value_get_int64(&a); case G_TYPE_DOUBLE: return g_value_get_double(&a); default: return 0.0; } } transmission-remote-gtk-1.4.1/src/json.h000066400000000000000000000024131341276053300202370ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef JSON_H_ #define JSON_H_ #include #include #include "trg-client.h" gchar *trg_serialize(JsonNode * req); JsonObject *trg_deserialize(trg_response * response, GError ** error); JsonObject *get_arguments(JsonObject * req); JsonObject *node_get_arguments(JsonNode * req); gdouble json_double_to_progress(JsonNode * n); gdouble json_node_really_get_double(JsonNode * node); #endif /* JSON_H_ */ transmission-remote-gtk-1.4.1/src/main.c000066400000000000000000000114611341276053300202100ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #include "trg-gtk-app.h" #if WIN32 #include "win32-mailslot.h" #endif #include "trg-main-window.h" #include "trg-client.h" #include "util.h" /* Handle arguments and start the main window. * * either GtkApplication - replaces libunique, GTK3 only, and non-win32. * or win32 API mailslots. * * win32 could possibly run from GtkApplication now, mailslots were needed * for GTK2 (support removed). */ #if !WIN32 /* GtkApplication - the replacement for libunique. * This is implemented in trg-gtk-app.c */ static gint trg_gtkapp_init(TrgClient * client, int argc, char *argv[]) { TrgGtkApp *gtk_app = trg_gtk_app_new(client); gint exitCode = g_application_run(G_APPLICATION(gtk_app), argc, argv); g_object_unref(gtk_app); return exitCode; } #elif WIN32 static gint trg_win32_init(TrgClient * client, int argc, char *argv[], gchar ** args) { gchar *moddir = g_win32_get_package_installation_directory_of_module(NULL); gchar *localedir = g_build_path(G_DIR_SEPARATOR_S, moddir, "share", "locale", NULL); bindtextdomain(GETTEXT_PACKAGE, localedir); g_free(moddir); g_free(localedir); if (!mailslot_send_message(args)) { TrgMainWindow *window = trg_main_window_new(client, should_be_minimised(argc, argv)); trg_main_window_set_start_args(window, args); auto_connect_if_required(window); mailslot_start_background_listener(window); gtk_main(); } return EXIT_SUCCESS; } #else static gint trg_simple_init(TrgClient * client, int argc, char *argv[], gchar ** args) { TrgMainWindow *window = trg_main_window_new(client, should_be_minimised(argc, argv)); trg_main_window_set_start_args(window, args); auto_connect_if_required(window); gtk_main(); return EXIT_SUCCESS; } #endif /* Win32 mailslots. I've implemented this in win32-mailslot.c */ #if !WIN32 static void trg_non_win32_init(void) { bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); } #endif static void trg_cleanup(void) { curl_global_cleanup(); } #if WIN32 static gchar **convert_args(int argc, char *argv[]) { gchar *cwd = g_get_current_dir(); gchar **files = NULL; if (argc > 1) { GSList *list = NULL; int i; for (i = 1; i < argc; i++) { if (is_minimised_arg(argv[i])) { continue; } else if (!is_url(argv[i]) && !is_magnet(argv[i]) && g_file_test(argv[i], G_FILE_TEST_IS_REGULAR) && !g_path_is_absolute(argv[i])) { list = g_slist_append(list, g_build_path(G_DIR_SEPARATOR_S, cwd, argv[i], NULL)); } else { list = g_slist_append(list, g_strdup(argv[i])); } } if (list) { GSList *li; files = g_new0(gchar *, g_slist_length(list) + 1); i = 0; for (li = list; li; li = g_slist_next(li)) { files[i++] = li->data; } g_slist_free(list); } } g_free(cwd); return files; } #endif int main(int argc, char *argv[]) { #if WIN32 gchar **args; #endif gint exitCode = EXIT_SUCCESS; TrgClient *client; gtk_init(&argc, &argv); #if WIN32 args = convert_args(argc, argv); #endif curl_global_init(CURL_GLOBAL_ALL); client = trg_client_new(); g_set_application_name(PACKAGE_NAME); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); textdomain(GETTEXT_PACKAGE); #ifdef WIN32 exitCode = trg_win32_init(client, argc, argv, args); #else trg_non_win32_init(); exitCode = trg_gtkapp_init(client, argc, argv); #endif trg_cleanup(); return exitCode; } transmission-remote-gtk-1.4.1/src/protocol-constants.h000066400000000000000000000173601341276053300231500ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef PROTOCOL_CONSTANTS_H_ #define PROTOCOL_CONSTANTS_H_ /* generic contstants */ #define PARAM_METHOD "method" #define FIELD_ID "id" /* top level */ #define FIELD_RESULT "result" #define FIELD_SUCCESS "success" /* torrents */ #define FIELD_RECENTLY_ACTIVE "recently-active" #define FIELD_TORRENTS "torrents" /* parent node */ #define FIELD_REMOVED "removed" #define FIELD_ANNOUNCE_URL "announceUrl" #define FIELD_LEFT_UNTIL_DONE "leftUntilDone" #define FIELD_TOTAL_SIZE "totalSize" #define FIELD_DONE_DATE "doneDate" #define FIELD_ADDED_DATE "addedDate" #define FIELD_DATE_CREATED "dateCreated" #define FIELD_TRACKER_STATS "trackerStats" #define FIELD_DOWNLOAD_DIR "downloadDir" #define FIELD_HASH_STRING "hashString" //#define FIELD_SWARM_SPEED "swarmSpeed" #define FIELD_NAME "name" #define FIELD_SIZEWHENDONE "sizeWhenDone" #define FIELD_STATUS "status" #define FIELD_MOVE "move" #define FIELD_CREATOR "creator" #define FIELD_LOCATION "location" #define FIELD_RATEDOWNLOAD "rateDownload" #define FIELD_RATEUPLOAD "rateUpload" #define FIELD_ETA "eta" #define FIELD_UPLOADEDEVER "uploadedEver" #define FIELD_DOWNLOADEDEVER "downloadedEver" #define FIELD_CORRUPTEVER "corruptEver" #define FIELD_HAVEVALID "haveValid" #define FIELD_HAVEUNCHECKED "haveUnchecked" #define FIELD_PERCENTDONE "percentDone" #define FIELD_PEERS "peers" #define FIELD_PEERSFROM "peersFrom" #define FIELD_FILES "files" #define FIELD_WANTED "wanted" #define FIELD_WEB_SEEDS_SENDING_TO_US "webseedsSendingToUs" #define FIELD_PRIORITIES "priorities" #define FIELD_COMMENT "comment" #define FIELD_LEFTUNTILDONE "leftUntilDone" #define FIELD_ISFINISHED "isFinished" #define FIELD_ISPRIVATE "isPrivate" #define FIELD_MAGNETLINK "magnetLink" #define FIELD_ERROR "error" #define FIELD_ERROR_STRING "errorString" #define FIELD_BANDWIDTH_PRIORITY "bandwidthPriority" #define FIELD_UPLOAD_LIMIT "uploadLimit" #define FIELD_UPLOAD_LIMITED "uploadLimited" #define FIELD_DOWNLOAD_LIMIT "downloadLimit" #define FIELD_DOWNLOAD_LIMITED "downloadLimited" #define FIELD_HONORS_SESSION_LIMITS "honorsSessionLimits" #define FIELD_SEED_RATIO_MODE "seedRatioMode" #define FIELD_SEED_RATIO_LIMIT "seedRatioLimit" #define FIELD_PEER_LIMIT "peer-limit" #define FIELD_DOWNLOAD_DIR "downloadDir" #define FIELD_FILE_DOWNLOAD_DIR "download-dir" #define FIELD_PEERS_SENDING_TO_US "peersSendingToUs" #define FIELD_PEERS_GETTING_FROM_US "peersGettingFromUs" #define FIELD_PEERS_CONNECTED "peersConnected" #define FIELD_QUEUE_POSITION "queuePosition" #define FIELD_ACTIVITY_DATE "activityDate" #define FIELD_ISPRIVATE "isPrivate" #define FIELD_METADATAPERCENTCOMPLETE "metadataPercentComplete" #define FIELD_FILES_WANTED "files-wanted" #define FIELD_FILES_UNWANTED "files-unwanted" #define FIELD_FILES_PRIORITY_HIGH "priority-high" #define FIELD_FILES_PRIORITY_NORMAL "priority-normal" #define FIELD_FILES_PRIORITY_LOW "priority-low" /* trackers */ #define FIELD_TIER "tier" #define FIELD_ANNOUNCE "announce" #define FIELD_SCRAPE "scrape" #define FIELD_LAST_ANNOUNCE_PEER_COUNT "lastAnnouncePeerCount" #define FIELD_LAST_ANNOUNCE_TIME "lastAnnounceTime" #define FIELD_LAST_SCRAPE_TIME "lastScrapeTime" #define FIELD_SEEDERCOUNT "seederCount" #define FIELD_LEECHERCOUNT "leecherCount" #define FIELD_DOWNLOADCOUNT "downloadCount" #define FIELD_HOST "host" #define FIELD_LAST_ANNOUNCE_RESULT "lastAnnounceResult" #define FIELD_RECHECK_PROGRESS "recheckProgress" /* methods */ #define METHOD_TORRENT_START "torrent-start" #define METHOD_SESSION_GET "session-get" #define METHOD_SESSION_SET "session-set" #define METHOD_TORRENT_GET "torrent-get" #define METHOD_TORRENT_SET "torrent-set" #define METHOD_TORRENT_SET_LOCATION "torrent-set-location" #define METHOD_TORRENT_STOP "torrent-stop" #define METHOD_TORRENT_VERIFY "torrent-verify" #define METHOD_TORRENT_REMOVE "torrent-remove" #define METHOD_TORRENT_ADD "torrent-add" #define METHOD_TORRENT_REANNOUNCE "torrent-reannounce" #define METHOD_PORT_TEST "port-test" #define METHOD_BLOCKLIST_UPDATE "blocklist-update" #define METHOD_SESSION_STATS "session-stats" #define METHOD_QUEUE_MOVE_TOP "queue-move-top" #define METHOD_QUEUE_MOVE_UP "queue-move-up" #define METHOD_QUEUE_MOVE_BOTTOM "queue-move-bottom" #define METHOD_QUEUE_MOVE_DOWN "queue-move-down" #define METHOD_TORRENT_START_NOW "torrent-start-now" #define PARAM_IDS "ids" #define PARAM_DELETE_LOCAL_DATA "delete-local-data" #define PARAM_ARGUMENTS "arguments" #define PARAM_FIELDS "fields" #define PARAM_METAINFO "metainfo" #define PARAM_FILENAME "filename" #define PARAM_PAUSED "paused" #define PARAM_TAG "tag" /* peers structure */ #define TPEER_ADDRESS "address" #define TPEER_CLIENT_NAME "clientName" #define TPEER_PROGRESS "progress" #define TPEER_RATE_TO_CLIENT "rateToClient" #define TPEER_RATE_TO_PEER "rateToPeer" #define TPEER_IS_ENCRYPTED "isEncrypted" #define TPEER_IS_DOWNLOADING_FROM "isDownloadingFrom" #define TPEER_IS_UPLOADING_TO "isUploadingTo" #define TPEER_FLAGSTR "flagStr" #define TPEERFROM_FROMPEX "fromPex" #define TPEERFROM_FROMDHT "fromDht" #define TPEERFROM_FROMTRACKERS "fromTracker" #define TPEERFROM_FROMLTEP "fromLtep" #define TPEERFROM_FROMRESUME "fromCache" #define TPEERFROM_FROMINCOMING "fromIncoming" #define TPEERFROM_FROMLPD "fromLpd" /* The rpc-version >= that the status field of torrent-get changed */ #define NEW_STATUS_RPC_VERSION 14 typedef enum { OLD_STATUS_WAITING_TO_CHECK = 1, OLD_STATUS_CHECKING = 2, OLD_STATUS_DOWNLOADING = 4, OLD_STATUS_SEEDING = 8, OLD_STATUS_PAUSED = 16 } trg_old_status; typedef enum { TR_STATUS_STOPPED = 0, /* Torrent is stopped */ TR_STATUS_CHECK_WAIT = 1, /* Queued to check files */ TR_STATUS_CHECK = 2, /* Checking files */ TR_STATUS_DOWNLOAD_WAIT = 3, /* Queued to download */ TR_STATUS_DOWNLOAD = 4, /* Downloading */ TR_STATUS_SEED_WAIT = 5, /* Queued to seed */ TR_STATUS_SEED = 6 /* Seeding */ } tr_torrent_activity; enum { TR_PRI_UNSET = -3, /* Not actually in the protocol. Just used in UI. */ TR_PRI_MIXED = -2, /* Neither is this. */ TR_PRI_LOW = -1, TR_PRI_NORMAL = 0, /* since NORMAL is 0, memset initializes nicely */ TR_PRI_HIGH = 1 }; #define TFILE_LENGTH "length" #define TFILE_BYTES_COMPLETED "bytesCompleted" #define TFILE_NAME "name" #endif /* PROTOCOL_CONSTANTS_H_ */ transmission-remote-gtk-1.4.1/src/remote-exec.c000066400000000000000000000166231341276053300215060ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "trg-torrent-model.h" #include "trg-client.h" #include "trg-prefs.h" #include "protocol-constants.h" #include "torrent.h" #include "remote-exec.h" /* A few functions used to build local commands, otherwise known as actions. * * The functionality from a user perspective is documented in the wiki. * The code below really just uses GRegex to replace variable identifier * with the values inside the connected profile, the session, or the first selected * torrent (in that order of precedence). A field seperator I call a repeater * can be appended to a variable in square brackets, like %{id}[,] to * cause it to be repeated for each selection. */ static const char json_exceptions[] = { 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, '\0' /* g_strescape() expects a NUL-terminated string */ }; static gchar *dump_json_value(JsonNode * node) { GValue value = G_VALUE_INIT; GString *buffer; buffer = g_string_new(""); json_node_get_value(node, &value); switch (G_VALUE_TYPE(&value)) { case G_TYPE_INT64: g_string_append_printf(buffer, "%" G_GINT64_FORMAT, g_value_get_int64(&value)); break; case G_TYPE_STRING: { gchar *tmp; tmp = g_strescape(g_value_get_string(&value), json_exceptions); g_string_append(buffer, tmp); g_free(tmp); } break; case G_TYPE_DOUBLE: { gchar buf[G_ASCII_DTOSTR_BUF_SIZE]; g_string_append(buffer, g_ascii_dtostr(buf, sizeof(buf), g_value_get_double(&value))); } break; case G_TYPE_BOOLEAN: g_string_append_printf(buffer, "%s", g_value_get_boolean(&value) ? "true" : "false"); break; default: break; } g_value_unset(&value); return g_string_free(buffer, FALSE); } gchar *build_remote_exec_cmd(TrgClient * tc, GtkTreeModel * model, GList * selection, const gchar * input) { TrgPrefs *prefs = trg_client_get_prefs(tc); JsonObject *session = trg_client_get_session(tc); JsonObject *profile = trg_prefs_get_connection(prefs); gchar *work; GRegex *regex, *replacerx; GMatchInfo *match_info; gchar *whole, *wholeEscaped, *id, *tmp, *valuestr, *repeater; JsonNode *replacement; if (!profile) return NULL; work = g_strdup(input); regex = g_regex_new("%{([A-Za-z\\-]+)}(?:\\[(.*)\\])?", 0, 0, NULL); g_regex_match_full(regex, input, -1, 0, 0, &match_info, NULL); if (match_info) { while (g_match_info_matches(match_info)) { whole = g_match_info_fetch(match_info, 0); wholeEscaped = g_regex_escape_string(whole, -1); id = g_match_info_fetch(match_info, 1); repeater = g_match_info_fetch(match_info, 2); replacerx = g_regex_new(wholeEscaped, 0, 0, NULL); valuestr = NULL; if (profile && json_object_has_member(profile, id)) { replacement = json_object_get_member(profile, id); if (JSON_NODE_HOLDS_VALUE(replacement)) valuestr = dump_json_value(replacement); } else if (session && json_object_has_member(session, id)) { replacement = json_object_get_member(session, id); if (JSON_NODE_HOLDS_VALUE(replacement)) valuestr = dump_json_value(replacement); } else { GString *gs = g_string_new(""); GList *li; GtkTreeIter iter; JsonObject *json; gchar *piece; for (li = selection; li; li = g_list_next(li)) { piece = NULL; gtk_tree_model_get_iter(model, &iter, (GtkTreePath *) li->data); gtk_tree_model_get(model, &iter, TORRENT_COLUMN_JSON, &json, -1); if (json_object_has_member(json, id)) { replacement = json_object_get_member(json, id); if (JSON_NODE_HOLDS_VALUE(replacement)) { piece = dump_json_value(replacement); } } if (!piece) { if (!g_strcmp0(id, "full-dir")) { piece = torrent_get_full_dir(json); } else if (!g_strcmp0(id, "full-path")) { piece = torrent_get_full_path(json); } } if (piece) { g_string_append(gs, piece); g_free(piece); } if (!repeater) break; if (piece && li != g_list_last(selection)) g_string_append(gs, repeater); } if (gs->len > 0) valuestr = g_string_free(gs, FALSE); else g_string_free(gs, TRUE); } if (valuestr) { tmp = g_regex_replace(replacerx, work, -1, 0, valuestr, 0, NULL); g_free(work); work = tmp; g_free(valuestr); } g_regex_unref(replacerx); g_free(whole); g_free(repeater); g_free(wholeEscaped); g_free(id); g_match_info_next(match_info, NULL); } g_match_info_free(match_info); } g_regex_unref(regex); return work; } transmission-remote-gtk-1.4.1/src/remote-exec.h000066400000000000000000000020461341276053300215050ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef REMOTE_EXEC_H_ #define REMOTE_EXEC_H_ gchar *build_remote_exec_cmd(TrgClient * tc, GtkTreeModel * model, GList * selection, const gchar * input); #endif /* REMOTE_EXEC_H_ */ transmission-remote-gtk-1.4.1/src/requests.c000066400000000000000000000244201341276053300211360ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "protocol-constants.h" #include "json.h" #include "torrent.h" #include "util.h" #include "requests.h" /* A bunch of functions for creating the various requests, in the form of a * JsonNode ready for dispatch. */ static JsonNode *base_request(gchar * method); JsonNode *generic_request(gchar * method, JsonArray * ids) { JsonNode *root = base_request(method); if (ids) { JsonObject *args = node_get_arguments(root); json_object_set_array_member(args, PARAM_IDS, ids); request_set_tag_from_ids(root, ids); } return root; } JsonNode *session_stats(void) { return base_request(METHOD_SESSION_STATS); } JsonNode *blocklist_update(void) { return base_request(METHOD_BLOCKLIST_UPDATE); } JsonNode *port_test(void) { return base_request(METHOD_PORT_TEST); } JsonNode *session_get(void) { return base_request(METHOD_SESSION_GET); } JsonNode *torrent_set_location(JsonArray * array, gchar * location, gboolean move) { JsonNode *req = generic_request(METHOD_TORRENT_SET_LOCATION, array); JsonObject *args = node_get_arguments(req); json_object_set_boolean_member(args, FIELD_MOVE, move); json_object_set_string_member(args, FIELD_LOCATION, location); return req; } JsonNode *torrent_start(JsonArray * array) { return generic_request(METHOD_TORRENT_START, array); } JsonNode *torrent_pause(JsonArray * array) { return generic_request(METHOD_TORRENT_STOP, array); } JsonNode *torrent_reannounce(JsonArray * array) { return generic_request(METHOD_TORRENT_REANNOUNCE, array); } JsonNode *torrent_verify(JsonArray * array) { return generic_request(METHOD_TORRENT_VERIFY, array); } JsonNode *torrent_queue_move_up(JsonArray * array) { return generic_request(METHOD_QUEUE_MOVE_UP, array); } JsonNode *torrent_queue_move_down(JsonArray * array) { return generic_request(METHOD_QUEUE_MOVE_DOWN, array); } JsonNode *torrent_start_now(JsonArray * array) { return generic_request(METHOD_TORRENT_START_NOW, array); } JsonNode *torrent_queue_move_bottom(JsonArray * array) { return generic_request(METHOD_QUEUE_MOVE_BOTTOM, array); } JsonNode *torrent_queue_move_top(JsonArray * array) { return generic_request(METHOD_QUEUE_MOVE_TOP, array); } JsonNode *session_set(void) { return generic_request(METHOD_SESSION_SET, NULL); } JsonNode *torrent_set(JsonArray * array) { return generic_request(METHOD_TORRENT_SET, array); } JsonNode *torrent_remove(JsonArray * array, gboolean removeData) { JsonNode *root = base_request(METHOD_TORRENT_REMOVE); JsonObject *args = node_get_arguments(root); json_object_set_array_member(args, PARAM_IDS, array); json_object_set_boolean_member(args, PARAM_DELETE_LOCAL_DATA, removeData); request_set_tag(root, TORRENT_GET_TAG_MODE_FULL); return root; } JsonNode *torrent_get(gint64 id) { JsonNode *root = base_request(METHOD_TORRENT_GET); JsonObject *args = node_get_arguments(root); JsonArray *fields = json_array_new(); if (id == TORRENT_GET_TAG_MODE_UPDATE) { json_object_set_string_member(args, PARAM_IDS, FIELD_RECENTLY_ACTIVE); } else if (id >= 0) { JsonArray *ids = json_array_new(); json_array_add_int_element(ids, id); json_object_set_array_member(args, PARAM_IDS, ids); } json_array_add_string_element(fields, FIELD_ETA); json_array_add_string_element(fields, FIELD_PEERS); json_array_add_string_element(fields, FIELD_PEERSFROM); json_array_add_string_element(fields, FIELD_FILES); json_array_add_string_element(fields, FIELD_PEERS_SENDING_TO_US); json_array_add_string_element(fields, FIELD_PEERS_GETTING_FROM_US); json_array_add_string_element(fields, FIELD_WEB_SEEDS_SENDING_TO_US); json_array_add_string_element(fields, FIELD_PEERS_CONNECTED); json_array_add_string_element(fields, FIELD_HAVEVALID); json_array_add_string_element(fields, FIELD_HAVEUNCHECKED); json_array_add_string_element(fields, FIELD_RATEUPLOAD); json_array_add_string_element(fields, FIELD_RATEDOWNLOAD); json_array_add_string_element(fields, FIELD_STATUS); json_array_add_string_element(fields, FIELD_ISFINISHED); json_array_add_string_element(fields, FIELD_ISPRIVATE); json_array_add_string_element(fields, FIELD_ADDED_DATE); json_array_add_string_element(fields, FIELD_DOWNLOADEDEVER); json_array_add_string_element(fields, FIELD_UPLOADEDEVER); json_array_add_string_element(fields, FIELD_CORRUPTEVER); json_array_add_string_element(fields, FIELD_SIZEWHENDONE); json_array_add_string_element(fields, FIELD_QUEUE_POSITION); json_array_add_string_element(fields, FIELD_ID); json_array_add_string_element(fields, FIELD_NAME); json_array_add_string_element(fields, FIELD_PERCENTDONE); json_array_add_string_element(fields, FIELD_COMMENT); json_array_add_string_element(fields, FIELD_TOTAL_SIZE); json_array_add_string_element(fields, FIELD_METADATAPERCENTCOMPLETE); json_array_add_string_element(fields, FIELD_LEFT_UNTIL_DONE); json_array_add_string_element(fields, FIELD_ANNOUNCE_URL); json_array_add_string_element(fields, FIELD_ERROR_STRING); json_array_add_string_element(fields, FIELD_TRACKER_STATS); json_array_add_string_element(fields, FIELD_DATE_CREATED); json_array_add_string_element(fields, FIELD_DOWNLOAD_DIR); json_array_add_string_element(fields, FIELD_CREATOR); json_array_add_string_element(fields, FIELD_HASH_STRING); json_array_add_string_element(fields, FIELD_DONE_DATE); json_array_add_string_element(fields, FIELD_HONORS_SESSION_LIMITS); json_array_add_string_element(fields, FIELD_UPLOAD_LIMIT); json_array_add_string_element(fields, FIELD_UPLOAD_LIMITED); json_array_add_string_element(fields, FIELD_DOWNLOAD_LIMIT); json_array_add_string_element(fields, FIELD_DOWNLOAD_LIMITED); json_array_add_string_element(fields, FIELD_BANDWIDTH_PRIORITY); json_array_add_string_element(fields, FIELD_SEED_RATIO_LIMIT); json_array_add_string_element(fields, FIELD_SEED_RATIO_MODE); json_array_add_string_element(fields, FIELD_PEER_LIMIT); json_array_add_string_element(fields, FIELD_ACTIVITY_DATE); json_array_add_string_element(fields, FIELD_MAGNETLINK); json_array_add_string_element(fields, FIELD_ERROR); json_array_add_string_element(fields, FIELD_ERROR_STRING); json_array_add_string_element(fields, FIELD_WANTED); json_array_add_string_element(fields, FIELD_PRIORITIES); json_array_add_string_element(fields, FIELD_RECHECK_PROGRESS); json_object_set_array_member(args, PARAM_FIELDS, fields); return root; } JsonNode *torrent_add_url(const gchar * url, gboolean paused) { JsonNode *root = base_request(METHOD_TORRENT_ADD); JsonObject *args = node_get_arguments(root); json_object_set_string_member(args, PARAM_FILENAME, url); json_object_set_boolean_member(args, PARAM_PAUSED, paused); request_set_tag(root, TORRENT_GET_TAG_MODE_FULL); return root; } JsonNode *torrent_add_from_response(trg_response *response, gint flags) { JsonNode *root = base_request(METHOD_TORRENT_ADD); JsonObject *args = node_get_arguments(root); gchar *encoded = g_base64_encode((guchar *)response->raw, response->size); json_object_set_string_member(args, PARAM_METAINFO, encoded); g_free(encoded); json_object_set_boolean_member(args, PARAM_PAUSED, (flags & TORRENT_ADD_FLAG_PAUSED)); return root; } JsonNode *torrent_add_from_file(gchar * target, gint flags) { JsonNode *root; JsonObject *args; gboolean isMagnet = is_magnet(target); gboolean isUri = isMagnet || is_url(target); gchar *encodedFile; if (!isUri && !g_file_test(target, G_FILE_TEST_IS_REGULAR)) { g_message("file \"%s\" does not exist.", target); return NULL; } root = base_request(METHOD_TORRENT_ADD); args = node_get_arguments(root); if (isUri) { json_object_set_string_member(args, PARAM_FILENAME, target); } else { encodedFile = trg_base64encode(target); if (encodedFile) { json_object_set_string_member(args, PARAM_METAINFO, encodedFile); g_free(encodedFile); } else { g_error("unable to base64 encode file \"%s\".", target); return NULL; } } json_object_set_boolean_member(args, PARAM_PAUSED, (flags & TORRENT_ADD_FLAG_PAUSED)); if ((flags & TORRENT_ADD_FLAG_DELETE)) g_unlink(target); return root; } static JsonNode *base_request(gchar * method) { JsonNode *root = json_node_new(JSON_NODE_OBJECT); JsonObject *object = json_object_new(); JsonObject *args = json_object_new(); json_object_set_string_member(object, PARAM_METHOD, method); json_object_set_object_member(object, PARAM_ARGUMENTS, args); json_node_take_object(root, object); return root; } void request_set_tag(JsonNode * req, gint64 tag) { json_object_set_int_member(json_node_get_object(req), PARAM_TAG, tag); } void request_set_tag_from_ids(JsonNode * req, JsonArray * ids) { gint64 id = json_array_get_length(ids) == 1 ? json_array_get_int_element(ids, 0) : TORRENT_GET_TAG_MODE_FULL; request_set_tag(req, id); } transmission-remote-gtk-1.4.1/src/requests.h000066400000000000000000000042601341276053300211430ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef REQUESTS_H_ #define REQUESTS_H_ #include #include #include "trg-client.h" JsonNode *generic_request(gchar * method, JsonArray * array); JsonNode *session_set(void); JsonNode *session_get(void); JsonNode *torrent_get(gint64 id); JsonNode *torrent_set(JsonArray * array); JsonNode *torrent_pause(JsonArray * array); JsonNode *torrent_start(JsonArray * array); JsonNode *torrent_verify(JsonArray * array); JsonNode *torrent_reannounce(JsonArray * array); JsonNode *torrent_remove(JsonArray * array, int removeData); JsonNode *torrent_add_from_response(trg_response *response, gint flags); JsonNode *torrent_add_from_file(gchar * filename, gint flags); JsonNode *torrent_add_url(const gchar * url, gboolean paused); JsonNode *torrent_set_location(JsonArray * array, gchar * location, gboolean move); JsonNode *blocklist_update(void); JsonNode *port_test(void); JsonNode *session_stats(void); JsonNode *torrent_queue_move_down(JsonArray * array); JsonNode *torrent_queue_move_up(JsonArray * array); JsonNode *torrent_queue_move_bottom(JsonArray * array); JsonNode *torrent_queue_move_top(JsonArray * array); JsonNode *torrent_start_now(JsonArray * array); void request_set_tag(JsonNode * req, gint64 tag); void request_set_tag_from_ids(JsonNode * req, JsonArray * ids); #endif /* REQUESTS_H_ */ transmission-remote-gtk-1.4.1/src/session-get.c000066400000000000000000000147571341276053300215370ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "protocol-constants.h" #include "json.h" #include "session-get.h" /* Just some functions to get fields out of a session-get response. */ const gchar *session_get_version_string(JsonObject * s) { return json_object_get_string_member(s, SGET_VERSION); } gdouble session_get_version(JsonObject * s) { const gchar *versionString = session_get_version_string(s); gchar *spaceChar = g_strrstr(" ", versionString); return g_ascii_strtod(versionString, &spaceChar); } gint64 session_get_download_dir_free_space(JsonObject * s) { return json_object_get_int_member(s, SGET_DOWNLOAD_DIR_FREE_SPACE); } gint64 session_get_rpc_version(JsonObject * s) { return json_object_get_int_member(s, SGET_RPC_VERSION); } gboolean session_get_pex_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_PEX_ENABLED); } gboolean session_get_lpd_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_LPD_ENABLED); } const gchar *session_get_download_dir(JsonObject * s) { return json_object_get_string_member(s, SGET_DOWNLOAD_DIR); } gboolean session_get_peer_port_random(JsonObject * s) { return json_object_get_boolean_member(s, SGET_PEER_PORT_RANDOM_ON_START); } gint64 session_get_peer_port(JsonObject * s) { return json_object_get_int_member(s, SGET_PEER_PORT); } gboolean session_get_port_forwarding_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_PORT_FORWARDING_ENABLED); } const gchar *session_get_blocklist_url(JsonObject * s) { if (json_object_has_member(s, SGET_BLOCKLIST_URL)) return json_object_get_string_member(s, SGET_BLOCKLIST_URL); else return NULL; } gint64 session_get_blocklist_size(JsonObject * s) { return json_object_get_int_member(s, SGET_BLOCKLIST_SIZE); } gboolean session_get_blocklist_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_BLOCKLIST_ENABLED); } gboolean session_get_rename_partial_files(JsonObject * s) { return json_object_get_boolean_member(s, SGET_RENAME_PARTIAL_FILES); } const gchar *session_get_encryption(JsonObject * s) { return json_object_get_string_member(s, SGET_ENCRYPTION); } const gchar *session_get_incomplete_dir(JsonObject * s) { return json_object_get_string_member(s, SGET_INCOMPLETE_DIR); } gboolean session_get_incomplete_dir_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_INCOMPLETE_DIR_ENABLED); } gboolean session_get_alt_speed_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_ALT_SPEED_ENABLED); } gboolean session_get_seed_ratio_limited(JsonObject * s) { return json_object_get_boolean_member(s, SGET_SEED_RATIO_LIMITED); } gboolean session_get_download_queue_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_DOWNLOAD_QUEUE_ENABLED); } gint64 session_get_download_queue_size(JsonObject * s) { return json_object_get_int_member(s, SGET_DOWNLOAD_QUEUE_SIZE); } gboolean session_get_seed_queue_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_SEED_QUEUE_ENABLED); } gint64 session_get_seed_queue_size(JsonObject * s) { return json_object_get_int_member(s, SGET_SEED_QUEUE_SIZE); } const gchar *session_get_torrent_done_filename(JsonObject * s) { return json_object_get_string_member(s, SGET_SCRIPT_TORRENT_DONE_FILENAME); } gboolean session_get_torrent_done_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_SCRIPT_TORRENT_DONE_ENABLED); } gint64 session_get_cache_size_mb(JsonObject * s) { if (json_object_has_member(s, SGET_CACHE_SIZE_MB)) return json_object_get_int_member(s, SGET_CACHE_SIZE_MB); else return -1; } gdouble session_get_seed_ratio_limit(JsonObject * s) { return json_node_really_get_double(json_object_get_member (s, SGET_SEED_RATIO_LIMIT)); } gboolean session_get_start_added_torrents(JsonObject * s) { return json_object_get_boolean_member(s, SGET_START_ADDED_TORRENTS); } gboolean session_get_trash_original_torrent_files(JsonObject * s) { return json_object_get_boolean_member(s, SGET_TRASH_ORIGINAL_TORRENT_FILES); } gboolean session_get_speed_limit_alt_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_ALT_SPEED_ENABLED); } gboolean session_get_speed_limit_up_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_SPEED_LIMIT_UP_ENABLED); } gint64 session_get_peer_limit_per_torrent(JsonObject * s) { return json_object_get_int_member(s, SGET_PEER_LIMIT_PER_TORRENT); } gint64 session_get_peer_limit_global(JsonObject * s) { return json_object_get_int_member(s, SGET_PEER_LIMIT_GLOBAL); } gint64 session_get_alt_speed_limit_up(JsonObject * s) { return json_object_get_int_member(s, SGET_ALT_SPEED_UP); } gint64 session_get_speed_limit_up(JsonObject * s) { return json_object_get_int_member(s, SGET_SPEED_LIMIT_UP); } gboolean session_get_speed_limit_down_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_SPEED_LIMIT_DOWN_ENABLED); } gint64 session_get_alt_speed_limit_down(JsonObject * s) { return json_object_get_int_member(s, SGET_ALT_SPEED_DOWN); } gint64 session_get_speed_limit_down(JsonObject * s) { return json_object_get_int_member(s, SGET_SPEED_LIMIT_DOWN); } gboolean session_get_dht_enabled(JsonObject * s) { return json_object_get_boolean_member(s, SGET_DHT_ENABLED); } transmission-remote-gtk-1.4.1/src/session-get.h000066400000000000000000000142011341276053300215240ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef SESSION_GET_H_ #define SESSION_GET_H_ #include #define SGET_DOWNLOAD_DIR_FREE_SPACE "download-dir-free-space" #define SGET_BLOCKLIST_ENABLED "blocklist-enabled" #define SGET_BLOCKLIST_URL "blocklist-url" #define SGET_BLOCKLIST_SIZE "blocklist-size" #define SGET_DHT_ENABLED "dht-enabled" #define SGET_LPD_ENABLED "lpd-enabled" #define SGET_DOWNLOAD_DIR "download-dir" #define SGET_INCOMPLETE_DIR "incomplete-dir" #define SGET_INCOMPLETE_DIR_ENABLED "incomplete-dir-enabled" #define SGET_ENCRYPTION "encryption" #define SGET_PEER_LIMIT_GLOBAL "peer-limit-global" #define SGET_PEER_LIMIT_PER_TORRENT "peer-limit-per-torrent" #define SGET_PEER_PORT "peer-port" #define SGET_PEER_PORT_RANDOM_ON_START "peer-port-random-on-start" #define SGET_PEX_ENABLED "pex-enabled" #define SGET_PORT_FORWARDING_ENABLED "port-forwarding-enabled" #define SGET_RPC_VERSION "rpc-version" #define SGET_RPC_VERSION_MINIMUM "rpc-version-minimum" #define SGET_SEED_RATIO_LIMIT "seedRatioLimit" #define SGET_SEED_RATIO_LIMITED "seedRatioLimited" #define SGET_SPEED_LIMIT_DOWN "speed-limit-down" #define SGET_SPEED_LIMIT_DOWN_ENABLED "speed-limit-down-enabled" #define SGET_SPEED_LIMIT_UP "speed-limit-up" #define SGET_SPEED_LIMIT_UP_ENABLED "speed-limit-up-enabled" #define SGET_VERSION "version" #define SGET_RPC_VERSION "rpc-version" #define SGET_TRASH_ORIGINAL_TORRENT_FILES "trash-original-torrent-files" #define SGET_START_ADDED_TORRENTS "start-added-torrents" #define SGET_RENAME_PARTIAL_FILES "rename-partial-files" #define SGET_CACHE_SIZE_MB "cache-size-mb" #define SGET_SCRIPT_TORRENT_DONE_FILENAME "script-torrent-done-filename" #define SGET_SCRIPT_TORRENT_DONE_ENABLED "script-torrent-done-enabled" #define SGET_BLOCKLIST_URL "blocklist-url" #define SGET_BLOCKLIST_ENABLED "blocklist-enabled" #define SGET_BLOCKLIST_SIZE "blocklist-size" #define SGET_DOWNLOAD_QUEUE_ENABLED "download-queue-enabled" #define SGET_DOWNLOAD_QUEUE_SIZE "download-queue-size" #define SGET_SEED_QUEUE_ENABLED "seed-queue-enabled" #define SGET_SEED_QUEUE_SIZE "seed-queue-size" #define SGET_QUEUE_STALLED_ENABLED "queue-stalled-enabled" #define SGET_QUEUE_STALLED_MINUTES "queue-stalled-minutes" #define SGET_ALT_SPEED_DOWN "alt-speed-down" #define SGET_ALT_SPEED_ENABLED "alt-speed-enabled" #define SGET_ALT_SPEED_TIME_BEGIN "alt-speed-time-begin" #define SGET_ALT_SPEED_TIME_ENABLED "alt-speed-time-enabled" #define SGET_ALT_SPEED_TIME_END "alt-speed-time-end" #define SGET_ALT_SPEED_TIME_DAY "alt-speed-time-day" #define SGET_ALT_SPEED_UP "alt-speed-up" const gchar *session_get_torrent_done_filename(JsonObject * s); gboolean session_get_torrent_done_enabled(JsonObject * s); gint64 session_get_cache_size_mb(JsonObject * s); const gchar *session_get_version_string(JsonObject * s); gdouble session_get_version(JsonObject * s); gboolean session_get_pex_enabled(JsonObject * s); gboolean session_get_lpd_enabled(JsonObject * s); const gchar *session_get_download_dir(JsonObject * s); gboolean session_get_peer_port_random(JsonObject * s); gint64 session_get_peer_port(JsonObject * s); gint64 session_get_peer_limit_global(JsonObject * s); gint64 session_get_peer_limit_per_torrent(JsonObject * s); gboolean session_get_port_forwarding_enabled(JsonObject * s); const gchar *session_get_blocklist_url(JsonObject * s); gboolean session_get_blocklist_enabled(JsonObject * s); gint64 session_get_blocklist_size(JsonObject * s); gboolean session_get_rename_partial_files(JsonObject * s); const gchar *session_get_encryption(JsonObject * s); const gchar *session_get_incomplete_dir(JsonObject * s); gboolean session_get_incomplete_dir_enabled(JsonObject * s); gboolean session_get_seed_ratio_limited(JsonObject * s); gdouble session_get_seed_ratio_limit(JsonObject * s); gboolean session_get_start_added_torrents(JsonObject * s); gboolean session_get_trash_original_torrent_files(JsonObject * s); gboolean session_get_speed_limit_up_enabled(JsonObject * s); gboolean session_get_speed_limit_alt_enabled(JsonObject * s); gint64 session_get_speed_limit_up(JsonObject * s); gboolean session_get_speed_limit_down_enabled(JsonObject * s); gint64 session_get_speed_limit_down(JsonObject * s); gboolean session_get_download_queue_enabled(JsonObject * s); gint64 session_get_download_queue_size(JsonObject * s); gboolean session_get_seed_queue_enabled(JsonObject * s); gint64 session_get_seed_queue_size(JsonObject * s); gint64 session_get_rpc_version(JsonObject * s); gint64 session_get_download_dir_free_space(JsonObject * s); gboolean session_get_dht_enabled(JsonObject * s); gboolean session_get_alt_speed_enabled(JsonObject * s); gint64 session_get_alt_speed_limit_up(JsonObject * s); gint64 session_get_alt_speed_limit_down(JsonObject * s); #endif /* SESSION_GET_H_ */ transmission-remote-gtk-1.4.1/src/torrent-cell-renderer.c000066400000000000000000001311101341276053300234740ustar00rootroot00000000000000/* * This file Copyright (C) Mnemosyne LLC * * This file is licensed by the GPL version 2. Works owned by the * Transmission project are granted a special exemption to clause 2(b) * so that the bulk of its code can remain under the MIT license. * This exemption does not extend to derived works not owned by * the Transmission project. * * $Id: torrent-cell-renderer.c 13388 2012-07-14 19:26:55Z jordan $ */ /* This cell renderer has been modified heavily to work with the * TrgTorrentModel instead of libtransmission. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "hig.h" #include "icons.h" #include "trg-client.h" #include "torrent.h" #include "util.h" #include "torrent-cell-renderer.h" enum { P_STATUS = 1, P_CLIENT, P_RATIO, P_SEEDRATIOLIMIT, P_SEEDRATIOMODE, P_DOWNLOADED, P_HAVEVALID, P_HAVEUNCHECKED, P_ERROR, P_SIZEWHENDONE, P_TOTALSIZE, P_UPLOADED, P_PERCENTCOMPLETE, P_METADATAPERCENTCOMPLETE, P_UPSPEED, P_DOWNSPEED, P_PEERSGETTINGFROMUS, P_WEBSEEDSTOUS, P_PEERSTOUS, P_ETA, P_JSON, P_CONNECTED, P_FILECOUNT, P_BAR_HEIGHT, P_OWNER, P_COMPACT }; #define DEFAULT_BAR_HEIGHT 12 #define SMALL_SCALE 0.9 #define COMPACT_ICON_SIZE GTK_ICON_SIZE_MENU #define FULL_ICON_SIZE GTK_ICON_SIZE_DND #define FOREGROUND_COLOR_KEY "foreground-rgba" typedef GdkRGBA GtrColor; typedef cairo_t GtrDrawable; typedef GtkRequisition GtrRequisition; /*** **** ***/ static void render_compact(TorrentCellRenderer * cell, GtrDrawable * window, GtkWidget * widget, const GdkRectangle * background_area, const GdkRectangle * cell_area, GtkCellRendererState flags); static void render_full(TorrentCellRenderer * cell, GtrDrawable * window, GtkWidget * widget, const GdkRectangle * background_area, const GdkRectangle * cell_area, GtkCellRendererState flags); struct TorrentCellRendererPrivate { GtkCellRenderer *text_renderer; GtkCellRenderer *progress_renderer; GtkCellRenderer *icon_renderer; GString *gstr1; GString *gstr2; int bar_height; guint flags; guint fileCount; gint64 uploadedEver; gint64 sizeWhenDone; gint64 totalSize; gint64 downloaded; gint64 haveValid; gint64 haveUnchecked; gint64 upSpeed; gint64 downSpeed; gint64 peersFromUs; gint64 webSeedsToUs; gint64 peersToUs; gint64 connected; gint64 eta; gint64 error; gint64 seedRatioMode; gdouble done; gdouble metadataPercentComplete; gdouble ratio; gdouble seedRatioLimit; gpointer json; TrgClient *client; GtkTreeView *owner; gboolean compact; }; static gboolean getSeedRatio(TorrentCellRenderer * r, gdouble * ratio) { struct TorrentCellRendererPrivate *p = r->priv; if ((p->seedRatioMode == 0) && (trg_client_get_seed_ratio_limited(p->client) == TRUE)) { *ratio = trg_client_get_seed_ratio_limit(p->client); return TRUE; } else if (p->seedRatioMode == 1) { *ratio = p->seedRatioLimit; return TRUE; } return FALSE; } static void getProgressString(GString * gstr, TorrentCellRenderer * r) { struct TorrentCellRendererPrivate *p = r->priv; const gint64 haveTotal = p->haveUnchecked + p->haveValid; const int isSeed = p->haveValid >= p->totalSize; char buf1[32], buf2[32], buf3[32], buf4[32], buf5[32], buf6[32]; double seedRatio; const gboolean hasSeedRatio = getSeedRatio(r, &seedRatio); if (p->flags & TORRENT_FLAG_DOWNLOADING) { /* downloading */ g_string_append_printf(gstr, /* %1$s is how much we've got, %2$s is how much we'll have when done, %3$s%% is a percentage of the two */ _("%1$s of %2$s (%3$s)"), tr_strlsize(buf1, haveTotal, sizeof(buf1)), tr_strlsize(buf2, p->sizeWhenDone, sizeof(buf2)), tr_strlpercent(buf3, p->done, sizeof(buf3))); } else if (!isSeed) { /* Partial seed */ if (hasSeedRatio) { g_string_append_printf(gstr, _ ("%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s Goal: %6$s)"), tr_strlsize(buf1, haveTotal, sizeof(buf1)), tr_strlsize(buf2, p->totalSize, sizeof(buf2)), tr_strlpercent(buf3, p->done, sizeof(buf3)), tr_strlsize(buf4, p->uploadedEver, sizeof(buf4)), tr_strlratio(buf5, p->ratio, sizeof(buf5)), tr_strlratio(buf6, seedRatio, sizeof(buf6))); } else { g_string_append_printf(gstr, _ ("%1$s of %2$s (%3$s), uploaded %4$s (Ratio: %5$s)"), tr_strlsize(buf1, haveTotal, sizeof(buf1)), tr_strlsize(buf2, p->totalSize, sizeof(buf2)), tr_strlpercent(buf3, p->done, sizeof(buf3)), tr_strlsize(buf4, p->uploadedEver, sizeof(buf4)), tr_strlratio(buf5, p->ratio, sizeof(buf5))); } } else { /* seeding */ if (hasSeedRatio) { g_string_append_printf(gstr, _ ("%1$s, uploaded %2$s (Ratio: %3$s Goal: %4$s)"), tr_strlsize(buf1, p->totalSize, sizeof(buf1)), tr_strlsize(buf2, p->uploadedEver, sizeof(buf2)), tr_strlratio(buf3, p->ratio, sizeof(buf3)), tr_strlratio(buf4, seedRatio, sizeof(buf4))); } else { g_string_append_printf(gstr, /* %1$s is the torrent's total size, %2$s is how much we've uploaded, %3$s is our upload-to-download ratio */ _("%1$s, uploaded %2$s (Ratio: %3$s)"), tr_strlsize(buf1, p->sizeWhenDone, sizeof(buf1)), tr_strlsize(buf2, p->uploadedEver, sizeof(buf2)), tr_strlratio(buf3, p->ratio, sizeof(buf3))); } } /* add time when downloading */ if ((p->flags & TORRENT_FLAG_DOWNLOADING) || (hasSeedRatio && (p->flags & TORRENT_FLAG_SEEDING))) { gint64 eta = p->eta; g_string_append(gstr, " - "); if (eta < 0) g_string_append(gstr, _("Remaining time unknown")); else { char timestr[128]; tr_strltime_long(timestr, eta, sizeof(timestr)); /* time remaining */ g_string_append_printf(gstr, _("%s remaining"), timestr); } } } static char *getShortTransferString(TorrentCellRenderer * r, char *buf, size_t buflen) { struct TorrentCellRendererPrivate *priv = r->priv; char downStr[32], upStr[32]; const gboolean haveMeta = priv->fileCount > 0; const gboolean haveUp = haveMeta && priv->peersFromUs > 0; const gboolean haveDown = haveMeta && priv->peersToUs > 0; if (haveDown) tr_formatter_speed_KBps(downStr, priv->downSpeed / speed_K, sizeof(downStr)); if (haveUp) tr_formatter_speed_KBps(upStr, priv->upSpeed / speed_K, sizeof(upStr)); if (haveDown && haveUp) /* 1==down arrow, 2==down speed, 3==up arrow, 4==down speed */ g_snprintf(buf, buflen, _("%1$s %2$s, %3$s %4$s"), GTR_UNICODE_DOWN, downStr, GTR_UNICODE_UP, upStr); else if (haveDown) /* bandwidth speed + unicode arrow */ g_snprintf(buf, buflen, _("%1$s %2$s"), GTR_UNICODE_DOWN, downStr); else if (haveUp) /* bandwidth speed + unicode arrow */ g_snprintf(buf, buflen, _("%1$s %2$s"), GTR_UNICODE_UP, upStr); /*else if( st->isStalled ) g_strlcpy( buf, _( "Stalled" ), buflen ); */ else if (haveMeta) g_strlcpy(buf, _("Idle"), buflen); else *buf = '\0'; return buf; } static void getShortStatusString(GString * gstr, TorrentCellRenderer * r) { struct TorrentCellRendererPrivate *priv = r->priv; guint flags = priv->flags; if (flags & TORRENT_FLAG_PAUSED) { g_string_append(gstr, (flags & TORRENT_FLAG_COMPLETE) ? _("Finished") : _("Paused")); } else if (flags & TORRENT_FLAG_WAITING_CHECK) { g_string_append(gstr, _("Queued for verification")); } else if (flags & TORRENT_FLAG_DOWNLOADING_WAIT) { g_string_append(gstr, _("Queued for download")); } else if (flags & TORRENT_FLAG_SEEDING_WAIT) { g_string_append(gstr, _("Queued for seeding")); } else if (flags & TORRENT_FLAG_CHECKING) { char buf1[32]; g_string_append_printf(gstr, _("Verifying data (%1$s tested)"), tr_strlpercent(buf1, priv->done, sizeof(buf1))); } else if ((flags & TORRENT_FLAG_DOWNLOADING) || (flags & TORRENT_FLAG_SEEDING)) { char buf[512]; if (flags & ~TORRENT_FLAG_DOWNLOADING) { tr_strlratio(buf, priv->ratio, sizeof(buf)); g_string_append_printf(gstr, _("Ratio %s"), buf); g_string_append(gstr, ", "); } getShortTransferString(r, buf, sizeof(buf)); g_string_append(gstr, buf); } } static void getStatusString(GString * gstr, TorrentCellRenderer * r) { struct TorrentCellRendererPrivate *priv = r->priv; char buf[256]; if (priv->error) { const char *fmt[] = { NULL, N_("Tracker gave a warning: \"%s\""), N_("Tracker gave an error: \"%s\""), N_("Error: %s") }; g_string_append_printf(gstr, _(fmt[priv->error]), torrent_get_errorstr(priv->json)); } else if ((priv->flags & TORRENT_FLAG_PAUSED) || (priv->flags & TORRENT_FLAG_WAITING_CHECK) || (priv->flags & TORRENT_FLAG_CHECKING) || (priv->flags & TORRENT_FLAG_DOWNLOADING_WAIT) || (priv->flags & TORRENT_FLAG_SEEDING_WAIT)) { getShortStatusString(gstr, r); } else if (priv->flags & TORRENT_FLAG_DOWNLOADING) { if (priv->fileCount > 0) { g_string_append_printf(gstr, ngettext ("Downloading from %1$"G_GUINT64_FORMAT" of %2$"G_GUINT64_FORMAT" connected peer", "Downloading from %1$"G_GUINT64_FORMAT" of %2$"G_GUINT64_FORMAT" connected peers", priv->webSeedsToUs + priv->peersToUs), priv->webSeedsToUs + priv->peersToUs, priv->webSeedsToUs + priv->connected); } else { g_string_append_printf(gstr, ngettext ("Downloading metadata from %1$"G_GUINT64_FORMAT" peer (%2$s done)", "Downloading metadata from %1$"G_GUINT64_FORMAT" peers (%2$s done)", priv->connected + priv->webSeedsToUs), priv->connected + priv->webSeedsToUs, tr_strlpercent(buf, priv->metadataPercentComplete, sizeof(buf))); } } else if (priv->flags & TORRENT_FLAG_SEEDING) { g_string_append_printf(gstr, ngettext ("Seeding to %1$"G_GUINT64_FORMAT" of %2$"G_GUINT64_FORMAT" connected peer", "Seeding to %1$"G_GUINT64_FORMAT" of %2$"G_GUINT64_FORMAT" connected peers", priv->connected), priv->peersFromUs, priv->connected); } if ((priv->flags & ~TORRENT_FLAG_WAITING_CHECK) && (priv->flags & ~TORRENT_FLAG_CHECKING) && (priv->flags & ~TORRENT_FLAG_DOWNLOADING_WAIT) && (priv->flags & ~TORRENT_FLAG_SEEDING_WAIT) && (priv->flags & ~TORRENT_FLAG_PAUSED)) { getShortTransferString(r, buf, sizeof(buf)); if (*buf) g_string_append_printf(gstr, " - %s", buf); } } /*** **** ***/ static GdkPixbuf *get_icon(TorrentCellRenderer * r, GtkIconSize icon_size, GtkWidget * for_widget) { struct TorrentCellRendererPrivate *p = r->priv; const char *mime_type; if (p->fileCount == 0) mime_type = UNKNOWN_MIME_TYPE; else if (p->fileCount > 1) mime_type = DIRECTORY_MIME_TYPE; /*else if( strchr( info->files[0].name, '/' ) != NULL ) mime_type = DIRECTORY_MIME_TYPE; else mime_type = gtr_get_mime_type_from_filename( info->files[0].name ); */ else mime_type = FILE_MIME_TYPE; //return NULL; return gtr_get_mime_type_icon(mime_type, icon_size, for_widget); } /*** **** ***/ static void gtr_cell_renderer_get_preferred_size(GtkCellRenderer * renderer, GtkWidget * widget, GtkRequisition * minimum_size, GtkRequisition * natural_size) { gtk_cell_renderer_get_preferred_size(renderer, widget, minimum_size, natural_size); } static void get_size_compact(TorrentCellRenderer * cell, GtkWidget * widget, gint * width, gint * height) { int xpad, ypad; GtkRequisition icon_size; GtkRequisition name_size; GtkRequisition stat_size; GdkPixbuf *icon; struct TorrentCellRendererPrivate *p = cell->priv; GString *gstr_stat = p->gstr1; icon = get_icon(cell, COMPACT_ICON_SIZE, widget); g_string_truncate(gstr_stat, 0); getShortStatusString(gstr_stat, cell); gtk_cell_renderer_get_padding(GTK_CELL_RENDERER(cell), &xpad, &ypad); /* get the idealized cell dimensions */ g_object_set(p->icon_renderer, "pixbuf", icon, NULL); gtr_cell_renderer_get_preferred_size(p->icon_renderer, widget, NULL, &icon_size); g_object_set(p->text_renderer, "text", torrent_get_name(p->json), "ellipsize", PANGO_ELLIPSIZE_NONE, "scale", 1.0, NULL); gtr_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &name_size); g_object_set(p->text_renderer, "text", gstr_stat->str, "scale", SMALL_SCALE, NULL); gtr_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &stat_size); /** *** LAYOUT **/ #define BAR_WIDTH 50 if (width != NULL) *width = xpad * 2 + icon_size.width + GUI_PAD + name_size.width + GUI_PAD + BAR_WIDTH + GUI_PAD + stat_size.width; if (height != NULL) *height = ypad * 2 + MAX(name_size.height, p->bar_height); /* cleanup */ g_object_unref(icon); } static void get_size_full(TorrentCellRenderer * cell, GtkWidget * widget, gint * width, gint * height) { int xpad, ypad; GtkRequisition icon_size; GtkRequisition name_size; GtkRequisition stat_size; GtkRequisition prog_size; GdkPixbuf *icon; struct TorrentCellRendererPrivate *p = cell->priv; GString *gstr_prog = p->gstr1; GString *gstr_stat = p->gstr2; icon = get_icon(cell, FULL_ICON_SIZE, widget); g_string_truncate(gstr_stat, 0); getStatusString(gstr_stat, cell); g_string_truncate(gstr_prog, 0); getProgressString(gstr_prog, cell); gtk_cell_renderer_get_padding(GTK_CELL_RENDERER(cell), &xpad, &ypad); /* get the idealized cell dimensions */ g_object_set(p->icon_renderer, "pixbuf", icon, NULL); gtr_cell_renderer_get_preferred_size(p->icon_renderer, widget, NULL, &icon_size); g_object_set(p->text_renderer, "text", torrent_get_name(p->json), "weight", PANGO_WEIGHT_BOLD, "scale", 1.0, "ellipsize", PANGO_ELLIPSIZE_NONE, NULL); gtr_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &name_size); g_object_set(p->text_renderer, "text", gstr_prog->str, "weight", PANGO_WEIGHT_NORMAL, "scale", SMALL_SCALE, NULL); gtr_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &prog_size); g_object_set(p->text_renderer, "text", gstr_stat->str, NULL); gtr_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &stat_size); /** *** LAYOUT **/ if (width != NULL) *width = xpad * 2 + icon_size.width + GUI_PAD + MAX3(name_size.width, prog_size.width, stat_size.width); if (height != NULL) *height = ypad * 2 + name_size.height + prog_size.height + GUI_PAD_SMALL + p->bar_height + GUI_PAD_SMALL + stat_size.height; /* cleanup */ g_object_unref(icon); } static void torrent_cell_renderer_get_size(GtkCellRenderer * cell, GtkWidget * widget, const GdkRectangle * cell_area, gint * x_offset, gint * y_offset, gint * width, gint * height) { TorrentCellRenderer *self = TORRENT_CELL_RENDERER(cell); if (self) { int w, h; struct TorrentCellRendererPrivate *p = self->priv; if (p->compact) get_size_compact(TORRENT_CELL_RENDERER(cell), widget, &w, &h); else get_size_full(TORRENT_CELL_RENDERER(cell), widget, &w, &h); if (width) *width = w; if (height) *height = h; if (x_offset) *x_offset = cell_area ? cell_area->x : 0; if (y_offset) { int xpad, ypad; gtk_cell_renderer_get_padding(cell, &xpad, &ypad); *y_offset = cell_area ? (int) ((cell_area->height - (ypad * 2 + h)) / 2.0) : 0; } } } static void get_text_color(TorrentCellRenderer * r, GtkWidget * widget, GtrColor * setme) { struct TorrentCellRendererPrivate *p = r->priv; static const GdkRGBA red = { 1.0, 0, 0, 0 }; if (p->error) *setme = red; else if (p->flags & TORRENT_FLAG_PAUSED) gtk_style_context_get_color(gtk_widget_get_style_context(widget), GTK_STATE_FLAG_INSENSITIVE, setme); else gtk_style_context_get_color(gtk_widget_get_style_context(widget), GTK_STATE_FLAG_NORMAL, setme); } static double get_percent_done(TorrentCellRenderer * r, gboolean * seed) { struct TorrentCellRendererPrivate *priv = r->priv; gdouble d; if ((priv->flags & TORRENT_FLAG_SEEDING) && getSeedRatio(r, &d)) { *seed = TRUE; const gint64 baseline = priv->downloaded ? priv->downloaded : priv->sizeWhenDone; const gint64 goal = baseline * priv->seedRatioLimit; const gint64 bytesLeft = goal > priv->uploadedEver ? goal - priv->uploadedEver : 0; float seedRatioPercentDone = (gdouble) (goal - bytesLeft) / goal; d = MAX(0.0, seedRatioPercentDone * 100.0); } else { *seed = FALSE; d = MAX(0.0, priv->done); } return d; } static void gtr_cell_renderer_render(GtkCellRenderer * renderer, GtrDrawable * drawable, GtkWidget * widget, const GdkRectangle * area, GtkCellRendererState flags) { gtk_cell_renderer_render(renderer, drawable, widget, area, area, flags); } static void torrent_cell_renderer_render(GtkCellRenderer * cell, GtrDrawable * window, GtkWidget * widget, const GdkRectangle * background_area, const GdkRectangle * cell_area, GtkCellRendererState flags) { TorrentCellRenderer *self = TORRENT_CELL_RENDERER(cell); if (self) { struct TorrentCellRendererPrivate *p = self->priv; if (p->compact) render_compact(self, window, widget, background_area, cell_area, flags); else render_full(self, window, widget, background_area, cell_area, flags); } } static void torrent_cell_renderer_set_property(GObject * object, guint property_id, const GValue * v, GParamSpec * pspec) { TorrentCellRenderer *self = TORRENT_CELL_RENDERER(object); struct TorrentCellRendererPrivate *p = self->priv; switch (property_id) { case P_JSON: p->json = g_value_get_pointer(v); break; case P_STATUS: p->flags = g_value_get_uint(v); break; case P_TOTALSIZE: p->totalSize = g_value_get_int64(v); break; case P_SIZEWHENDONE: p->sizeWhenDone = g_value_get_int64(v); break; case P_DOWNLOADED: p->downloaded = g_value_get_int64(v); break; case P_HAVEVALID: p->haveValid = g_value_get_int64(v); break; case P_HAVEUNCHECKED: p->haveUnchecked = g_value_get_int64(v); break; case P_UPLOADED: p->uploadedEver = g_value_get_int64(v); break; case P_UPSPEED: p->upSpeed = g_value_get_int64(v); break; case P_DOWNSPEED: p->downSpeed = g_value_get_int64(v); break; case P_PEERSGETTINGFROMUS: p->peersFromUs = g_value_get_int64(v); break; case P_WEBSEEDSTOUS: p->webSeedsToUs = g_value_get_int64(v); break; case P_CONNECTED: p->connected = g_value_get_int64(v); break; case P_FILECOUNT: p->fileCount = g_value_get_uint(v); break; case P_ETA: p->eta = g_value_get_int64(v); break; case P_PEERSTOUS: p->peersToUs = g_value_get_int64(v); break; case P_ERROR: p->error = g_value_get_int64(v); break; case P_RATIO: p->ratio = g_value_get_double(v); break; case P_PERCENTCOMPLETE: p->done = g_value_get_double(v); break; case P_METADATAPERCENTCOMPLETE: p->metadataPercentComplete = g_value_get_double(v); break; case P_BAR_HEIGHT: p->bar_height = g_value_get_int(v); break; case P_COMPACT: p->compact = g_value_get_boolean(v); break; case P_SEEDRATIOMODE: p->seedRatioMode = g_value_get_int64(v); break; case P_SEEDRATIOLIMIT: p->seedRatioLimit = g_value_get_double(v); break; case P_CLIENT: p->client = g_value_get_pointer(v); break; case P_OWNER: p->owner = g_value_get_pointer(v); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void torrent_cell_renderer_get_property(GObject * object, guint property_id, GValue * v, GParamSpec * pspec) { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } G_DEFINE_TYPE(TorrentCellRenderer, torrent_cell_renderer, GTK_TYPE_CELL_RENDERER) static void torrent_cell_renderer_dispose(GObject * o) { TorrentCellRenderer *r = TORRENT_CELL_RENDERER(o); if (r && r->priv) { g_string_free(r->priv->gstr1, TRUE); g_string_free(r->priv->gstr2, TRUE); g_object_unref(G_OBJECT(r->priv->text_renderer)); g_object_unref(G_OBJECT(r->priv->progress_renderer)); g_object_unref(G_OBJECT(r->priv->icon_renderer)); r->priv = NULL; } G_OBJECT_CLASS(torrent_cell_renderer_parent_class)->dispose(o); } static void torrent_cell_renderer_class_init(TorrentCellRendererClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(klass); g_type_class_add_private(klass, sizeof(struct TorrentCellRendererPrivate)); cell_class->render = torrent_cell_renderer_render; cell_class->get_size = torrent_cell_renderer_get_size; gobject_class->set_property = torrent_cell_renderer_set_property; gobject_class->get_property = torrent_cell_renderer_get_property; gobject_class->dispose = torrent_cell_renderer_dispose; g_object_class_install_property(gobject_class, P_JSON, g_param_spec_pointer("json", NULL, "json", G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_CLIENT, g_param_spec_pointer("client", NULL, "client", G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_OWNER, g_param_spec_pointer("owner", NULL, "owner", G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_RATIO, g_param_spec_double("ratio", NULL, "ratio", 0, G_MAXDOUBLE, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_SEEDRATIOLIMIT, g_param_spec_double("seedRatioLimit", NULL, "seedRatioLimit", 0, G_MAXDOUBLE, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_SEEDRATIOMODE, g_param_spec_int64("seedRatioMode", NULL, "seedRatioMode", 0, 2, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_PERCENTCOMPLETE, g_param_spec_double("percentComplete", NULL, "percentComplete", 0, 100.00, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_METADATAPERCENTCOMPLETE, g_param_spec_double ("metadataPercentComplete", NULL, "metadataPercentComplete", 0, 100.00, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_TOTALSIZE, g_param_spec_int64("totalSize", NULL, "totalSize", 0, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_SIZEWHENDONE, g_param_spec_int64("sizeWhenDone", NULL, "sizeWhenDone", 0, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_STATUS, g_param_spec_uint("status", NULL, "status", 0, G_MAXUINT, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_FILECOUNT, g_param_spec_uint("fileCount", NULL, "fileCount", 0, G_MAXUINT, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_ERROR, g_param_spec_int64("error", NULL, "error", 0, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_UPSPEED, g_param_spec_int64("upSpeed", NULL, "upSpeed", 0, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_DOWNSPEED, g_param_spec_int64("downSpeed", NULL, "downSpeed", 0, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_DOWNLOADED, g_param_spec_int64("downloaded", NULL, "downloaded", 0, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_HAVEVALID, g_param_spec_int64("haveValid", NULL, "haveValid", 0, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_HAVEUNCHECKED, g_param_spec_int64("haveUnchecked", NULL, "haveUnchecked", 0, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_UPLOADED, g_param_spec_int64("uploaded", NULL, "uploaded", 0, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_PEERSGETTINGFROMUS, g_param_spec_int64 ("peersGettingFromUs", NULL, "peersGettingFromUs", -1, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_PEERSTOUS, g_param_spec_int64("peersToUs", NULL, "peersToUs", -1, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_WEBSEEDSTOUS, g_param_spec_int64("webSeedsToUs", NULL, "webSeedsToUs", 0, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_ETA, g_param_spec_int64("eta", NULL, "eta", -2, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_CONNECTED, g_param_spec_int64("connected", NULL, "connected", 0, G_MAXINT64, 0, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_BAR_HEIGHT, g_param_spec_int("bar-height", NULL, "Bar Height", 1, INT_MAX, DEFAULT_BAR_HEIGHT, G_PARAM_READWRITE)); g_object_class_install_property(gobject_class, P_COMPACT, g_param_spec_boolean("compact", NULL, "Compact Mode", FALSE, G_PARAM_READWRITE)); } static void torrent_cell_renderer_init(TorrentCellRenderer * self) { struct TorrentCellRendererPrivate *p; p = self->priv = G_TYPE_INSTANCE_GET_PRIVATE(self, TORRENT_CELL_RENDERER_TYPE, struct TorrentCellRendererPrivate); p->gstr1 = g_string_new(NULL); p->gstr2 = g_string_new(NULL); p->text_renderer = gtk_cell_renderer_text_new(); g_object_set(p->text_renderer, "xpad", 0, "ypad", 0, NULL); p->progress_renderer = gtk_cell_renderer_progress_new(); p->icon_renderer = gtk_cell_renderer_pixbuf_new(); g_object_ref_sink(p->text_renderer); g_object_ref_sink(p->progress_renderer); g_object_ref_sink(p->icon_renderer); p->bar_height = DEFAULT_BAR_HEIGHT; } GtkCellRenderer *torrent_cell_renderer_new(void) { return (GtkCellRenderer *) g_object_new(TORRENT_CELL_RENDERER_TYPE, NULL); } static void render_compact(TorrentCellRenderer * cell, GtrDrawable * window, GtkWidget * widget, const GdkRectangle * background_area, const GdkRectangle * cell_area, GtkCellRendererState flags) { int xpad, ypad; GtkRequisition size; GdkRectangle icon_area; GdkRectangle name_area; GdkRectangle stat_area; GdkRectangle prog_area; GdkRectangle fill_area; GdkPixbuf *icon; GtrColor text_color; gboolean seed; struct TorrentCellRendererPrivate *p = cell->priv; const gboolean active = (p->flags & ~TORRENT_FLAG_PAUSED) && (p->flags & ~TORRENT_FLAG_DOWNLOADING_WAIT) && (p->flags & ~TORRENT_FLAG_SEEDING_WAIT); const double percentDone = get_percent_done(cell, &seed); const gboolean sensitive = active || p->error; GString *gstr_stat = p->gstr1; icon = get_icon(cell, COMPACT_ICON_SIZE, widget); g_string_truncate(gstr_stat, 0); getShortStatusString(gstr_stat, cell); gtk_cell_renderer_get_padding(GTK_CELL_RENDERER(cell), &xpad, &ypad); get_text_color(cell, widget, &text_color); fill_area = *background_area; fill_area.x += xpad; fill_area.y += ypad; fill_area.width -= xpad * 2; fill_area.height -= ypad * 2; icon_area = name_area = stat_area = prog_area = fill_area; g_object_set(p->icon_renderer, "pixbuf", icon, NULL); gtr_cell_renderer_get_preferred_size(p->icon_renderer, widget, NULL, &size); icon_area.width = size.width; g_object_set(p->text_renderer, "text", torrent_get_name(p->json), "ellipsize", PANGO_ELLIPSIZE_NONE, "scale", 1.0, NULL); gtr_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &size); name_area.width = size.width; g_object_set(p->text_renderer, "text", gstr_stat->str, "scale", SMALL_SCALE, NULL); gtr_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &size); stat_area.width = size.width; icon_area.x = fill_area.x; prog_area.x = fill_area.x + fill_area.width - BAR_WIDTH; prog_area.width = BAR_WIDTH; stat_area.x = prog_area.x - GUI_PAD - stat_area.width; name_area.x = icon_area.x + icon_area.width + GUI_PAD; name_area.y = fill_area.y; name_area.width = stat_area.x - GUI_PAD - name_area.x; /** *** RENDER **/ g_object_set(p->icon_renderer, "pixbuf", icon, "sensitive", sensitive, NULL); gtr_cell_renderer_render(p->icon_renderer, window, widget, &icon_area, flags); g_object_set(p->progress_renderer, "value", (gint) percentDone, "text", NULL, "sensitive", sensitive, NULL); gtr_cell_renderer_render(p->progress_renderer, window, widget, &prog_area, flags); g_object_set(p->text_renderer, "text", gstr_stat->str, "scale", SMALL_SCALE, "ellipsize", PANGO_ELLIPSIZE_END, FOREGROUND_COLOR_KEY, &text_color, NULL); gtr_cell_renderer_render(p->text_renderer, window, widget, &stat_area, flags); g_object_set(p->text_renderer, "text", torrent_get_name(p->json), "scale", 1.0, FOREGROUND_COLOR_KEY, &text_color, NULL); gtr_cell_renderer_render(p->text_renderer, window, widget, &name_area, flags); /* cleanup */ g_object_unref(icon); } static void render_full(TorrentCellRenderer * cell, GtrDrawable * window, GtkWidget * widget, const GdkRectangle * background_area, const GdkRectangle * cell_area, GtkCellRendererState flags) { int xpad, ypad; GtkRequisition size; GdkRectangle fill_area; GdkRectangle icon_area; GdkRectangle name_area; GdkRectangle stat_area; GdkRectangle prog_area; GdkRectangle prct_area; GdkPixbuf *icon; GtrColor text_color; gboolean seed; struct TorrentCellRendererPrivate *p = cell->priv; const gboolean active = (p->flags & ~TORRENT_FLAG_PAUSED) && (p->flags & ~TORRENT_FLAG_DOWNLOADING_WAIT) && (p->flags & ~TORRENT_FLAG_SEEDING_WAIT); const gboolean sensitive = active || p->error; const double percentDone = get_percent_done(cell, &seed); GString *gstr_prog = p->gstr1; GString *gstr_stat = p->gstr2; icon = get_icon(cell, FULL_ICON_SIZE, widget); g_string_truncate(gstr_prog, 0); getProgressString(gstr_prog, cell); g_string_truncate(gstr_stat, 0); getStatusString(gstr_stat, cell); gtk_cell_renderer_get_padding(GTK_CELL_RENDERER(cell), &xpad, &ypad); get_text_color(cell, widget, &text_color); /* get the idealized cell dimensions */ g_object_set(p->icon_renderer, "pixbuf", icon, NULL); gtr_cell_renderer_get_preferred_size(p->icon_renderer, widget, NULL, &size); icon_area.width = size.width; icon_area.height = size.height; g_object_set(p->text_renderer, "text", torrent_get_name(p->json), "weight", PANGO_WEIGHT_BOLD, "ellipsize", PANGO_ELLIPSIZE_NONE, "scale", 1.0, NULL); gtr_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &size); name_area.width = size.width; name_area.height = size.height; g_object_set(p->text_renderer, "text", gstr_prog->str, "weight", PANGO_WEIGHT_NORMAL, "scale", SMALL_SCALE, NULL); gtr_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &size); prog_area.width = size.width; prog_area.height = size.height; g_object_set(p->text_renderer, "text", gstr_stat->str, NULL); gtr_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &size); stat_area.width = size.width; stat_area.height = size.height; /** *** LAYOUT **/ fill_area = *background_area; fill_area.x += xpad; fill_area.y += ypad; fill_area.width -= xpad * 2; fill_area.height -= ypad * 2; /* icon */ icon_area.x = fill_area.x; icon_area.y = fill_area.y + (fill_area.height - icon_area.height) / 2; /* name */ name_area.x = icon_area.x + icon_area.width + GUI_PAD; name_area.y = fill_area.y; name_area.width = fill_area.width - GUI_PAD - icon_area.width - GUI_PAD_SMALL; /* prog */ prog_area.x = name_area.x; prog_area.y = name_area.y + name_area.height; prog_area.width = name_area.width; /* progressbar */ prct_area.x = prog_area.x; prct_area.y = prog_area.y + prog_area.height + GUI_PAD_SMALL; prct_area.width = prog_area.width; prct_area.height = p->bar_height; /* status */ stat_area.x = prct_area.x; stat_area.y = prct_area.y + prct_area.height + GUI_PAD_SMALL; stat_area.width = prct_area.width; /** *** RENDER **/ g_object_set(p->icon_renderer, "pixbuf", icon, "sensitive", sensitive, NULL); gtr_cell_renderer_render(p->icon_renderer, window, widget, &icon_area, flags); g_object_set(p->text_renderer, "text", torrent_get_name(p->json), "scale", 1.0, FOREGROUND_COLOR_KEY, &text_color, "ellipsize", PANGO_ELLIPSIZE_END, "weight", PANGO_WEIGHT_BOLD, NULL); gtr_cell_renderer_render(p->text_renderer, window, widget, &name_area, flags); g_object_set(p->text_renderer, "text", gstr_prog->str, "scale", SMALL_SCALE, "weight", PANGO_WEIGHT_NORMAL, NULL); gtr_cell_renderer_render(p->text_renderer, window, widget, &prog_area, flags); g_object_set(p->progress_renderer, "value", (gint) percentDone, "text", "", "sensitive", sensitive, NULL); gtr_cell_renderer_render(p->progress_renderer, window, widget, &prct_area, flags); g_object_set(p->text_renderer, "text", gstr_stat->str, FOREGROUND_COLOR_KEY, &text_color, NULL); gtr_cell_renderer_render(p->text_renderer, window, widget, &stat_area, flags); /* cleanup */ g_object_unref(icon); } GtkTreeView *torrent_cell_renderer_get_owner(TorrentCellRenderer * r) { return r->priv->owner; } transmission-remote-gtk-1.4.1/src/torrent-cell-renderer.h000066400000000000000000000030071341276053300235040ustar00rootroot00000000000000/* * This file Copyright (C) Mnemosyne LLC * * This file is licensed by the GPL version 2. Works owned by the * Transmission project are granted a special exemption to clause 2(b) * so that the bulk of its code can remain under the MIT license. * This exemption does not extend to derived works not owned by * the Transmission project. * * $Id: torrent-cell-renderer.h 12658 2011-08-09 05:47:24Z jordan $ */ #ifndef GTR_TORRENT_CELL_RENDERER_H #define GTR_TORRENT_CELL_RENDERER_H #include #define GTR_UNICODE_UP "\xE2\x86\x91" #define GTR_UNICODE_DOWN "\xE2\x86\x93" #define DIRECTORY_MIME_TYPE "folder" #define FILE_MIME_TYPE "file" #define UNKNOWN_MIME_TYPE "unknown" #define TORRENT_CELL_RENDERER_TYPE ( torrent_cell_renderer_get_type( ) ) #define TORRENT_CELL_RENDERER( o ) \ ( G_TYPE_CHECK_INSTANCE_CAST( ( o ), \ TORRENT_CELL_RENDERER_TYPE, \ TorrentCellRenderer ) ) typedef struct TorrentCellRenderer TorrentCellRenderer; typedef struct TorrentCellRendererClass TorrentCellRendererClass; struct TorrentCellRenderer { GtkCellRenderer parent; /*< private > */ struct TorrentCellRendererPrivate *priv; }; struct TorrentCellRendererClass { GtkCellRendererClass parent; }; GType torrent_cell_renderer_get_type(void) G_GNUC_CONST; GtkCellRenderer *torrent_cell_renderer_new(void); GtkTreeView *torrent_cell_renderer_get_owner(TorrentCellRenderer * r); #endif /* GTR_TORRENT_CELL_RENDERER_H */ transmission-remote-gtk-1.4.1/src/torrent.c000066400000000000000000000440721341276053300207650ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "trg-client.h" #include "json.h" #include "torrent.h" #include "protocol-constants.h" #include "util.h" /* Just some functions to get fields out of the torrent object. */ JsonArray *torrent_get_peers(JsonObject * t) { g_assert(json_object_get_array_member(t, FIELD_PEERS)); return json_object_get_array_member(t, FIELD_PEERS); } JsonObject *torrent_get_peersfrom(JsonObject * t) { return json_object_get_object_member(t, FIELD_PEERSFROM); } JsonArray *torrent_get_wanted(JsonObject * t) { g_assert(json_object_get_array_member(t, FIELD_WANTED)); return json_object_get_array_member(t, FIELD_WANTED); } JsonArray *torrent_get_priorities(JsonObject * t) { g_assert(json_object_get_array_member(t, FIELD_PRIORITIES)); return json_object_get_array_member(t, FIELD_PRIORITIES); } JsonArray *torrent_get_tracker_stats(JsonObject * t) { g_assert(json_object_get_array_member(t, FIELD_TRACKER_STATS)); return json_object_get_array_member(t, FIELD_TRACKER_STATS); } gint64 torrent_get_id(JsonObject * t) { return json_object_get_int_member(t, FIELD_ID); } const gchar *torrent_get_download_dir(JsonObject * t) { return json_object_get_string_member(t, FIELD_DOWNLOAD_DIR); } const gchar *torrent_get_comment(JsonObject * t) { return json_object_get_string_member(t, FIELD_COMMENT); } gdouble torrent_get_metadata_percent_complete(JsonObject * t) { JsonNode *node = json_object_get_member(t, FIELD_METADATAPERCENTCOMPLETE); if (node) return json_double_to_progress(node); else return 100.0; } const gchar *torrent_get_name(JsonObject * t) { return json_object_get_string_member(t, FIELD_NAME); } gint64 torrent_get_added_date(JsonObject * t) { return json_object_get_int_member(t, FIELD_ADDED_DATE); } gboolean torrent_get_honors_session_limits(JsonObject * t) { return json_object_get_boolean_member(t, FIELD_HONORS_SESSION_LIMITS); } gint64 torrent_get_bandwidth_priority(JsonObject * t) { return json_object_get_int_member(t, FIELD_BANDWIDTH_PRIORITY); } const gchar *torrent_get_magnetlink(JsonObject * t) { return json_object_get_string_member(t, FIELD_MAGNETLINK); } gint64 torrent_get_upload_limit(JsonObject * t) { return json_object_get_int_member(t, FIELD_UPLOAD_LIMIT); } gint64 torrent_get_peer_limit(JsonObject * t) { return json_object_get_int_member(t, FIELD_PEER_LIMIT); } gboolean torrent_get_upload_limited(JsonObject * t) { return json_object_get_boolean_member(t, FIELD_UPLOAD_LIMITED); } gint64 torrent_get_seed_ratio_mode(JsonObject * t) { return json_object_get_int_member(t, FIELD_SEED_RATIO_MODE); } gdouble torrent_get_seed_ratio_limit(JsonObject * t) { return json_node_really_get_double(json_object_get_member (t, FIELD_SEED_RATIO_LIMIT)); } gint64 torrent_get_download_limit(JsonObject * t) { return json_object_get_int_member(t, FIELD_DOWNLOAD_LIMIT); } gboolean torrent_get_download_limited(JsonObject * t) { return json_object_get_boolean_member(t, FIELD_DOWNLOAD_LIMITED); } gint64 torrent_get_total_size(JsonObject * t) { return json_object_get_int_member(t, FIELD_TOTAL_SIZE); } gint64 torrent_get_size_when_done(JsonObject * t) { return json_object_get_int_member(t, FIELD_SIZEWHENDONE); } gint64 torrent_get_rate_down(JsonObject * t) { return json_object_get_int_member(t, FIELD_RATEDOWNLOAD); } gint64 torrent_get_rate_up(JsonObject * t) { return json_object_get_int_member(t, FIELD_RATEUPLOAD); } gint64 torrent_get_eta(JsonObject * t) { return json_object_get_int_member(t, FIELD_ETA); } gint64 torrent_get_downloaded(JsonObject * t) { return json_object_get_int_member(t, FIELD_DOWNLOADEDEVER); } gint64 torrent_get_uploaded(JsonObject * t) { return json_object_get_int_member(t, FIELD_UPLOADEDEVER); } gint64 torrent_get_corrupted(JsonObject * t) { return json_object_get_int_member(t, FIELD_CORRUPTEVER); } gint64 torrent_get_have_valid(JsonObject * t) { return json_object_get_int_member(t, FIELD_HAVEVALID); } gint64 torrent_get_have_unchecked(JsonObject * t) { return json_object_get_int_member(t, FIELD_HAVEUNCHECKED); } gint64 torrent_get_status(JsonObject * t) { return json_object_get_int_member(t, FIELD_STATUS); } gboolean torrent_get_is_finished(JsonObject * t) { return torrent_get_left_until_done(t) <= 0; } gboolean torrent_get_is_private(JsonObject * t) { return json_object_get_boolean_member(t, FIELD_ISPRIVATE); } gdouble torrent_get_percent_done(JsonObject * t) { return json_double_to_progress(json_object_get_member (t, FIELD_PERCENTDONE)); } gdouble torrent_get_recheck_progress(JsonObject * t) { return json_double_to_progress(json_object_get_member (t, FIELD_RECHECK_PROGRESS)); } gint64 torrent_get_activity_date(JsonObject * t) { return json_object_get_int_member(t, FIELD_ACTIVITY_DATE); } guint32 torrent_get_flags(JsonObject * t, gint64 rpcv, gint64 status, gint64 fileCount, gint64 downRate, gint64 upRate) { guint32 flags = 0; if (fileCount > 0 && torrent_get_is_finished(t) == TRUE) flags |= TORRENT_FLAG_COMPLETE; else flags |= TORRENT_FLAG_INCOMPLETE; if (rpcv >= NEW_STATUS_RPC_VERSION) { switch (status) { case TR_STATUS_STOPPED: flags |= TORRENT_FLAG_PAUSED; break; case TR_STATUS_CHECK_WAIT: flags |= TORRENT_FLAG_WAITING_CHECK; flags |= TORRENT_FLAG_CHECKING_ANY; break; case TR_STATUS_CHECK: flags |= TORRENT_FLAG_CHECKING; flags |= TORRENT_FLAG_CHECKING_ANY; break; case TR_STATUS_DOWNLOAD_WAIT: flags |= TORRENT_FLAG_DOWNLOADING_WAIT; flags |= TORRENT_FLAG_QUEUED; break; case TR_STATUS_DOWNLOAD: if (!(flags & TORRENT_FLAG_COMPLETE)) flags |= TORRENT_FLAG_DOWNLOADING; if (fileCount <= 0) flags |= TORRENT_FLAG_DOWNLOADING_METADATA; flags |= TORRENT_FLAG_ACTIVE; break; case TR_STATUS_SEED_WAIT: flags |= TORRENT_FLAG_SEEDING_WAIT; break; case TR_STATUS_SEED: flags |= TORRENT_FLAG_SEEDING; if (torrent_get_peers_getting_from_us(t)) flags |= TORRENT_FLAG_ACTIVE; break; } } else { switch (status) { case OLD_STATUS_DOWNLOADING: flags |= TORRENT_FLAG_DOWNLOADING; break; case OLD_STATUS_PAUSED: flags |= TORRENT_FLAG_PAUSED; break; case OLD_STATUS_SEEDING: flags |= TORRENT_FLAG_SEEDING; break; case OLD_STATUS_CHECKING: flags |= TORRENT_FLAG_CHECKING; break; case OLD_STATUS_WAITING_TO_CHECK: flags |= TORRENT_FLAG_WAITING_CHECK; flags |= TORRENT_FLAG_CHECKING; break; } if (downRate > 0 || upRate > 0) flags |= TORRENT_FLAG_ACTIVE; } if (torrent_get_error(t) > 0) flags |= TORRENT_FLAG_ERROR; return flags; } gchar *torrent_get_status_icon(gint64 rpcv, guint flags) { if (flags & TORRENT_FLAG_ERROR) return g_strdup("dialog-warning"); else if (flags & TORRENT_FLAG_DOWNLOADING_METADATA) return g_strdup("edit-find"); else if (flags & TORRENT_FLAG_DOWNLOADING) return g_strdup("go-down"); else if (flags & TORRENT_FLAG_PAUSED) return g_strdup("media-playback-pause"); else if (flags & TORRENT_FLAG_SEEDING) return g_strdup("go-up"); else if (flags & TORRENT_FLAG_CHECKING) return g_strdup("view-refresh"); else if (flags & TORRENT_FLAG_DOWNLOADING_WAIT) return g_strdup("media-seek-backward"); else if (flags & TORRENT_FLAG_SEEDING_WAIT) return g_strdup("media-seek-forward"); else return g_strdup("dialog-question"); } gint64 torrent_get_done_date(JsonObject * t) { return json_object_get_int_member(t, FIELD_DONE_DATE); } const gchar *torrent_get_errorstr(JsonObject * t) { return json_object_get_string_member(t, FIELD_ERROR_STRING); } gint64 torrent_get_error(JsonObject * t) { if (!json_object_has_member(t, FIELD_ERROR)) return 0; else return json_object_get_int_member(t, FIELD_ERROR); } const gchar *torrent_get_creator(JsonObject * t) { return json_object_get_string_member(t, FIELD_CREATOR); } gint64 torrent_get_date_created(JsonObject * t) { return json_object_get_int_member(t, FIELD_DATE_CREATED); } const gchar *torrent_get_hash(JsonObject * t) { return json_object_get_string_member(t, FIELD_HASH_STRING); } gchar *torrent_get_status_string(gint64 rpcv, gint64 value, guint flags) { if (rpcv >= NEW_STATUS_RPC_VERSION) { switch (value) { case TR_STATUS_DOWNLOAD: if (flags & TORRENT_FLAG_DOWNLOADING_METADATA) return g_strdup(_("Metadata Downloading")); else return g_strdup(_("Downloading")); case TR_STATUS_DOWNLOAD_WAIT: return g_strdup(_("Queued download")); case TR_STATUS_CHECK_WAIT: return g_strdup(_("Waiting To Check")); case TR_STATUS_CHECK: return g_strdup(_("Checking")); case TR_STATUS_SEED_WAIT: return g_strdup(_("Queued seed")); case TR_STATUS_SEED: return g_strdup(_("Seeding")); case TR_STATUS_STOPPED: return g_strdup(_("Paused")); } } else { switch (value) { case OLD_STATUS_DOWNLOADING: if (flags & TORRENT_FLAG_DOWNLOADING_METADATA) return g_strdup(_("Metadata Downloading")); else return g_strdup(_("Downloading")); case OLD_STATUS_PAUSED: return g_strdup(_("Paused")); case OLD_STATUS_SEEDING: return g_strdup(_("Seeding")); case OLD_STATUS_CHECKING: return g_strdup(_("Checking")); case OLD_STATUS_WAITING_TO_CHECK: return g_strdup(_("Waiting To Check")); } } return g_strdup(_("Unknown")); } gboolean torrent_has_tracker(JsonObject * t, GRegex * rx, gchar * search) { GList *trackers; GList *li; gboolean ret = FALSE; trackers = json_array_get_elements(torrent_get_tracker_stats(t)); for (li = trackers; li; li = g_list_next(li)) { JsonObject *tracker = json_node_get_object((JsonNode *) li->data); const gchar *trackerAnnounce = tracker_stats_get_announce(tracker); gchar *trackerAnnounceHost = trg_gregex_get_first(rx, trackerAnnounce); int cmpResult = g_strcmp0(trackerAnnounceHost, search); g_free(trackerAnnounceHost); if (!cmpResult) { ret = TRUE; break; } } g_list_free(trackers); return ret; } gint64 torrent_get_left_until_done(JsonObject * t) { return json_object_get_int_member(t, FIELD_LEFTUNTILDONE); } const gchar *tracker_stats_get_announce(JsonObject * t) { return json_object_get_string_member(t, FIELD_ANNOUNCE); } const gchar *tracker_stats_get_scrape(JsonObject * t) { return json_object_get_string_member(t, FIELD_SCRAPE); } JsonArray *get_torrents_removed(JsonObject * response) { if (G_UNLIKELY(json_object_has_member(response, FIELD_REMOVED))) return json_object_get_array_member(response, FIELD_REMOVED); else return NULL; } JsonArray *get_torrents(JsonObject * response) { g_assert(json_object_get_array_member(response, FIELD_TORRENTS)); return json_object_get_array_member(response, FIELD_TORRENTS); } JsonArray *torrent_get_files(JsonObject * args) { return json_object_get_array_member(args, FIELD_FILES); } gint64 torrent_get_peers_connected(JsonObject * args) { return json_object_get_int_member(args, FIELD_PEERS_CONNECTED); } gint64 torrent_get_peers_sending_to_us(JsonObject * args) { return json_object_get_int_member(args, FIELD_PEERS_SENDING_TO_US); } gint64 torrent_get_peers_getting_from_us(JsonObject * args) { return json_object_get_int_member(args, FIELD_PEERS_GETTING_FROM_US); } gint64 torrent_get_web_seeds_sending_to_us(JsonObject * args) { return json_object_get_int_member(args, FIELD_WEB_SEEDS_SENDING_TO_US); } gint64 torrent_get_queue_position(JsonObject * args) { if (json_object_has_member(args, FIELD_QUEUE_POSITION)) return json_object_get_int_member(args, FIELD_QUEUE_POSITION); else return -1; } /* tracker stats */ gint64 tracker_stats_get_id(JsonObject * t) { return json_object_get_int_member(t, FIELD_ID); } gint64 tracker_stats_get_tier(JsonObject * t) { return json_object_get_int_member(t, FIELD_TIER); } gint64 tracker_stats_get_last_announce_peer_count(JsonObject * t) { return json_object_get_int_member(t, FIELD_LAST_ANNOUNCE_PEER_COUNT); } gint64 tracker_stats_get_last_announce_time(JsonObject * t) { return json_object_get_int_member(t, FIELD_LAST_ANNOUNCE_TIME); } gint64 tracker_stats_get_last_scrape_time(JsonObject * t) { return json_object_get_int_member(t, FIELD_LAST_SCRAPE_TIME); } gint64 tracker_stats_get_seeder_count(JsonObject * t) { return json_object_get_int_member(t, FIELD_SEEDERCOUNT); } gint64 tracker_stats_get_leecher_count(JsonObject * t) { return json_object_get_int_member(t, FIELD_LEECHERCOUNT); } gint64 tracker_stats_get_download_count(JsonObject * t) { return json_object_get_int_member(t, FIELD_DOWNLOADCOUNT); } const gchar *tracker_stats_get_announce_result(JsonObject * t) { return json_object_get_string_member(t, FIELD_LAST_ANNOUNCE_RESULT); } const gchar *tracker_stats_get_host(JsonObject * t) { return json_object_get_string_member(t, FIELD_HOST); } gchar *torrent_get_full_path(JsonObject * obj) { const gchar *location = json_object_get_string_member(obj, FIELD_DOWNLOAD_DIR); const gchar *name = json_object_get_string_member(obj, FIELD_NAME); return g_strdup_printf("%s/%s", location, name); } gchar *torrent_get_full_dir(JsonObject * obj) { gchar *containing_path, *name, *delim; const gchar *location; JsonArray *files = torrent_get_files(obj); JsonObject *firstFile; location = json_object_get_string_member(obj, FIELD_DOWNLOAD_DIR); firstFile = json_array_get_object_element(files, 0); name = g_strdup(json_object_get_string_member(firstFile, TFILE_NAME)); if ((delim = g_strstr_len(name, -1, "/"))) { *delim = '\0'; containing_path = g_strdup_printf("%s/%s", location, name); } else { containing_path = g_strdup(location); } g_free(name); return containing_path; } /* peers */ const gchar *peer_get_address(JsonObject * p) { return json_object_get_string_member(p, TPEER_ADDRESS); } const gchar *peer_get_flagstr(JsonObject * p) { return json_object_get_string_member(p, TPEER_FLAGSTR); } const gchar *peer_get_client_name(JsonObject * p) { return json_object_get_string_member(p, TPEER_CLIENT_NAME); } gboolean peer_get_is_encrypted(JsonObject * p) { return json_object_get_boolean_member(p, TPEER_IS_ENCRYPTED); } gboolean peer_get_is_uploading_to(JsonObject * p) { return json_object_get_boolean_member(p, TPEER_IS_UPLOADING_TO); } gboolean peer_get_is_downloading_from(JsonObject * p) { return json_object_get_boolean_member(p, TPEER_IS_DOWNLOADING_FROM); } gdouble peer_get_progress(JsonObject * p) { return json_double_to_progress(json_object_get_member(p, TPEER_PROGRESS)); } gint64 peer_get_rate_to_client(JsonObject * p) { return json_object_get_int_member(p, TPEER_RATE_TO_CLIENT); } gint64 peer_get_rate_to_peer(JsonObject * p) { return json_object_get_int_member(p, TPEER_RATE_TO_PEER); } gint64 peerfrom_get_pex(JsonObject * pf) { return json_object_get_int_member(pf, TPEERFROM_FROMPEX); } gint64 peerfrom_get_dht(JsonObject * pf) { return json_object_get_int_member(pf, TPEERFROM_FROMDHT); } gint64 peerfrom_get_trackers(JsonObject * pf) { return json_object_get_int_member(pf, TPEERFROM_FROMTRACKERS); } gint64 peerfrom_get_ltep(JsonObject * pf) { return json_object_get_int_member(pf, TPEERFROM_FROMLTEP); } gint64 peerfrom_get_resume(JsonObject * pf) { return json_object_get_int_member(pf, TPEERFROM_FROMRESUME); } gint64 peerfrom_get_incoming(JsonObject * pf) { return json_object_get_int_member(pf, TPEERFROM_FROMINCOMING); } gint64 peerfrom_get_lpd(JsonObject * pf) { return json_object_has_member(pf, TPEERFROM_FROMLPD) ? json_object_get_int_member(pf, TPEERFROM_FROMLPD) : -1; } /* files */ gdouble file_get_progress(gint64 length, gint64 completed) { if (length > 0) { gdouble progress = ((gdouble) completed / (gdouble) length) * 100.0; if (progress > 100.0) return 100.0; else return progress; } else { return 0.0; } } gint64 file_get_length(JsonObject * f) { return json_object_get_int_member(f, TFILE_LENGTH); } gint64 file_get_bytes_completed(JsonObject * f) { return json_object_get_int_member(f, TFILE_BYTES_COMPLETED); } const gchar *file_get_name(JsonObject * f) { return json_object_get_string_member(f, TFILE_NAME); } transmission-remote-gtk-1.4.1/src/torrent.h000066400000000000000000000150021341276053300207610ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TORRENT_H_ #define TORRENT_H_ #include #include "trg-client.h" #define TORRENT_FLAG_ERROR (1 << 0) #define TORRENT_FLAG_COMPLETE (1 << 1) #define TORRENT_FLAG_INCOMPLETE (1 << 2) #define TORRENT_FLAG_SEEDING (1 << 3) #define TORRENT_FLAG_SEEDING_WAIT (1 << 4) #define TORRENT_FLAG_CHECKING (1 << 5) #define TORRENT_FLAG_WAITING_CHECK (1 << 6) #define TORRENT_FLAG_CHECKING_ANY (1 << 7) #define TORRENT_FLAG_DOWNLOADING (1 << 8) #define TORRENT_FLAG_DOWNLOADING_WAIT (1 << 9) #define TORRENT_FLAG_PAUSED (1 << 10) #define TORRENT_FLAG_QUEUED (1 << 11) #define TORRENT_FLAG_ACTIVE (1 << 12) #define TORRENT_FLAG_DOWNLOADING_METADATA (1 << 13) #define FILTER_FLAG_TRACKER (1 << 14) #define FILTER_FLAG_DIR (1 << 15) #define TORRENT_ADD_FLAG_PAUSED (1 << 0) /* 0x01 */ #define TORRENT_ADD_FLAG_DELETE (1 << 1) /* 0x02 */ gint64 torrent_get_total_size(JsonObject * t); gint64 torrent_get_size_when_done(JsonObject * t); const gchar *torrent_get_name(JsonObject * t); gint64 torrent_get_rate_down(JsonObject * t); gint64 torrent_get_rate_up(JsonObject * t); gint64 torrent_get_eta(JsonObject * t); gint64 torrent_get_uploaded(JsonObject * t); gint64 torrent_get_corrupted(JsonObject * t); gint64 torrent_get_downloaded(JsonObject * t); const gchar *torrent_get_errorstr(JsonObject * t); gint64 torrent_get_error(JsonObject * t); const gchar *torrent_get_download_dir(JsonObject * t); const gchar *torrent_get_comment(JsonObject * t); gint64 torrent_get_have_unchecked(JsonObject * t); gint64 torrent_get_have_valid(JsonObject * t); gint64 torrent_get_status(JsonObject * t); const gchar *torrent_get_creator(JsonObject * t); gint64 torrent_get_date_created(JsonObject * t); const gchar *torrent_get_hash(JsonObject * t); gchar *torrent_get_status_string(gint64 rpcv, gint64 value, guint flags); gchar *torrent_get_status_icon(gint64 rpcv, guint flags); guint32 torrent_get_flags(JsonObject * t, gint64 rpcv, gint64 status, gint64 fileCount, gint64 downRate, gint64 upRate); JsonArray *torrent_get_peers(JsonObject * t); JsonObject *torrent_get_peersfrom(JsonObject * t); JsonArray *torrent_get_tracker_stats(JsonObject * t); JsonArray *torrent_get_wanted(JsonObject * t); JsonArray *torrent_get_priorities(JsonObject * t); gint64 torrent_get_id(JsonObject * t); JsonArray *torrent_get_files(JsonObject * args); gint64 torrent_get_peers_getting_from_us(JsonObject * args); gint64 torrent_get_peers_sending_to_us(JsonObject * args); gint64 torrent_get_web_seeds_sending_to_us(JsonObject * args); gint64 torrent_get_peers_connected(JsonObject * args); gdouble torrent_get_percent_done(JsonObject * t); gdouble torrent_get_recheck_progress(JsonObject * t); gint64 torrent_get_left_until_done(JsonObject * t); gboolean torrent_get_is_finished(JsonObject * t); gboolean torrent_get_is_private(JsonObject * t); gboolean torrent_get_honors_session_limits(JsonObject * t); gint64 torrent_get_bandwidth_priority(JsonObject * t); gint64 torrent_get_upload_limit(JsonObject * t); const gchar *torrent_get_magnetlink(JsonObject * t); gint64 torrent_get_added_date(JsonObject * t); gint64 torrent_get_done_date(JsonObject * t); gboolean torrent_get_upload_limited(JsonObject * t); gint64 torrent_get_download_limit(JsonObject * t); gboolean torrent_get_download_limited(JsonObject * t); gdouble torrent_get_seed_ratio_limit(JsonObject * t); gint64 torrent_get_seed_ratio_mode(JsonObject * t); gint64 torrent_get_peer_limit(JsonObject * t); gboolean torrent_has_tracker(JsonObject * t, GRegex * rx, gchar * search); gint64 torrent_get_queue_position(JsonObject * args); gint64 torrent_get_activity_date(JsonObject * t); gchar *torrent_get_full_dir(JsonObject * obj); gchar *torrent_get_full_path(JsonObject * obj); gdouble torrent_get_metadata_percent_complete(JsonObject * t); /* outer response object */ JsonArray *get_torrents(JsonObject * response); JsonArray *get_torrents_removed(JsonObject * response); /* tracker stats */ const gchar *tracker_stats_get_announce(JsonObject * t); const gchar *tracker_stats_get_scrape(JsonObject * t); gint64 tracker_stats_get_tier(JsonObject * t); gint64 tracker_stats_get_id(JsonObject * t); gint64 tracker_stats_get_last_announce_peer_count(JsonObject * t); gint64 tracker_stats_get_last_announce_time(JsonObject * t); gint64 tracker_stats_get_seeder_count(JsonObject * t); gint64 tracker_stats_get_leecher_count(JsonObject * t); gint64 tracker_stats_get_download_count(JsonObject * t); const gchar *tracker_stats_get_announce_result(JsonObject * t); const gchar *tracker_stats_get_host(JsonObject * t); gint64 tracker_stats_get_last_scrape_time(JsonObject * t); /* files */ gint64 file_get_length(JsonObject * f); gint64 file_get_bytes_completed(JsonObject * f); const gchar *file_get_name(JsonObject * f); gdouble file_get_progress(gint64 length, gint64 completed); /* peers */ const gchar *peer_get_address(JsonObject * p); const gchar *peer_get_client_name(JsonObject * p); gboolean peer_get_is_encrypted(JsonObject * p); gdouble peer_get_progress(JsonObject * p); const gchar *peer_get_flagstr(JsonObject * p); gint64 peer_get_rate_to_client(JsonObject * p); gint64 peer_get_rate_to_peer(JsonObject * p); gboolean peer_get_is_uploading_to(JsonObject * p); gboolean peer_get_is_downloading_from(JsonObject * p); gint64 peerfrom_get_pex(JsonObject * pf); gint64 peerfrom_get_dht(JsonObject * pf); gint64 peerfrom_get_trackers(JsonObject * pf); gint64 peerfrom_get_ltep(JsonObject * pf); gint64 peerfrom_get_resume(JsonObject * pf); gint64 peerfrom_get_incoming(JsonObject * pf); gint64 peerfrom_get_lpd(JsonObject * pf); #endif /* TORRENT_H_ */ transmission-remote-gtk-1.4.1/src/transmission-remote-gtk.pod000066400000000000000000000022471341276053300244330ustar00rootroot00000000000000 =head1 NAME transmission-remote-gtk - RPC client for the Transmission bittorrent client. =head1 SYNOPSIS B [OPTIONS] [torrent file|magnet link|url] =head1 DESCRIPTION B is an application for remote management of the Transmission BitTorrent client using its RPC interface. =head1 OPTIONS The following options are accepted when running C: =over 1 =item -m, --minimized, /m Start the application minimized =back =head1 ENVIRONMENT =over 1 =item TRG_NOUNIQUE Start a new instance, even if one already exists. =back =head1 AUTHOR Written by Alan Fitton. =head1 BUGS Please see L =head1 COPYRIGHT Copyright (C) 2011 Alan Fitton and various contributors. This is free software. You may redistribute copies of it under the terms of the GNU General Public License C. There is NO WARRANTY, to the extent permitted by law. =head1 SEE ALSO C, C, the project website C =cut transmission-remote-gtk-1.4.1/src/transmission_large.ico000066400000000000000000000226761341276053300235310ustar00rootroot0000000000000000 %(0` %77$;;4'7728885A>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M>?;M;<9H99/6770%... 771*66.BJLITXVW[YY][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][Y][X\ZTXVSWUBDAd770%77/2*---Y\Z˯w{y[_]dgfbgecfdbedafcadbadb`cb_da_ca^ba^ca]a_]a_]a_]a_[_][`^[_]Y][Z^\Y][Y][Y][Y][X\ZVZXlomX\Y77$VZXrusZ^\SWUnosp\`^W[YSWUM~򶹷uwvjmi@>9gieafcSWUmSWU+osp󴷵|}LLG:93:93:93EE@wzwosqpsrSWUGSWU `dbfieAA=7?>8?=8><7<:5ED@`dacfdvywSWUeSWU@nqo񝠞hmi`a_GGAgfbxwswwrwwrxwsggaGF@dfbjomeigSWU@SWUcfdmrn^`\RSNde`bc^bc^de`TSO`b^qtrX\ZSWU[_]osqRSO_a]tvrtvrsuqsuq_a]VVQy}vzxTXVX\Z蔗twt~MLHilgjliTTPfli|}W[XW[Yȋw{xnspWXRswsuxv^^ZW\ZV[XUYWz~{`daqtp~~rtoX\ZtxvTXVSWUvuxw{}UZWadc}hljSWU]SWUTkol򃉆z|Z][eigz|]a_SWU8SWU2afc򃈅v{xglikpmZ^\nspw|yUYWSWUSWUX\Zv{xuzwfjhW\ZSWUSWUSWUSWUSWUSWUTXVX\ZSWUSWUSWUSWUSWUSWU_cbkomv{x~TXVUYW|~y~{w|yw|yw|yw|yw|yw|yw|yw|yw|yy}{w|yw|yw|yw|yw|yw|yw|yx}zafcTXV|SWUYZ^\vzx{~_daTXVSWU SWU_UYWTXVTXVTXVTXVTXVTXVTXVTXVTXVUYW񇌊Y][TXVTXVTXVTXVTXVTXVTXVTXVUYWTXVs ++VV& N W  ((  ))KK DD[[--   ((^^``~~~~cc##9Aa懍񇍋񇍋񇍋񈍊艍n???????transmission-remote-gtk-1.4.1/src/trg-about-window.c000066400000000000000000000067361341276053300225060ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-about-window.h" GtkWidget *trg_about_window_new(GtkWindow * parent) { GtkWidget *dialog; GdkPixbuf *logo; const gchar *trgAuthors[] = { "Alan Fitton ", NULL }; dialog = gtk_about_dialog_new(); gtk_window_set_transient_for(GTK_WINDOW(dialog), parent); gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), PACKAGE_NAME, 48, GTK_ICON_LOOKUP_USE_BUILTIN, NULL); if (logo != NULL) { gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), logo); g_object_unref(logo); } gtk_about_dialog_set_license_type (GTK_ABOUT_DIALOG(dialog), GTK_LICENSE_GPL_2_0); gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog), PACKAGE_NAME); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), PACKAGE_VERSION); gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog), "(C) 2011-2013 Alan Fitton"); gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog), _ ("A remote client to transmission-daemon.")); gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog), "https://github.com/transmission-remote-gtk/transmission-remote-gtk"); gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(dialog), "https://github.com/transmission-remote-gtk/transmission-remote-gtk"); gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog), trgAuthors); /*gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(dialog), documenters); */ gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(dialog), "translations kindly contributed by\n\n" "* Pierre Rudloff (French)\n" "* Julian Held (German)\n" "* Algimantas Margevičius (Lithuanian)\n" "* Youn sok Choi (Korean)\n" "* Piotr (Polish)\n" "* Y3AVD (Russian)\n" "* aspidzent (Spanish)\n" "* Åke Svensson (Swedish)\n" "* ROR191 (Ukranian)\n"); return dialog; } transmission-remote-gtk-1.4.1/src/trg-about-window.h000066400000000000000000000017531341276053300225050ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef ABOUT_WINDOW_H_ #define ABOUT_WINDOW_H_ #include GtkWidget *trg_about_window_new(GtkWindow * parent); #endif /* ABOUT_WINDOW_H_ */ transmission-remote-gtk-1.4.1/src/trg-cell-renderer-counter.c000066400000000000000000000127421341276053300242610ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "trg-cell-renderer-counter.h" enum { PROP_0, PROP_STATE_LABEL, PROP_STATE_COUNT, N_PROPS, }; struct _TrgCellRendererCounter { GtkCellRendererText parent; }; typedef struct { gint count; gchar *originalLabel; } TrgCellRendererCounterPrivate; G_DEFINE_TYPE_WITH_PRIVATE(TrgCellRendererCounter, trg_cell_renderer_counter, GTK_TYPE_CELL_RENDERER_TEXT) static void trg_cell_renderer_counter_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgCellRendererCounterPrivate *priv = trg_cell_renderer_counter_get_instance_private(TRG_CELL_RENDERER_COUNTER(object)); switch (property_id) { case PROP_STATE_COUNT: g_value_set_int(value, priv->count); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_cell_renderer_counter_refresh(TrgCellRendererCounter * cr) { TrgCellRendererCounterPrivate *priv = trg_cell_renderer_counter_get_instance_private(cr); if (priv->originalLabel && priv->count > 0) { gchar *counterLabel = g_strdup_printf("%s (%d)", priv->originalLabel, priv->count); g_object_set(cr, "markup", counterLabel, NULL); g_free(counterLabel); } else { g_object_set(cr, "text", priv->originalLabel, NULL); } } static void trg_cell_renderer_counter_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgCellRendererCounterPrivate *priv = trg_cell_renderer_counter_get_instance_private(TRG_CELL_RENDERER_COUNTER(object)); if (property_id == PROP_STATE_LABEL) { g_free(priv->originalLabel); priv->originalLabel = g_strdup(g_value_get_string(value)); trg_cell_renderer_counter_refresh(TRG_CELL_RENDERER_COUNTER (object)); } else if (property_id == PROP_STATE_COUNT) { gint newCount = g_value_get_int(value); if (priv->count != newCount) { priv->count = newCount; trg_cell_renderer_counter_refresh(TRG_CELL_RENDERER_COUNTER (object)); } } else { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void trg_cell_renderer_counter_dispose(GObject * object) { TrgCellRendererCounterPrivate *priv = trg_cell_renderer_counter_get_instance_private(TRG_CELL_RENDERER_COUNTER(object)); g_free(priv->originalLabel); G_OBJECT_CLASS(trg_cell_renderer_counter_parent_class)->dispose(object); } static void trg_cell_renderer_counter_class_init(TrgCellRendererCounterClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_cell_renderer_counter_get_property; object_class->set_property = trg_cell_renderer_counter_set_property; object_class->dispose = trg_cell_renderer_counter_dispose; g_object_class_install_property(object_class, PROP_STATE_COUNT, g_param_spec_int("state-count", "State Count", "State Count", -1, INT_MAX, -1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property(object_class, PROP_STATE_LABEL, g_param_spec_string("state-label", "State Label", "State Label", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } static void trg_cell_renderer_counter_init(TrgCellRendererCounter * self) { } GtkCellRenderer *trg_cell_renderer_counter_new(void) { return g_object_new (TRG_TYPE_CELL_RENDERER_COUNTER, NULL); } transmission-remote-gtk-1.4.1/src/trg-cell-renderer-counter.h000066400000000000000000000021701341276053300242600ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once #include G_BEGIN_DECLS #define TRG_TYPE_CELL_RENDERER_COUNTER (trg_cell_renderer_counter_get_type()) G_DECLARE_FINAL_TYPE (TrgCellRendererCounter, trg_cell_renderer_counter, TRG, CELL_RENDERER_COUNTER, GtkCellRendererText) GtkCellRenderer *trg_cell_renderer_counter_new(void); G_END_DECLS transmission-remote-gtk-1.4.1/src/trg-cell-renderer-epoch.c000066400000000000000000000105051341276053300236730ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more depochils. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "trg-cell-renderer-epoch.h" #include "util.h" enum { PROP_0, PROP_EPOCH_VALUE }; G_DEFINE_TYPE(TrgCellRendererEpoch, trg_cell_renderer_epoch, GTK_TYPE_CELL_RENDERER_TEXT) #define TRG_CELL_RENDERER_EPOCH_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_CELL_RENDERER_EPOCH, TrgCellRendererEpochPrivate)) typedef struct _TrgCellRendererEpochPrivate TrgCellRendererEpochPrivate; struct _TrgCellRendererEpochPrivate { gdouble epoch_value; }; static void trg_cell_renderer_epoch_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgCellRendererEpochPrivate *priv = TRG_CELL_RENDERER_EPOCH_GET_PRIVATE(object); switch (property_id) { case PROP_EPOCH_VALUE: g_value_set_int64(value, priv->epoch_value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_cell_renderer_epoch_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgCellRendererEpochPrivate *priv = TRG_CELL_RENDERER_EPOCH_GET_PRIVATE(object); if (property_id == PROP_EPOCH_VALUE) { gint64 new_value = g_value_get_int64(value); if (priv->epoch_value != new_value) { if (new_value > 0) { gchar *timestring = epoch_to_string(new_value); g_object_set(object, "text", timestring, NULL); g_free(timestring); } else { g_object_set(object, "text", "", NULL); } priv->epoch_value = new_value; } } else { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void trg_cell_renderer_epoch_class_init(TrgCellRendererEpochClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_cell_renderer_epoch_get_property; object_class->set_property = trg_cell_renderer_epoch_set_property; g_object_class_install_property(object_class, PROP_EPOCH_VALUE, g_param_spec_int64("epoch-value", "Epoch Value", "Epoch Value", G_MININT64, G_MAXINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_type_class_add_private(klass, sizeof(TrgCellRendererEpochPrivate)); } static void trg_cell_renderer_epoch_init(TrgCellRendererEpoch * self G_GNUC_UNUSED) { } GtkCellRenderer *trg_cell_renderer_epoch_new(void) { return GTK_CELL_RENDERER(g_object_new (TRG_TYPE_CELL_RENDERER_EPOCH, NULL)); } transmission-remote-gtk-1.4.1/src/trg-cell-renderer-epoch.h000066400000000000000000000037441341276053300237070ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more depochils. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_CELL_RENDERER_EPOCH_H_ #define TRG_CELL_RENDERER_EPOCH_H_ #include #include G_BEGIN_DECLS #define TRG_TYPE_CELL_RENDERER_EPOCH trg_cell_renderer_epoch_get_type() #define TRG_CELL_RENDERER_EPOCH(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_CELL_RENDERER_EPOCH, TrgCellRendererEpoch)) #define TRG_CELL_RENDERER_EPOCH_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_CELL_RENDERER_EPOCH, TrgCellRendererEpochClass)) #define TRG_IS_CELL_RENDERER_EPOCH(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_CELL_RENDERER_EPOCH)) #define TRG_IS_CELL_RENDERER_EPOCH_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_CELL_RENDERER_EPOCH)) #define TRG_CELL_RENDERER_EPOCH_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_CELL_RENDERER_EPOCH, TrgCellRendererEpochClass)) typedef struct { GtkCellRendererText parent; } TrgCellRendererEpoch; typedef struct { GtkCellRendererTextClass parent_class; } TrgCellRendererEpochClass; GType trg_cell_renderer_epoch_get_type(void); GtkCellRenderer *trg_cell_renderer_epoch_new(void); G_END_DECLS #endif /* TRG_CELL_RENDERER_EPOCH_H_ */ transmission-remote-gtk-1.4.1/src/trg-cell-renderer-eta.c000066400000000000000000000103441341276053300233470ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-cell-renderer-eta.h" #include "util.h" enum { PROP_0, PROP_ETA_VALUE }; G_DEFINE_TYPE(TrgCellRendererEta, trg_cell_renderer_eta, GTK_TYPE_CELL_RENDERER_TEXT) #define TRG_CELL_RENDERER_ETA_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_CELL_RENDERER_ETA, TrgCellRendererEtaPrivate)) typedef struct _TrgCellRendererEtaPrivate TrgCellRendererEtaPrivate; struct _TrgCellRendererEtaPrivate { gdouble eta_value; }; static void trg_cell_renderer_eta_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgCellRendererEtaPrivate *priv = TRG_CELL_RENDERER_ETA_GET_PRIVATE(object); switch (property_id) { case PROP_ETA_VALUE: g_value_set_int64(value, priv->eta_value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_cell_renderer_eta_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgCellRendererEtaPrivate *priv = TRG_CELL_RENDERER_ETA_GET_PRIVATE(object); if (property_id == PROP_ETA_VALUE) { priv->eta_value = g_value_get_int64(value); if (priv->eta_value > 0) { char etaString[32]; tr_strltime_short(etaString, priv->eta_value, sizeof(etaString)); g_object_set(object, "text", etaString, NULL); } else if (priv->eta_value == -2) { g_object_set(object, "text", "∞", NULL); } else { g_object_set(object, "text", "", NULL); } } else { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void trg_cell_renderer_eta_class_init(TrgCellRendererEtaClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_cell_renderer_eta_get_property; object_class->set_property = trg_cell_renderer_eta_set_property; g_object_class_install_property(object_class, PROP_ETA_VALUE, g_param_spec_int64("eta-value", "Eta Value", "Eta Value", G_MININT64, G_MAXINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_type_class_add_private(klass, sizeof(TrgCellRendererEtaPrivate)); } static void trg_cell_renderer_eta_init(TrgCellRendererEta * self G_GNUC_UNUSED) { } GtkCellRenderer *trg_cell_renderer_eta_new(void) { return GTK_CELL_RENDERER(g_object_new(TRG_TYPE_CELL_RENDERER_ETA, NULL)); } transmission-remote-gtk-1.4.1/src/trg-cell-renderer-eta.h000066400000000000000000000036661341276053300233650ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_CELL_RENDERER_ETA_H_ #define TRG_CELL_RENDERER_ETA_H_ #include #include G_BEGIN_DECLS #define TRG_TYPE_CELL_RENDERER_ETA trg_cell_renderer_eta_get_type() #define TRG_CELL_RENDERER_ETA(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_CELL_RENDERER_ETA, TrgCellRendererEta)) #define TRG_CELL_RENDERER_ETA_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_CELL_RENDERER_ETA, TrgCellRendererEtaClass)) #define TRG_IS_CELL_RENDERER_ETA(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_CELL_RENDERER_ETA)) #define TRG_IS_CELL_RENDERER_ETA_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_CELL_RENDERER_ETA)) #define TRG_CELL_RENDERER_ETA_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_CELL_RENDERER_ETA, TrgCellRendererEtaClass)) typedef struct { GtkCellRendererText parent; } TrgCellRendererEta; typedef struct { GtkCellRendererTextClass parent_class; } TrgCellRendererEtaClass; GType trg_cell_renderer_eta_get_type(void); GtkCellRenderer *trg_cell_renderer_eta_new(void); G_END_DECLS #endif /* TRG_CELL_RENDERER_ETA_H_ */ transmission-remote-gtk-1.4.1/src/trg-cell-renderer-file-icon.c000066400000000000000000000152271341276053300244500ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-cell-renderer-file-icon.h" #include "util.h" enum { PROP_0, PROP_FILE_ID, PROP_FILE_NAME }; G_DEFINE_TYPE(TrgCellRendererFileIcon, trg_cell_renderer_file_icon, GTK_TYPE_CELL_RENDERER_PIXBUF) #define TRG_CELL_RENDERER_FILE_ICON_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_CELL_RENDERER_FILE_ICON, TrgCellRendererFileIconPrivate)) typedef struct _TrgCellRendererFileIconPrivate TrgCellRendererFileIconPrivate; struct _TrgCellRendererFileIconPrivate { gint64 file_id; gchar *text; }; static void trg_cell_renderer_file_icon_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgCellRendererFileIconPrivate *priv = TRG_CELL_RENDERER_FILE_ICON_GET_PRIVATE(object); switch (property_id) { case PROP_FILE_ID: g_value_set_int64(value, priv->file_id); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_cell_renderer_file_icon_refresh(TrgCellRendererFileIcon * fi) { TrgCellRendererFileIconPrivate *priv = TRG_CELL_RENDERER_FILE_ICON_GET_PRIVATE(fi); if (priv->file_id == -2) { return; } else if (priv->file_id == -1) { g_object_set(fi, "stock-id", GTK_STOCK_DIRECTORY, NULL); } else if (priv->text) { #ifndef WIN32 gboolean uncertain; gchar *mimetype = g_content_type_guess(priv->text, NULL, 0, &uncertain); GIcon *icon = NULL; if (!uncertain && mimetype) icon = g_content_type_get_icon(mimetype); g_free(mimetype); if (icon) { g_object_set(fi, "gicon", icon, NULL); g_object_unref(icon); } else { g_object_set(fi, "stock-id", GTK_STOCK_FILE, NULL); } #else g_object_set(fi, "stock-id", GTK_STOCK_FILE, NULL); #endif } } static void trg_cell_renderer_file_icon_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgCellRendererFileIconPrivate *priv = TRG_CELL_RENDERER_FILE_ICON_GET_PRIVATE(object); if (property_id == PROP_FILE_ID) { priv->file_id = g_value_get_int64(value); trg_cell_renderer_file_icon_refresh(TRG_CELL_RENDERER_FILE_ICON (object)); } else if (property_id == PROP_FILE_NAME) { if (priv->file_id != -1) { g_free(priv->text); priv->text = g_strdup(g_value_get_string(value)); trg_cell_renderer_file_icon_refresh(TRG_CELL_RENDERER_FILE_ICON (object)); } } else { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void trg_cell_renderer_file_icon_dispose(GObject * object) { TrgCellRendererFileIconPrivate *priv = TRG_CELL_RENDERER_FILE_ICON_GET_PRIVATE(object); g_free(priv->text); G_OBJECT_CLASS(trg_cell_renderer_file_icon_parent_class)->dispose (object); } static void trg_cell_renderer_file_icon_class_init(TrgCellRendererFileIconClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_cell_renderer_file_icon_get_property; object_class->set_property = trg_cell_renderer_file_icon_set_property; object_class->dispose = trg_cell_renderer_file_icon_dispose; g_object_class_install_property(object_class, PROP_FILE_ID, g_param_spec_int64("file-id", "File ID", "File ID", -2, G_MAXINT64, -2, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_FILE_NAME, g_param_spec_string("file-name", "Filename", "Filename", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_type_class_add_private(klass, sizeof(TrgCellRendererFileIconPrivate)); } static void trg_cell_renderer_file_icon_init(TrgCellRendererFileIcon * self) { } GtkCellRenderer *trg_cell_renderer_file_icon_new(void) { return GTK_CELL_RENDERER(g_object_new (TRG_TYPE_CELL_RENDERER_FILE_ICON, NULL)); } transmission-remote-gtk-1.4.1/src/trg-cell-renderer-file-icon.h000066400000000000000000000040711341276053300244500ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_CELL_RENDERER_FILE_ICON_H_ #define TRG_CELL_RENDERER_FILE_ICON_H_ #include #include G_BEGIN_DECLS #define TRG_TYPE_CELL_RENDERER_FILE_ICON trg_cell_renderer_file_icon_get_type() #define TRG_CELL_RENDERER_FILE_ICON(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_CELL_RENDERER_FILE_ICON, TrgCellRendererFileIcon)) #define TRG_CELL_RENDERER_FILE_ICON_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_CELL_RENDERER_FILE_ICON, TrgCellRendererFileIconClass)) #define TRG_IS_CELL_RENDERER_FILE_ICON(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_CELL_RENDERER_FILE_ICON)) #define TRG_IS_CELL_RENDERER_FILE_ICON_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_CELL_RENDERER_FILE_ICON)) #define TRG_CELL_RENDERER_FILE_ICON_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_CELL_RENDERER_FILE_ICON, TrgCellRendererFileIconClass)) typedef struct { GtkCellRendererPixbuf parent; } TrgCellRendererFileIcon; typedef struct { GtkCellRendererPixbufClass parent_class; } TrgCellRendererFileIconClass; GType trg_cell_renderer_file_icon_get_type(void); GtkCellRenderer *trg_cell_renderer_file_icon_new(void); G_END_DECLS #endif /* TRG_CELL_RENDERER_FILE_ICON_H_ */ transmission-remote-gtk-1.4.1/src/trg-cell-renderer-numgteqthan.c000066400000000000000000000133631341276053300251350ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-cell-renderer-numgteqthan.h" #include "util.h" enum { PROP_0, PROP_VALUE_VALUE, PROP_MINVALUE }; G_DEFINE_TYPE(TrgCellRendererNumGtEqThan, trg_cell_renderer_numgteqthan, GTK_TYPE_CELL_RENDERER_TEXT) #define TRG_CELL_RENDERER_NUMGTEQTHAN_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_CELL_RENDERER_NUMGTEQTHAN, TrgCellRendererNumGtEqThanPrivate)) typedef struct _TrgCellRendererNumGtEqThanPrivate TrgCellRendererNumGtEqThanPrivate; struct _TrgCellRendererNumGtEqThanPrivate { gint64 value_value; gint64 minvalue; }; static void trg_cell_renderer_numgteqthan_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgCellRendererNumGtEqThanPrivate *priv = TRG_CELL_RENDERER_NUMGTEQTHAN_GET_PRIVATE(object); switch (property_id) { case PROP_VALUE_VALUE: g_value_set_int64(value, priv->value_value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_cell_renderer_numgteqthan_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgCellRendererNumGtEqThanPrivate *priv = TRG_CELL_RENDERER_NUMGTEQTHAN_GET_PRIVATE(object); if (property_id == PROP_VALUE_VALUE) { priv->value_value = g_value_get_int64(value); if (priv->value_value >= priv->minvalue) { gchar size_text[32]; g_snprintf(size_text, sizeof(size_text), "%" G_GINT64_FORMAT, priv->value_value); g_object_set(object, "text", size_text, NULL); } else { g_object_set(object, "text", "", NULL); } } else if (property_id == PROP_MINVALUE) { priv->minvalue = g_value_get_int64(value); } else { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void trg_cell_renderer_numgteqthan_class_init(TrgCellRendererNumGtEqThanClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_cell_renderer_numgteqthan_get_property; object_class->set_property = trg_cell_renderer_numgteqthan_set_property; g_object_class_install_property(object_class, PROP_VALUE_VALUE, g_param_spec_int64("value", "Value", "Value", G_MININT64, G_MAXINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_MINVALUE, g_param_spec_int64("minvalue", "Min Value", "Min Value", G_MININT64, G_MAXINT64, 1, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_type_class_add_private(klass, sizeof(TrgCellRendererNumGtEqThanPrivate)); } static void trg_cell_renderer_numgteqthan_init(TrgCellRendererNumGtEqThan * self) { g_object_set(self, "xalign", 1.0f, NULL); } GtkCellRenderer *trg_cell_renderer_numgteqthan_new(gint64 minvalue) { return GTK_CELL_RENDERER(g_object_new (TRG_TYPE_CELL_RENDERER_NUMGTEQTHAN, "minvalue", minvalue, NULL)); } transmission-remote-gtk-1.4.1/src/trg-cell-renderer-numgteqthan.h000066400000000000000000000041611341276053300251360ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_CELL_RENDERER_NUMGTEQTHAN_H_ #define TRG_CELL_RENDERER_NUMGTEQTHAN_H_ #include #include G_BEGIN_DECLS #define TRG_TYPE_CELL_RENDERER_NUMGTEQTHAN trg_cell_renderer_numgteqthan_get_type() #define TRG_CELL_RENDERER_NUMGTEQTHAN(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_CELL_RENDERER_NUMGTEQTHAN, TrgCellRendererNumGtEqThan)) #define TRG_CELL_RENDERER_NUMGTEQTHAN_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_CELL_RENDERER_NUMGTEQTHAN, TrgCellRendererNumGtEqThanClass)) #define TRG_IS_CELL_RENDERER_NUMGTEQTHAN(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_CELL_RENDERER_NUMGTEQTHAN)) #define TRG_IS_CELL_RENDERER_NUMGTEQTHAN_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_CELL_RENDERER_NUMGTEQTHAN)) #define TRG_CELL_RENDERER_NUMGTEQTHAN_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_CELL_RENDERER_NUMGTEQTHAN, TrgCellRendererNumGtEqThanClass)) typedef struct { GtkCellRendererText parent; } TrgCellRendererNumGtEqThan; typedef struct { GtkCellRendererTextClass parent_class; } TrgCellRendererNumGtEqThanClass; GType trg_cell_renderer_numgteqthan_get_type(void); GtkCellRenderer *trg_cell_renderer_numgteqthan_new(gint64 minvalue); G_END_DECLS #endif /* TRG_CELL_RENDERER_NUMGTEQTHAN_H_ */ transmission-remote-gtk-1.4.1/src/trg-cell-renderer-priority.c000066400000000000000000000105541341276053300244620ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "trg-cell-renderer-priority.h" #include "protocol-constants.h" #include "trg-files-model.h" #include "util.h" enum { PROP_0, PROP_PRIORITY_VALUE }; G_DEFINE_TYPE(TrgCellRendererPriority, trg_cell_renderer_priority, GTK_TYPE_CELL_RENDERER_TEXT) #define TRG_CELL_RENDERER_PRIORITY_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_CELL_RENDERER_PRIORITY, TrgCellRendererPriorityPrivate)) typedef struct _TrgCellRendererPriorityPrivate TrgCellRendererPriorityPrivate; struct _TrgCellRendererPriorityPrivate { gint64 priority_value; }; static void trg_cell_renderer_priority_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgCellRendererPriorityPrivate *priv = TRG_CELL_RENDERER_PRIORITY_GET_PRIVATE(object); switch (property_id) { case PROP_PRIORITY_VALUE: g_value_set_int64(value, priv->priority_value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_cell_renderer_priority_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgCellRendererPriorityPrivate *priv = TRG_CELL_RENDERER_PRIORITY_GET_PRIVATE(object); if (property_id == PROP_PRIORITY_VALUE) { priv->priority_value = g_value_get_int(value); if (priv->priority_value == TR_PRI_LOW) { g_object_set(object, "text", _("Low"), NULL); } else if (priv->priority_value == TR_PRI_HIGH) { g_object_set(object, "text", _("High"), NULL); } else if (priv->priority_value == TR_PRI_NORMAL) { g_object_set(object, "text", _("Normal"), NULL); } else if (priv->priority_value == TR_PRI_MIXED) { g_object_set(object, "text", _("Mixed"), NULL); } else { g_object_set(object, "text", "", NULL); } } else { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void trg_cell_renderer_priority_class_init(TrgCellRendererPriorityClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_cell_renderer_priority_get_property; object_class->set_property = trg_cell_renderer_priority_set_property; g_object_class_install_property(object_class, PROP_PRIORITY_VALUE, g_param_spec_int ("priority-value", "Priority Value", "Priority Value", TR_PRI_UNSET, TR_PRI_HIGH, TR_PRI_NORMAL, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_type_class_add_private(klass, sizeof(TrgCellRendererPriorityPrivate)); } static void trg_cell_renderer_priority_init(TrgCellRendererPriority * self) { } GtkCellRenderer *trg_cell_renderer_priority_new(void) { return GTK_CELL_RENDERER(g_object_new (TRG_TYPE_CELL_RENDERER_PRIORITY, NULL)); } transmission-remote-gtk-1.4.1/src/trg-cell-renderer-priority.h000066400000000000000000000040441341276053300244640ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_CELL_RENDERER_PRIORITY_H_ #define TRG_CELL_RENDERER_PRIORITY_H_ #include #include G_BEGIN_DECLS #define TRG_TYPE_CELL_RENDERER_PRIORITY trg_cell_renderer_priority_get_type() #define TRG_CELL_RENDERER_PRIORITY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_CELL_RENDERER_PRIORITY, TrgCellRendererPriority)) #define TRG_CELL_RENDERER_PRIORITY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_CELL_RENDERER_PRIORITY, TrgCellRendererPriorityClass)) #define TRG_IS_CELL_RENDERER_PRIORITY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_CELL_RENDERER_PRIORITY)) #define TRG_IS_CELL_RENDERER_PRIORITY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_CELL_RENDERER_PRIORITY)) #define TRG_CELL_RENDERER_PRIORITY_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_CELL_RENDERER_PRIORITY, TrgCellRendererPriorityClass)) typedef struct { GtkCellRendererText parent; } TrgCellRendererPriority; typedef struct { GtkCellRendererTextClass parent_class; } TrgCellRendererPriorityClass; GType trg_cell_renderer_priority_get_type(void); GtkCellRenderer *trg_cell_renderer_priority_new(void); G_END_DECLS #endif /* TRG_CELL_RENDERER_PRIORITY_H_ */ transmission-remote-gtk-1.4.1/src/trg-cell-renderer-ratio.c000066400000000000000000000103201341276053300237060ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-cell-renderer-ratio.h" #include "util.h" enum { PROP_0, PROP_RATIO_VALUE }; G_DEFINE_TYPE(TrgCellRendererRatio, trg_cell_renderer_ratio, GTK_TYPE_CELL_RENDERER_TEXT) #define TRG_CELL_RENDERER_RATIO_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_CELL_RENDERER_RATIO, TrgCellRendererRatioPrivate)) typedef struct _TrgCellRendererRatioPrivate TrgCellRendererRatioPrivate; struct _TrgCellRendererRatioPrivate { gdouble ratio_value; }; static void trg_cell_renderer_ratio_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgCellRendererRatioPrivate *priv = TRG_CELL_RENDERER_RATIO_GET_PRIVATE(object); switch (property_id) { case PROP_RATIO_VALUE: g_value_set_double(value, priv->ratio_value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void trg_cell_renderer_ratio_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgCellRendererRatioPrivate *priv = TRG_CELL_RENDERER_RATIO_GET_PRIVATE(object); if (property_id == PROP_RATIO_VALUE) { priv->ratio_value = g_value_get_double(value); if (priv->ratio_value > 0) { char ratioString[32]; trg_strlratio(ratioString, priv->ratio_value); g_object_set(object, "text", ratioString, NULL); } else { g_object_set(object, "text", "", NULL); } } else { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void trg_cell_renderer_ratio_class_init(TrgCellRendererRatioClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_cell_renderer_ratio_get_property; object_class->set_property = trg_cell_renderer_ratio_set_property; g_object_class_install_property(object_class, PROP_RATIO_VALUE, g_param_spec_double("ratio-value", "Ratio Value", "Ratio Value", 0, DBL_MAX, 0, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_type_class_add_private(klass, sizeof(TrgCellRendererRatioPrivate)); } static void trg_cell_renderer_ratio_init(TrgCellRendererRatio * self) { g_object_set(self, "xalign", 1.0f, NULL); } GtkCellRenderer *trg_cell_renderer_ratio_new(void) { return GTK_CELL_RENDERER(g_object_new (TRG_TYPE_CELL_RENDERER_RATIO, NULL)); } transmission-remote-gtk-1.4.1/src/trg-cell-renderer-ratio.h000066400000000000000000000037421341276053300237250ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_CELL_RENDERER_RATIO_H_ #define TRG_CELL_RENDERER_RATIO_H_ #include #include G_BEGIN_DECLS #define TRG_TYPE_CELL_RENDERER_RATIO trg_cell_renderer_ratio_get_type() #define TRG_CELL_RENDERER_RATIO(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_CELL_RENDERER_RATIO, TrgCellRendererRatio)) #define TRG_CELL_RENDERER_RATIO_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_CELL_RENDERER_RATIO, TrgCellRendererRatioClass)) #define TRG_IS_CELL_RENDERER_RATIO(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_CELL_RENDERER_RATIO)) #define TRG_IS_CELL_RENDERER_RATIO_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_CELL_RENDERER_RATIO)) #define TRG_CELL_RENDERER_RATIO_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_CELL_RENDERER_RATIO, TrgCellRendererRatioClass)) typedef struct { GtkCellRendererText parent; } TrgCellRendererRatio; typedef struct { GtkCellRendererTextClass parent_class; } TrgCellRendererRatioClass; GType trg_cell_renderer_ratio_get_type(void); GtkCellRenderer *trg_cell_renderer_ratio_new(void); G_END_DECLS #endif /* TRG_CELL_RENDERER_RATIO_H_ */ transmission-remote-gtk-1.4.1/src/trg-cell-renderer-size.c000066400000000000000000000103721341276053300235510ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-cell-renderer-size.h" #include "util.h" enum { PROP_0, PROP_SIZE_VALUE }; G_DEFINE_TYPE(TrgCellRendererSize, trg_cell_renderer_size, GTK_TYPE_CELL_RENDERER_TEXT) #define TRG_CELL_RENDERER_SIZE_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_CELL_RENDERER_SIZE, TrgCellRendererSizePrivate)) typedef struct _TrgCellRendererSizePrivate TrgCellRendererSizePrivate; struct _TrgCellRendererSizePrivate { gint64 size_value; }; static void trg_cell_renderer_size_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgCellRendererSizePrivate *priv = TRG_CELL_RENDERER_SIZE_GET_PRIVATE(object); switch (property_id) { case PROP_SIZE_VALUE: g_value_set_int64(value, priv->size_value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_cell_renderer_size_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgCellRendererSizePrivate *priv = TRG_CELL_RENDERER_SIZE_GET_PRIVATE(object); if (property_id == PROP_SIZE_VALUE) { gint64 new_value = g_value_get_int64(value); if (priv->size_value != new_value) { if (new_value > 0) { char sizeString[32]; trg_strlsize(sizeString, new_value); g_object_set(object, "text", sizeString, NULL); } else { g_object_set(object, "text", "", NULL); } priv->size_value = new_value; } } else { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void trg_cell_renderer_size_class_init(TrgCellRendererSizeClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_cell_renderer_size_get_property; object_class->set_property = trg_cell_renderer_size_set_property; g_object_class_install_property(object_class, PROP_SIZE_VALUE, g_param_spec_int64("size-value", "Size Value", "Size Value", 0, G_MAXINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_type_class_add_private(klass, sizeof(TrgCellRendererSizePrivate)); } static void trg_cell_renderer_size_init(TrgCellRendererSize * self) { g_object_set(self, "xalign", 1.0f, NULL); } GtkCellRenderer *trg_cell_renderer_size_new(void) { return GTK_CELL_RENDERER(g_object_new(TRG_TYPE_CELL_RENDERER_SIZE, NULL)); } transmission-remote-gtk-1.4.1/src/trg-cell-renderer-size.h000066400000000000000000000037141341276053300235600ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_CELL_RENDERER_SIZE_H_ #define TRG_CELL_RENDERER_SIZE_H_ #include #include G_BEGIN_DECLS #define TRG_TYPE_CELL_RENDERER_SIZE trg_cell_renderer_size_get_type() #define TRG_CELL_RENDERER_SIZE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_CELL_RENDERER_SIZE, TrgCellRendererSize)) #define TRG_CELL_RENDERER_SIZE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_CELL_RENDERER_SIZE, TrgCellRendererSizeClass)) #define TRG_IS_CELL_RENDERER_SIZE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_CELL_RENDERER_SIZE)) #define TRG_IS_CELL_RENDERER_SIZE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_CELL_RENDERER_SIZE)) #define TRG_CELL_RENDERER_SIZE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_CELL_RENDERER_SIZE, TrgCellRendererSizeClass)) typedef struct { GtkCellRendererText parent; } TrgCellRendererSize; typedef struct { GtkCellRendererTextClass parent_class; } TrgCellRendererSizeClass; GType trg_cell_renderer_size_get_type(void); GtkCellRenderer *trg_cell_renderer_size_new(void); G_END_DECLS #endif /* TRG_CELL_RENDERER_SIZE_H_ */ transmission-remote-gtk-1.4.1/src/trg-cell-renderer-speed.c000066400000000000000000000107121341276053300236750ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-cell-renderer-speed.h" #include "util.h" enum { PROP_0, PROP_SPEED_VALUE }; G_DEFINE_TYPE(TrgCellRendererSpeed, trg_cell_renderer_speed, GTK_TYPE_CELL_RENDERER_TEXT) #define TRG_CELL_RENDERER_SPEED_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_CELL_RENDERER_SPEED, TrgCellRendererSpeedPrivate)) typedef struct _TrgCellRendererSpeedPrivate TrgCellRendererSpeedPrivate; struct _TrgCellRendererSpeedPrivate { gint64 speed_value; }; static void trg_cell_renderer_speed_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgCellRendererSpeedPrivate *priv = TRG_CELL_RENDERER_SPEED_GET_PRIVATE(object); switch (property_id) { case PROP_SPEED_VALUE: g_value_set_int64(value, priv->speed_value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_cell_renderer_speed_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgCellRendererSpeedPrivate *priv = TRG_CELL_RENDERER_SPEED_GET_PRIVATE(object); if (property_id == PROP_SPEED_VALUE) { gint64 new_value = g_value_get_int64(value); if (new_value != priv->speed_value) { if (new_value > 0) { char speedString[32]; trg_strlspeed(speedString, new_value / disk_K); g_object_set(object, "text", speedString, NULL); } else { g_object_set(object, "text", "", NULL); } priv->speed_value = new_value; } } else { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void trg_cell_renderer_speed_class_init(TrgCellRendererSpeedClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_cell_renderer_speed_get_property; object_class->set_property = trg_cell_renderer_speed_set_property; g_object_class_install_property(object_class, PROP_SPEED_VALUE, g_param_spec_int64("speed-value", "Speed Value", "Speed Value", 0, G_MAXINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_type_class_add_private(klass, sizeof(TrgCellRendererSpeedPrivate)); } static void trg_cell_renderer_speed_init(TrgCellRendererSpeed * self) { g_object_set(self, "xalign", 1.0f, NULL); } GtkCellRenderer *trg_cell_renderer_speed_new(void) { return GTK_CELL_RENDERER(g_object_new (TRG_TYPE_CELL_RENDERER_SPEED, NULL)); } transmission-remote-gtk-1.4.1/src/trg-cell-renderer-speed.h000066400000000000000000000037431341276053300237100ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_CELL_RENDERER_SPEED_H_ #define TRG_CELL_RENDERER_SPEED_H_ #include #include G_BEGIN_DECLS #define TRG_TYPE_CELL_RENDERER_SPEED trg_cell_renderer_speed_get_type() #define TRG_CELL_RENDERER_SPEED(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_CELL_RENDERER_SPEED, TrgCellRendererSpeed)) #define TRG_CELL_RENDERER_SPEED_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_CELL_RENDERER_SPEED, TrgCellRendererSpeedClass)) #define TRG_IS_CELL_RENDERER_SPEED(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_CELL_RENDERER_SPEED)) #define TRG_IS_CELL_RENDERER_SPEED_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_CELL_RENDERER_SPEED)) #define TRG_CELL_RENDERER_SPEED_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_CELL_RENDERER_SPEED, TrgCellRendererSpeedClass)) typedef struct { GtkCellRendererText parent; } TrgCellRendererSpeed; typedef struct { GtkCellRendererTextClass parent_class; } TrgCellRendererSpeedClass; GType trg_cell_renderer_speed_get_type(void); GtkCellRenderer *trg_cell_renderer_speed_new(void); G_END_DECLS #endif /* TRG_CELL_RENDERER_SPEED_H_ */ transmission-remote-gtk-1.4.1/src/trg-cell-renderer-wanted.c000066400000000000000000000077511341276053300240700ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "trg-cell-renderer-wanted.h" #include "protocol-constants.h" #include "trg-files-model.h" #include "util.h" enum { PROP_0, PROP_WANTED_VALUE }; G_DEFINE_TYPE(TrgCellRendererWanted, trg_cell_renderer_wanted, GTK_TYPE_CELL_RENDERER_TOGGLE) #define TRG_CELL_RENDERER_WANTED_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_CELL_RENDERER_WANTED, TrgCellRendererWantedPrivate)) typedef struct _TrgCellRendererWantedPrivate TrgCellRendererWantedPrivate; struct _TrgCellRendererWantedPrivate { gint wanted_value; }; static void trg_cell_renderer_wanted_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgCellRendererWantedPrivate *priv = TRG_CELL_RENDERER_WANTED_GET_PRIVATE(object); switch (property_id) { case PROP_WANTED_VALUE: g_value_set_int(value, priv->wanted_value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_cell_renderer_wanted_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgCellRendererWantedPrivate *priv = TRG_CELL_RENDERER_WANTED_GET_PRIVATE(object); if (property_id == PROP_WANTED_VALUE) { priv->wanted_value = g_value_get_int(value); g_object_set(G_OBJECT(object), "inconsistent", (priv->wanted_value == TR_PRI_MIXED), "active", (priv->wanted_value == TRUE), NULL); } else { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void trg_cell_renderer_wanted_class_init(TrgCellRendererWantedClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_cell_renderer_wanted_get_property; object_class->set_property = trg_cell_renderer_wanted_set_property; g_object_class_install_property(object_class, PROP_WANTED_VALUE, g_param_spec_int ("wanted-value", "Wanted Value", "Wanted Value", TR_PRI_UNSET, TRUE, TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_type_class_add_private(klass, sizeof(TrgCellRendererWantedPrivate)); } static void trg_cell_renderer_wanted_init(TrgCellRendererWanted * self) { /*g_object_set(G_OBJECT(self), "xalign", (gfloat) 0.5, "yalign", (gfloat) 0.5, NULL); */ } GtkCellRenderer *trg_cell_renderer_wanted_new(void) { return GTK_CELL_RENDERER(g_object_new (TRG_TYPE_CELL_RENDERER_WANTED, NULL)); } transmission-remote-gtk-1.4.1/src/trg-cell-renderer-wanted.h000066400000000000000000000037741341276053300240760ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_CELL_RENDERER_WANTED_H_ #define TRG_CELL_RENDERER_WANTED_H_ #include #include G_BEGIN_DECLS #define TRG_TYPE_CELL_RENDERER_WANTED trg_cell_renderer_wanted_get_type() #define TRG_CELL_RENDERER_WANTED(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_CELL_RENDERER_WANTED, TrgCellRendererWanted)) #define TRG_CELL_RENDERER_WANTED_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_CELL_RENDERER_WANTED, TrgCellRendererWantedClass)) #define TRG_IS_CELL_RENDERER_WANTED(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_CELL_RENDERER_WANTED)) #define TRG_IS_CELL_RENDERER_WANTED_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_CELL_RENDERER_WANTED)) #define TRG_CELL_RENDERER_WANTED_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_CELL_RENDERER_WANTED, TrgCellRendererWantedClass)) typedef struct { GtkCellRendererToggle parent; } TrgCellRendererWanted; typedef struct { GtkCellRendererToggleClass parent_class; } TrgCellRendererWantedClass; GType trg_cell_renderer_wanted_get_type(void); GtkCellRenderer *trg_cell_renderer_wanted_new(void); G_END_DECLS #endif /* TRG_CELL_RENDERER_WANTED_H_ */ transmission-remote-gtk-1.4.1/src/trg-client.c000066400000000000000000000512061341276053300213350ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #ifdef HAVE_LIBPROXY #include #endif #include #include #include "json.h" #include "trg-prefs.h" #include "protocol-constants.h" #include "util.h" #include "requests.h" #include "trg-client.h" /* This class manages/does quite a few things, and is passed around a lot. It: * * 1) Holds/inits the single TrgPrefs object for managing configuration. * 2) Manages a thread pool for making requests * (each thread has its own CURL client in thread local storage) * 3) Holds current connection details needed by CURL clients. * (session ID, username, password, URL, ssl, proxy) * 4) Holds a hash table for looking up a torrent by its ID. * 5) Dispatches synchronous/asyncrhonous requests and tracks failures. * 6) Holds connection state, an update serial, and provides signals for * connect/disconnect. * 7) Provides a mutex for locking updates. * 8) Holds the latest session object sent in a session-get response. */ G_DEFINE_TYPE(TrgClient, trg_client, G_TYPE_OBJECT) enum { TC_SESSION_UPDATED, TC_SIGNAL_COUNT }; static guint signals[TC_SIGNAL_COUNT] = { 0 }; struct _TrgClientPrivate { char *session_id; gint connid; guint failCount; guint retries; guint timeout; gint64 updateSerial; JsonObject *session; gboolean ssl; gboolean ssl_validate; gdouble version; char *url; char *username; char *password; char *proxy; GHashTable *torrentTable; GThreadPool *pool; TrgPrefs *prefs; GPrivate tlsKey; gint configSerial; guint http_class; GMutex configMutex; gboolean seedRatioLimited; gdouble seedRatioLimit; }; static void dispatch_async_threadfunc(trg_request * reqrsp, TrgClient * tc); static void trg_client_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { switch (property_id) { default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_client_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { switch (property_id) { default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_client_dispose(GObject * object) { G_OBJECT_CLASS(trg_client_parent_class)->dispose(object); } static void trg_client_class_init(TrgClientClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(TrgClientPrivate)); object_class->get_property = trg_client_get_property; object_class->set_property = trg_client_set_property; object_class->dispose = trg_client_dispose; signals[TC_SESSION_UPDATED] = g_signal_new("session-updated", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (TrgClientClass, session_updated), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); } static void trg_client_init(TrgClient * self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE(self, TRG_TYPE_CLIENT, TrgClientPrivate); } TrgClient *trg_client_new(void) { TrgClient *tc = g_object_new(TRG_TYPE_CLIENT, NULL); TrgClientPrivate *priv = tc->priv; TrgPrefs *prefs = priv->prefs = trg_prefs_new(); trg_prefs_load(prefs); g_mutex_init(&priv->configMutex); //priv->tlsKey = g_private_new(NULL); priv->seedRatioLimited = FALSE; priv->seedRatioLimit = 0.00; priv->pool = g_thread_pool_new((GFunc) dispatch_async_threadfunc, tc, DISPATCH_POOL_SIZE, TRUE, NULL); tr_formatter_size_init(disk_K, _(disk_K_str), _(disk_M_str), _(disk_G_str), _(disk_T_str)); tr_formatter_speed_init(speed_K, _(speed_K_str), _(speed_M_str), _(speed_G_str), _(speed_T_str)); return tc; } const gchar *trg_client_get_version_string(TrgClient * tc) { return session_get_version_string(tc->priv->session); } gdouble trg_client_get_version(TrgClient * tc) { return tc->priv->version; } gint64 trg_client_get_rpc_version(TrgClient * tc) { TrgClientPrivate *priv = tc->priv; return session_get_rpc_version(priv->session); } void trg_client_inc_connid(TrgClient * tc) { TrgClientPrivate *priv = tc->priv; g_atomic_int_inc(&priv->connid); } void trg_client_set_session(TrgClient * tc, JsonObject * session) { TrgClientPrivate *priv = tc->priv; if (priv->session) json_object_unref(priv->session); else priv->version = session_get_version(session); priv->session = session; json_object_ref(session); priv->seedRatioLimit = session_get_seed_ratio_limit(session); priv->seedRatioLimited = session_get_seed_ratio_limited(session); g_signal_emit(tc, signals[TC_SESSION_UPDATED], 0, session); } TrgPrefs *trg_client_get_prefs(TrgClient * tc) { return tc->priv->prefs; } int trg_client_populate_with_settings(TrgClient * tc) { TrgClientPrivate *priv = tc->priv; TrgPrefs *prefs = priv->prefs; gint port; gchar *host, *path; #ifdef HAVE_LIBPROXY pxProxyFactory *pf = NULL; #endif g_mutex_lock(&priv->configMutex); trg_prefs_set_connection(prefs, trg_prefs_get_profile(prefs)); g_free(priv->url); priv->url = NULL; g_free(priv->username); priv->username = NULL; g_free(priv->password); priv->password = NULL; port = trg_prefs_get_int(prefs, TRG_PREFS_KEY_PORT, TRG_PREFS_CONNECTION); host = trg_prefs_get_string(prefs, TRG_PREFS_KEY_HOSTNAME, TRG_PREFS_CONNECTION); path = trg_prefs_get_string(prefs, TRG_PREFS_KEY_RPC_URL_PATH, TRG_PREFS_CONNECTION); if (!host || strlen(host) < 1) { g_free(host); g_mutex_unlock(&priv->configMutex); return TRG_NO_HOSTNAME_SET; } #ifndef CURL_NO_SSL priv->ssl = trg_prefs_get_bool(prefs, TRG_PREFS_KEY_SSL, TRG_PREFS_CONNECTION); priv->ssl_validate = trg_prefs_get_bool(prefs, TRG_PREFS_KEY_SSL_VALIDATE, TRG_PREFS_CONNECTION); #else priv->ssl = FALSE; #endif priv->url = g_strdup_printf("%s://%s:%d%s", priv->ssl ? HTTPS_URI_PREFIX : HTTP_URI_PREFIX, host, port, path); g_free(host); g_free(path); priv->username = trg_prefs_get_string(prefs, TRG_PREFS_KEY_USERNAME, TRG_PREFS_CONNECTION); priv->password = trg_prefs_get_string(prefs, TRG_PREFS_KEY_PASSWORD, TRG_PREFS_CONNECTION); g_free(priv->proxy); priv->proxy = NULL; #ifdef HAVE_LIBPROXY if ((pf = px_proxy_factory_new())) { char **proxies = px_proxy_factory_get_proxies(pf, priv->url); int i; for (i = 0; proxies[i]; i++) { if (g_str_has_prefix(proxies[i], HTTP_URI_PREFIX) || g_str_has_prefix(proxies[i], HTTPS_URI_PREFIX)) { g_free(priv->proxy); priv->proxy = proxies[i]; } else { g_free(proxies[i]); } } g_free(proxies); px_proxy_factory_free(pf); } #endif priv->configSerial++; g_mutex_unlock(&priv->configMutex); return 0; } gchar *trg_client_get_password(TrgClient * tc) { return tc->priv->password; } gchar *trg_client_get_username(TrgClient * tc) { return tc->priv->username; } gchar *trg_client_get_url(TrgClient * tc) { return tc->priv->url; } gchar *trg_client_get_session_id(TrgClient * tc) { TrgClientPrivate *priv = tc->priv; return priv->session_id ? g_strdup(priv->session_id) : NULL; } void trg_client_set_session_id(TrgClient * tc, gchar * session_id) { TrgClientPrivate *priv = tc->priv; g_mutex_lock(&priv->configMutex); if (priv->session_id) g_free(priv->session_id); priv->session_id = session_id; g_mutex_unlock(&priv->configMutex); } void trg_client_status_change(TrgClient * tc, gboolean connected) { TrgClientPrivate *priv = tc->priv; if (!connected) { if (priv->session) { json_object_unref(priv->session); priv->session = NULL; } g_mutex_lock(&priv->configMutex); trg_prefs_set_connection(priv->prefs, NULL); g_mutex_unlock(&priv->configMutex); } } JsonObject *trg_client_get_session(TrgClient * tc) { return tc->priv->session; } void trg_client_thread_pool_push(TrgClient * tc, gpointer data, GError ** err) { g_thread_pool_push(tc->priv->pool, data, err); } void trg_client_inc_serial(TrgClient * tc) { TrgClientPrivate *priv = tc->priv; priv->updateSerial++; } gint64 trg_client_get_serial(TrgClient * tc) { return tc->priv->updateSerial; } #ifndef CURL_NO_SSL gboolean trg_client_get_ssl(TrgClient * tc) { return tc->priv->ssl; } gboolean trg_client_get_ssl_validate(TrgClient * tc) { return tc->priv->ssl_validate; } #endif gchar *trg_client_get_proxy(TrgClient * tc) { return tc->priv->proxy; } void trg_client_set_torrent_table(TrgClient * tc, GHashTable * table) { TrgClientPrivate *priv = tc->priv; priv->torrentTable = table; } GHashTable *trg_client_get_torrent_table(TrgClient * tc) { TrgClientPrivate *priv = tc->priv; return priv->torrentTable; } gboolean trg_client_is_connected(TrgClient * tc) { TrgClientPrivate *priv = tc->priv; return priv->session != NULL; } void trg_client_configlock(TrgClient * tc) { g_mutex_lock(&tc->priv->configMutex); } guint trg_client_get_failcount(TrgClient * tc) { return tc->priv->failCount; } guint trg_client_inc_failcount(TrgClient * tc) { TrgClientPrivate *priv = tc->priv; return ++(priv->failCount); } void trg_client_reset_failcount(TrgClient * tc) { tc->priv->failCount = 0; } void trg_client_configunlock(TrgClient * tc) { g_mutex_unlock(&tc->priv->configMutex); } /* formerly http.c */ void trg_response_free(trg_response * response) { if (response) { if (response->obj) json_object_unref(response->obj); if (response->raw) g_free(response->raw); g_free(response); } } static size_t http_receive_callback(void *ptr, size_t size, size_t nmemb, void *data) { size_t realsize = size * nmemb; trg_response *mem = (trg_response *) data; mem->raw = g_realloc(mem->raw, mem->size + realsize + 1); if (mem->raw) { memcpy(&(mem->raw[mem->size]), ptr, realsize); mem->size += realsize; mem->raw[mem->size] = 0; } return realsize; } static size_t header_callback(void *ptr, size_t size, size_t nmemb, void *data) { char *header = (char *) (ptr); TrgClient *tc = TRG_CLIENT(data); gchar *session_id; if (g_ascii_strncasecmp(header, X_TRANSMISSION_SESSION_ID_HEADER_PREFIX, strlen(X_TRANSMISSION_SESSION_ID_HEADER_PREFIX)) == 0) { char *nl; session_id = g_strdup(header); nl = strrchr(session_id, '\r'); if (nl) *nl = '\0'; trg_client_set_session_id(tc, session_id); } return (nmemb * size); } static trg_tls *trg_tls_new(TrgClient * tc) { trg_tls *tls = g_new0(trg_tls, 1); tls->curl = curl_easy_init(); tls->serial = -1; return tls; } static trg_tls *get_tls(TrgClient *tc) { TrgClientPrivate *priv = tc->priv; gpointer threadLocalStorage = g_private_get(&priv->tlsKey); trg_tls *tls; if (!threadLocalStorage) { tls = trg_tls_new(tc); g_private_set(&priv->tlsKey, tls); } else { tls = (trg_tls *) threadLocalStorage; } return tls; } static CURL* get_curl(TrgClient *tc, guint http_class) { TrgClientPrivate *priv = tc->priv; TrgPrefs *prefs = trg_client_get_prefs(tc); trg_tls *tls = get_tls(tc); CURL *curl = tls->curl; g_mutex_lock(&priv->configMutex); if (priv->configSerial > tls->serial || http_class != priv->http_class) { gchar *proxy; curl_easy_reset(curl); curl_easy_setopt(curl, CURLOPT_USERAGENT, PACKAGE_NAME); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &http_receive_callback); #ifdef DEBUG if (g_getenv("TRG_CURL_VERBOSE") != NULL) curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); #endif if (http_class == HTTP_CLASS_TRANSMISSION) { curl_easy_setopt(curl, CURLOPT_WRITEHEADER, (void *) tc); curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, &header_callback); curl_easy_setopt(curl, CURLOPT_PASSWORD, trg_client_get_password(tc)); curl_easy_setopt(curl, CURLOPT_USERNAME, trg_client_get_username(tc)); curl_easy_setopt(curl, CURLOPT_URL, trg_client_get_url(tc)); } #ifndef CURL_NO_SSL if (trg_client_get_ssl(tc) && !trg_client_get_ssl_validate(tc)) { curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); } #endif proxy = trg_client_get_proxy(tc); if (proxy) { curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_easy_setopt(curl, CURLOPT_PROXY, proxy); } tls->serial = priv->configSerial; priv->http_class = http_class; } if (http_class == HTTP_CLASS_TRANSMISSION) curl_easy_setopt(curl, CURLOPT_URL, trg_client_get_url(tc)); curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long) trg_prefs_get_int(prefs, TRG_PREFS_KEY_TIMEOUT, TRG_PREFS_CONNECTION)); g_mutex_unlock(&priv->configMutex); /* Headers are set on each use, then freed, so make sure invalid headers aren't still around. */ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, NULL); return curl; } static inline int trg_http_perform_inner(TrgClient * tc, trg_request * request, trg_response * response, gboolean recurse) { CURL* curl = get_curl(tc, HTTP_CLASS_TRANSMISSION); struct curl_slist *headers = NULL; gchar *session_id = NULL; long httpCode = 0; response->size = 0; response->raw = NULL; curl_easy_setopt(curl, CURLOPT_POSTFIELDS, request->body); curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *) response); session_id = trg_client_get_session_id(tc); if (session_id) headers = curl_slist_append(NULL, session_id); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); response->status = curl_easy_perform(curl); curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpCode); g_free(session_id); if (headers) curl_slist_free_all(headers); if (response->status == CURLE_OK) { if (httpCode == HTTP_CONFLICT && recurse == TRUE) return trg_http_perform_inner(tc, request, response, FALSE); else if (httpCode != HTTP_OK) response->status = (-httpCode) - 100; } return response->status; } int trg_http_perform(TrgClient * tc, trg_request *request, trg_response * rsp) { return trg_http_perform_inner(tc, request, rsp, TRUE); } static void trg_request_free(trg_request *req) { g_free(req->body); g_free(req->url); g_free(req->cookie); if (req->node) json_node_free(req->node); } /* formerly dispatch.c */ trg_response *dispatch(TrgClient * tc, trg_request *req) { trg_response *response = g_new0(trg_response, 1); GError *decode_error = NULL; JsonNode *result; if (req->node && !req->body) req->body = trg_serialize(req->node); #ifdef DEBUG if (g_getenv("TRG_SHOW_OUTGOING")) g_message("=>(OUTgoing)=>: %s", req->body); #endif trg_http_perform(tc, req, response); if (response->status == CURLE_OK) response->obj = trg_deserialize(response, &decode_error); g_free(response->raw); response->raw = NULL; if (response->status != CURLE_OK) return response; if (decode_error) { g_error("JSON decoding error: %s", decode_error->message); g_error_free(decode_error); response->status = FAIL_JSON_DECODE; return response; } result = json_object_get_member(response->obj, FIELD_RESULT); if (!result || g_strcmp0(json_node_get_string(result), FIELD_SUCCESS)) response->status = FAIL_RESPONSE_UNSUCCESSFUL; return response; } trg_response *dispatch_public_http(TrgClient *tc, trg_request *req) { trg_response *response = g_new0(trg_response, 1); CURL* curl = get_curl(tc, HTTP_CLASS_PUBLIC); struct curl_slist *headers = NULL; long httpCode = 0; gchar *cookie_header = NULL; response->size = 0; response->raw = NULL; curl_easy_setopt(curl, CURLOPT_URL, req->url); curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *) response); if (req->cookie) { cookie_header = g_strdup_printf("Cookie: %s", req->cookie); headers = curl_slist_append(NULL, cookie_header); } if (headers) curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); response->status = curl_easy_perform(curl); trg_request_free(req); g_free(cookie_header); if (headers) curl_slist_free_all(headers); //g_message(response->raw); curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpCode); if (response->status == CURLE_OK && httpCode != HTTP_OK) { response->status = (-httpCode) - 100; } return response; } static void dispatch_async_threadfunc(trg_request * req, TrgClient * tc) { TrgClientPrivate *priv = tc->priv; trg_response *rsp; if (req->url) rsp = dispatch_public_http(tc, req); else rsp = dispatch(tc, req); rsp->cb_data = req->cb_data; if (req->callback && req->connid == g_atomic_int_get(&priv->connid)) g_idle_add(req->callback, rsp); else trg_response_free(rsp); g_free(req); } static gboolean dispatch_async_common(TrgClient * tc, trg_request * trg_req, GSourceFunc callback, gpointer data) { TrgClientPrivate *priv = tc->priv; GError *error = NULL; trg_req->callback = callback; trg_req->cb_data = data; trg_req->connid = g_atomic_int_get(&priv->connid); trg_client_thread_pool_push(tc, trg_req, &error); if (error) { g_error("thread creation error: %s\n", error->message); g_error_free(error); g_free(trg_req); return FALSE; } else { return TRUE; } } gboolean dispatch_async(TrgClient * tc, JsonNode * req, GSourceFunc callback, gpointer data) { trg_request *trg_req = g_new0(trg_request, 1); trg_req->node = req; return dispatch_async_common(tc, trg_req, callback, data); } gboolean async_http_request(TrgClient *tc, gchar *url, const gchar *cookie, GSourceFunc callback, gpointer data) { trg_request *trg_req = g_new0(trg_request, 1); trg_req->url = g_strdup(url); if (cookie) trg_req->cookie = g_strdup(cookie); return dispatch_async_common(tc, trg_req, callback, data); } gboolean trg_client_update_session(TrgClient * tc, GSourceFunc callback, gpointer data) { return dispatch_async(tc, session_get(), callback, data); } gdouble trg_client_get_seed_ratio_limit(TrgClient * tc) { return tc->priv->seedRatioLimit; } gboolean trg_client_get_seed_ratio_limited(TrgClient * tc) { return tc->priv->seedRatioLimited; } transmission-remote-gtk-1.4.1/src/trg-client.h000066400000000000000000000132221341276053300213360ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* trg-client.h */ #ifndef _TRG_CLIENT_H_ #define _TRG_CLIENT_H_ #include #include #include #include #include "trg-prefs.h" #include "session-get.h" #define TRANSMISSION_MIN_SUPPORTED 2.0 #define X_TRANSMISSION_SESSION_ID_HEADER_PREFIX "X-Transmission-Session-Id: " #define TORRENT_GET_MODE_FIRST 0 #define TORRENT_GET_MODE_ACTIVE 1 #define TORRENT_GET_MODE_INTERACTION 2 #define TORRENT_GET_MODE_UPDATE 3 #define TORRENT_GET_TAG_MODE_FULL -1 #define TORRENT_GET_TAG_MODE_UPDATE -2 #define TRG_NO_HOSTNAME_SET -2 #define HTTP_URI_PREFIX "http" #define HTTPS_URI_PREFIX "https" #define HTTP_OK 200 #define HTTP_CONFLICT 409 #define FAIL_JSON_DECODE -2 #define FAIL_RESPONSE_UNSUCCESSFUL -3 #define DISPATCH_POOL_SIZE 3 #define HTTP_CLASS_TRANSMISSION 0 #define HTTP_CLASS_PUBLIC 1 typedef struct { int status; int size; char *raw; JsonObject *obj; gpointer cb_data; } trg_response; typedef struct { gint connid; JsonNode *node; gchar *body; gchar *url; GSourceFunc callback; gpointer cb_data; gchar *cookie; } trg_request; typedef struct _TrgClientPrivate TrgClientPrivate; G_BEGIN_DECLS #define TRG_TYPE_CLIENT trg_client_get_type() #define TRG_CLIENT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_CLIENT, TrgClient)) #define TRG_CLIENT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_CLIENT, TrgClientClass)) #define TRG_IS_CLIENT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_CLIENT)) #define TRG_IS_CLIENT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_CLIENT)) #define TRG_CLIENT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_CLIENT, TrgClientClass)) typedef struct { GObject parent; TrgClientPrivate *priv; } TrgClient; typedef struct { GObjectClass parent_class; void (*session_updated) (TrgClient * tc, JsonObject * session, gpointer data); } TrgClientClass; /* Thread local storage (TLS). * CURL clients can't be used concurrently. * So create one instance for each thread in the thread pool. */ typedef struct { /* Use a serial to figure out when there's been a configuration change * by comparing with priv->serial. * We lock updating (and checking for updates) with priv->configMutex */ int serial; guint client_class; CURL *curl; } trg_tls; /* stuff that used to be in http.h */ void trg_response_free(trg_response * response); int trg_http_perform(TrgClient * tc, trg_request *request, trg_response * rsp); /* end http.h*/ /* stuff that used to be in dispatch.c */ trg_response *dispatch(TrgClient * tc, trg_request *req); trg_response *dispatch_public_http(TrgClient *tc, trg_request *req); gboolean dispatch_async(TrgClient * client, JsonNode * req, GSourceFunc callback, gpointer data); gboolean async_http_request(TrgClient *tc, gchar *url, const gchar *cookie, GSourceFunc callback, gpointer data); /* end dispatch.c*/ GType trg_client_get_type(void); TrgClient *trg_client_new(void); TrgPrefs *trg_client_get_prefs(TrgClient * tc); int trg_client_populate_with_settings(TrgClient * tc); void trg_client_set_session(TrgClient * tc, JsonObject * session); gdouble trg_client_get_version(TrgClient * tc); const gchar *trg_client_get_version_string(TrgClient * tc); gint64 trg_client_get_rpc_version(TrgClient * tc); gchar *trg_client_get_password(TrgClient * tc); gchar *trg_client_get_username(TrgClient * tc); gchar *trg_client_get_url(TrgClient * tc); gchar *trg_client_get_session_id(TrgClient * tc); void trg_client_set_session_id(TrgClient * tc, gchar * session_id); #ifndef CURL_NO_SSL gboolean trg_client_get_ssl(TrgClient * tc); gboolean trg_client_get_ssl_validate(TrgClient * tc); #endif gchar *trg_client_get_proxy(TrgClient * tc); gint64 trg_client_get_serial(TrgClient * tc); void trg_client_thread_pool_push(TrgClient * tc, gpointer data, GError ** err); void trg_client_set_torrent_table(TrgClient * tc, GHashTable * table); GHashTable *trg_client_get_torrent_table(TrgClient * tc); JsonObject *trg_client_get_session(TrgClient * tc); void trg_client_status_change(TrgClient * tc, gboolean connected); gboolean trg_client_is_connected(TrgClient * tc); void trg_client_configunlock(TrgClient * tc); void trg_client_configlock(TrgClient * tc); guint trg_client_inc_failcount(TrgClient * tc); guint trg_client_get_failcount(TrgClient * tc); void trg_client_reset_failcount(TrgClient * tc); void trg_client_inc_serial(TrgClient * tc); void trg_client_inc_connid(TrgClient * tc); gboolean trg_client_update_session(TrgClient * tc, GSourceFunc callback, gpointer data); gboolean trg_client_get_seed_ratio_limited(TrgClient * tc); gdouble trg_client_get_seed_ratio_limit(TrgClient * tc); G_END_DECLS #endif /* _TRG_CLIENT_H_ */ transmission-remote-gtk-1.4.1/src/trg-destination-combo.c000066400000000000000000000320631341276053300234750ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-client.h" #include "torrent.h" #include "trg-torrent-model.h" #include "trg-destination-combo.h" #include "util.h" struct _TrgDestinationCombo { GtkComboBox parent_instance; }; typedef struct { TrgClient *client; gchar *last_selection; } TrgDestinationComboPrivate; G_DEFINE_TYPE_WITH_PRIVATE(TrgDestinationCombo, trg_destination_combo, GTK_TYPE_COMBO_BOX) enum { PROP_0, PROP_CLIENT, PROP_LAST_SELECTION }; enum { DEST_DEFAULT, DEST_LABEL, DEST_EXISTING }; enum { DEST_COLUMN_LABEL, DEST_COLUMN_DIR, DEST_COLUMN_TYPE, N_DEST_COLUMNS }; static void trg_destination_combo_finalize(GObject * object) { TrgDestinationComboPrivate *priv = trg_destination_combo_get_instance_private(TRG_DESTINATION_COMBO(object)); g_free(priv->last_selection); } static void trg_destination_combo_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgDestinationComboPrivate *priv = trg_destination_combo_get_instance_private(TRG_DESTINATION_COMBO(object)); switch (property_id) { case PROP_CLIENT: g_value_set_pointer(value, priv->client); break; case PROP_LAST_SELECTION: g_value_set_string(value, priv->last_selection); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_destination_combo_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgDestinationComboPrivate *priv = trg_destination_combo_get_instance_private(TRG_DESTINATION_COMBO(object)); switch (property_id) { case PROP_CLIENT: priv->client = g_value_get_pointer(value); break; case PROP_LAST_SELECTION: priv->last_selection = g_strdup(g_value_get_string(value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static gboolean g_slist_str_set_add(GSList ** list, const gchar * string) { GSList *li; for (li = *list; li; li = g_slist_next(li)) if (!g_strcmp0((gchar *) li->data, string)) return FALSE; *list = g_slist_insert_sorted(*list, (gpointer) string, (GCompareFunc) g_strcmp0); return TRUE; } void trg_destination_combo_save_selection(TrgDestinationCombo * combo_box) { TrgDestinationComboPrivate *priv = trg_destination_combo_get_instance_private(combo_box); GtkTreeIter iter; if (priv->last_selection && gtk_combo_box_get_active_iter(GTK_COMBO_BOX(combo_box), &iter)) { GtkTreeModel *model = gtk_combo_box_get_model(GTK_COMBO_BOX(combo_box)); TrgPrefs *prefs = trg_client_get_prefs(priv->client); gchar *text; gtk_tree_model_get(model, &iter, DEST_COLUMN_DIR, &text, -1); trg_prefs_set_string(prefs, priv->last_selection, text, TRG_PREFS_CONNECTION); g_free(text); } } static inline GtkEntry *trg_destination_combo_get_entry(TrgDestinationCombo * combo) { return GTK_ENTRY(gtk_bin_get_child(GTK_BIN(combo))); } gboolean trg_destination_combo_has_text(TrgDestinationCombo * combo) { const gchar *text = gtk_entry_get_text(trg_destination_combo_get_entry (TRG_DESTINATION_COMBO(combo))); return strlen(text) > 0; } struct findDupeArg { const gchar *dir; gboolean isDupe; }; static gboolean trg_destination_combo_insert_check_dupe_foreach(GtkTreeModel * model, GtkTreePath * path G_GNUC_UNUSED, GtkTreeIter * iter, struct findDupeArg *args) { gchar *existing; gtk_tree_model_get(model, iter, DEST_COLUMN_DIR, &existing, -1); args->isDupe = g_strcmp0(existing, args->dir) == 0; g_free(existing); return args->isDupe; } static void trg_destination_combo_insert(GtkComboBox * box, const gchar * label, const gchar * dir, guint type) { GtkTreeModel *model = gtk_combo_box_get_model(box); gchar *comboLabel; if (type == DEST_EXISTING) { struct findDupeArg args; args.isDupe = FALSE; args.dir = dir; gtk_tree_model_foreach(GTK_TREE_MODEL(model), (GtkTreeModelForeachFunc) trg_destination_combo_insert_check_dupe_foreach, &args); if (args.isDupe) return; } comboLabel = label ? g_strdup_printf("%s (%s)", label, dir) : g_strdup(dir); gtk_list_store_insert_with_values(GTK_LIST_STORE(model), NULL, -1, DEST_COLUMN_LABEL, comboLabel, DEST_COLUMN_DIR, dir, DEST_COLUMN_TYPE, type, -1); g_free(comboLabel); } gchar *trg_destination_combo_get_dir(TrgDestinationCombo * combo) { GtkTreeModel *model = gtk_combo_box_get_model(GTK_COMBO_BOX(combo)); GtkTreeIter iter; if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(combo), &iter)) { gchar *value; guint type; gtk_tree_model_get(model, &iter, DEST_COLUMN_TYPE, &type, -1); if (type == DEST_LABEL) { gtk_tree_model_get(model, &iter, DEST_COLUMN_DIR, &value, -1); return value; } } return g_strdup(gtk_entry_get_text (trg_destination_combo_get_entry(combo))); } static void load_directory_model(TrgDestinationCombo *self) { TrgDestinationComboPrivate *priv = trg_destination_combo_get_instance_private(self); TrgClient *client = priv->client; TrgPrefs *prefs = trg_client_get_prefs(client); GSList *dirs = NULL, *sli; GList *li, *list; JsonArray *savedDestinations; gchar *defaultDir; /* Add default dir */ defaultDir = g_strdup(session_get_download_dir(trg_client_get_session(client))); rm_trailing_slashes(defaultDir); trg_destination_combo_insert(GTK_COMBO_BOX(self), NULL, defaultDir, DEST_DEFAULT); g_free (defaultDir); /* Add saved dirs */ savedDestinations = trg_prefs_get_array(prefs, TRG_PREFS_KEY_DESTINATIONS, TRG_PREFS_CONNECTION); if (savedDestinations) { list = json_array_get_elements(savedDestinations); if (list) { for (li = list; li; li = g_list_next(li)) { JsonObject *obj = json_node_get_object((JsonNode *) li->data); trg_destination_combo_insert(GTK_COMBO_BOX(self), json_object_get_string_member (obj, TRG_PREFS_SUBKEY_LABEL), json_object_get_string_member (obj, TRG_PREFS_KEY_DESTINATIONS_SUBKEY_DIR), DEST_LABEL); } g_list_free(list); } } /* Add all previously used download dirs */ list = g_hash_table_get_values(trg_client_get_torrent_table(client)); for (li = list; li; li = g_list_next(li)) { GtkTreeRowReference *rr; GtkTreeModel *model; GtkTreePath *path; rr = (GtkTreeRowReference *) li->data; model = gtk_tree_row_reference_get_model(rr); path = gtk_tree_row_reference_get_path(rr); if (path) { GtkTreeIter iter; if (gtk_tree_model_get_iter(model, &iter, path)) { gchar *dd; gtk_tree_model_get(model, &iter, TORRENT_COLUMN_DOWNLOADDIR, &dd, -1); if (dd && g_strcmp0(dd, defaultDir)) g_slist_str_set_add(&dirs, dd); else g_free(dd); } gtk_tree_path_free(path); } } for (sli = dirs; sli; sli = g_slist_next(sli)) trg_destination_combo_insert(GTK_COMBO_BOX(self), NULL, (gchar *) sli->data, DEST_EXISTING); g_slist_free_full (dirs, g_free); g_list_free(list); } static void set_text_column(GtkCellLayout *layout, guint col) { GList *cells = gtk_cell_layout_get_cells (layout); g_assert (cells != NULL); gtk_cell_layout_set_attributes (layout, GTK_CELL_RENDERER(cells->data), "text", col, NULL); g_list_free (cells); } static void trg_destination_combo_constructed(GObject *object) { TrgDestinationCombo *self = TRG_DESTINATION_COMBO (object); TrgDestinationComboPrivate *priv = trg_destination_combo_get_instance_private(self); TrgPrefs *prefs = trg_client_get_prefs(priv->client); G_OBJECT_CLASS(trg_destination_combo_parent_class)->constructed(object); load_directory_model (self); set_text_column (GTK_CELL_LAYOUT(self), DEST_COLUMN_LABEL); /* Must be set after constructed */ if (priv->last_selection) { /* Restore any previous selection */ char *lastDestination = trg_prefs_get_string(prefs, priv->last_selection, TRG_PREFS_CONNECTION); if (!gtk_combo_box_set_active_id (GTK_COMBO_BOX(object), lastDestination)) g_warning ("Last selection was not a valid ID"); g_free(lastDestination); } else { /* DefaultDir is the first item otherwise */ gtk_combo_box_set_active (GTK_COMBO_BOX(object), 0); } } static void trg_destination_combo_class_init(TrgDestinationComboClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_destination_combo_get_property; object_class->set_property = trg_destination_combo_set_property; object_class->finalize = trg_destination_combo_finalize; object_class->constructed = trg_destination_combo_constructed; g_object_class_install_property(object_class, PROP_CLIENT, g_param_spec_pointer("trg-client", "TClient", "Client", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property(object_class, PROP_LAST_SELECTION, g_param_spec_string ("last-selection-key", "LastSelectionKey", "LastSelectionKey", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); } static void trg_destination_combo_init(TrgDestinationCombo * self) { GtkListStore *store; store = gtk_list_store_new(N_DEST_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT); gtk_combo_box_set_model(GTK_COMBO_BOX(self), GTK_TREE_MODEL(store)); gtk_combo_box_set_id_column (GTK_COMBO_BOX(self), DEST_COLUMN_DIR); gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX(self), DEST_COLUMN_LABEL); g_object_unref(store); } GtkWidget *trg_destination_combo_new(TrgClient * client, const gchar * lastSelectionKey) { return GTK_WIDGET(g_object_new(TRG_TYPE_DESTINATION_COMBO, "has-entry", TRUE, "trg-client", client, "last-selection-key", lastSelectionKey, NULL)); } transmission-remote-gtk-1.4.1/src/trg-destination-combo.h000066400000000000000000000030371341276053300235010ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_DESTINATION_COMBO_H_ #define TRG_DESTINATION_COMBO_H_ #include #include #include "trg-client.h" G_BEGIN_DECLS #define TRG_TYPE_DESTINATION_COMBO (trg_destination_combo_get_type()) G_DECLARE_FINAL_TYPE(TrgDestinationCombo, trg_destination_combo, TRG, DESTINATION_COMBO, GtkComboBox) GtkWidget *trg_destination_combo_new(TrgClient * client, const gchar * lastSelectionKey); gchar *trg_destination_combo_get_dir(TrgDestinationCombo * combo); gboolean trg_destination_combo_has_text(TrgDestinationCombo * combo); void trg_destination_combo_save_selection(TrgDestinationCombo * combo_box); G_END_DECLS #endif /* TRG_DESTINATION_COMBO_H_ */ transmission-remote-gtk-1.4.1/src/trg-file-parser.c000066400000000000000000000142701341276053300222700ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "bencode.h" #include "trg-file-parser.h" static trg_files_tree_node *trg_file_parser_node_insert(trg_files_tree_node * top, trg_files_tree_node * last, be_node * file_node, gint index) { be_node *file_length_node = be_dict_find(file_node, "length", BE_INT); be_node *file_path_list = be_dict_find(file_node, "path", BE_LIST); trg_files_tree_node *lastIter = last; GList *parentList = NULL; be_node *path_el_node; GList *li; int i; if (!file_path_list || !file_length_node) return NULL; if (lastIter) while ((lastIter = lastIter->parent)) parentList = g_list_prepend(parentList, lastIter); li = parentList; lastIter = top; /* Iterate over the path list which contains each file/directory * component of the path in order. */ for (i = 0; (path_el_node = file_path_list->val.l[i]); i++) { gboolean isFile = !file_path_list->val.l[i + 1]; trg_files_tree_node *target_node = NULL; if (li && !isFile) { trg_files_tree_node *lastPathNode = (trg_files_tree_node *) li->data; if (!g_strcmp0(lastPathNode->name, path_el_node->val.s)) { target_node = lastPathNode; li = g_list_next(li); } else { li = NULL; } } if (!target_node && lastIter && lastIter->childrenHash && !isFile) target_node = g_hash_table_lookup(lastIter->childrenHash, path_el_node->val.s); if (!target_node) { target_node = g_new0(trg_files_tree_node, 1); target_node->name = g_strdup(path_el_node->val.s); target_node->parent = lastIter; trg_files_tree_node_add_child(lastIter, target_node); } if (isFile) { target_node->length = (gint64) file_length_node->val.i; while (lastIter) { lastIter->length += target_node->length; lastIter = lastIter->parent; } } target_node->index = isFile ? index : -1; lastIter = target_node; } g_list_free(parentList); return lastIter; } void trg_torrent_file_free(trg_torrent_file * t) { trg_files_tree_node_free(t->top_node); g_free(t->name); g_free(t); } static trg_files_tree_node *trg_parse_torrent_file_nodes(be_node * info_node) { be_node *files_node = be_dict_find(info_node, "files", BE_LIST); trg_files_tree_node *top_node = g_new0(trg_files_tree_node, 1); trg_files_tree_node *lastNode = NULL; int i; /* Probably means single file mode. */ if (!files_node) return NULL; for (i = 0; files_node->val.l[i]; ++i) { be_node *file_node = files_node->val.l[i]; if (!be_validate_node(file_node, BE_DICT) || !(lastNode = trg_file_parser_node_insert(top_node, lastNode, file_node, i))) { /* Unexpected format. Throw away everything, file indexes need to * be correct. */ trg_files_tree_node_free(top_node); return NULL; } } return top_node; } trg_torrent_file *trg_parse_torrent_data(const gchar *data, gsize length) { trg_torrent_file *ret = NULL; be_node *top_node, *info_node, *name_node; top_node = be_decoden(data, length); if (!top_node) { return NULL; } else if (!be_validate_node(top_node, BE_DICT)) { goto out; } info_node = be_dict_find(top_node, "info", BE_DICT); if (!info_node) goto out; name_node = be_dict_find(info_node, "name", BE_STR); if (!name_node) goto out; ret = g_new0(trg_torrent_file, 1); ret->name = g_strdup(name_node->val.s); ret->top_node = trg_parse_torrent_file_nodes(info_node); if (!ret->top_node) { trg_files_tree_node *file_node; be_node *length_node = be_dict_find(info_node, "length", BE_INT); if (!length_node) { g_free(ret); ret = NULL; goto out; } file_node = g_new0(trg_files_tree_node, 1); file_node->length = (gint64) (length_node->val.i); file_node->name = g_strdup(ret->name); ret->top_node = file_node; } out: be_free(top_node); return ret; } trg_torrent_file *trg_parse_torrent_file(const gchar * filename) { GError *error = NULL; trg_torrent_file *ret = NULL; GMappedFile *mf; if (!g_file_test(filename, G_FILE_TEST_IS_REGULAR)) { g_message("%s does not exist", filename); return NULL; } mf = g_mapped_file_new(filename, FALSE, &error); if (error) { g_error("%s", error->message); g_error_free(error); g_mapped_file_unref(mf); return NULL; } else { ret = trg_parse_torrent_data(g_mapped_file_get_contents(mf), g_mapped_file_get_length(mf)); } g_mapped_file_unref(mf); return ret; } transmission-remote-gtk-1.4.1/src/trg-file-parser.h000066400000000000000000000021551341276053300222740ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "trg-files-tree.h" typedef struct { char *name; trg_files_tree_node *top_node; } trg_torrent_file; void trg_torrent_file_free(trg_torrent_file * t); trg_torrent_file *trg_parse_torrent_file(const gchar * filename); trg_torrent_file *trg_parse_torrent_data(const gchar *data, gsize length); transmission-remote-gtk-1.4.1/src/trg-files-model-common.c000066400000000000000000000137361341276053300235530ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "protocol-constants.h" #include "trg-files-model-common.h" struct SubtreeForeachData { gint column; gint new_value; GtkTreePath *path; }; static void set_wanted_foreachfunc(GtkTreeModel * model, GtkTreePath * path G_GNUC_UNUSED, GtkTreeIter * iter, gpointer data) { struct SubtreeForeachData *args = (struct SubtreeForeachData *) data; gtk_tree_store_set(GTK_TREE_STORE(model), iter, args->column, args->new_value, -1); trg_files_tree_model_set_subtree(model, path, iter, args->column, args->new_value); } static void set_priority_foreachfunc(GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data) { struct SubtreeForeachData *args = (struct SubtreeForeachData *) data; GValue value = { 0 }; g_value_init(&value, G_TYPE_INT); g_value_set_int(&value, args->new_value); gtk_tree_store_set_value(GTK_TREE_STORE(model), iter, args->column, &value); trg_files_tree_model_set_subtree(model, path, iter, args->column, args->new_value); } void trg_files_model_set_wanted(GtkTreeView * tv, gint column, gint new_value) { struct SubtreeForeachData args; GtkTreeSelection *selection = gtk_tree_view_get_selection(tv); args.column = column; args.new_value = new_value; gtk_tree_selection_selected_foreach(selection, set_wanted_foreachfunc, &args); } void trg_files_tree_model_set_priority(GtkTreeView * tv, gint column, gint new_value) { struct SubtreeForeachData args; GtkTreeSelection *selection = gtk_tree_view_get_selection(tv); args.column = column; args.new_value = new_value; gtk_tree_selection_selected_foreach(selection, set_priority_foreachfunc, &args); } static gboolean setSubtreeForeach(GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer gdata) { struct SubtreeForeachData *data = gdata; if (!gtk_tree_path_compare(path, data->path) || gtk_tree_path_is_descendant(path, data->path)) { GValue value = { 0 }; g_value_init(&value, G_TYPE_INT); g_value_set_int(&value, data->new_value); gtk_tree_store_set_value(GTK_TREE_STORE(model), iter, data->column, &value); } return FALSE; /* keep walking */ } void trg_files_tree_model_propogate_change_up(GtkTreeModel * model, GtkTreeIter * iter, gint column, gint new_value) { GtkTreeIter back_iter = *iter; gint result = new_value; while (1) { GtkTreeIter tmp_iter; gint n_children, i; if (!gtk_tree_model_iter_parent(model, &tmp_iter, &back_iter)) break; n_children = gtk_tree_model_iter_n_children(model, &tmp_iter); for (i = 0; i < n_children; i++) { GtkTreeIter child; gint current_value; if (!gtk_tree_model_iter_nth_child (model, &child, &tmp_iter, i)) continue; gtk_tree_model_get(model, &child, column, ¤t_value, -1); if (current_value != new_value) { result = TR_PRI_MIXED; break; } } gtk_tree_store_set(GTK_TREE_STORE(model), &tmp_iter, column, result, -1); back_iter = tmp_iter; } } void trg_files_tree_model_set_subtree(GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gint column, gint new_value) { GtkTreeIter back_iter = *iter; if (gtk_tree_model_iter_has_child(model, iter)) { struct SubtreeForeachData tmp; tmp.column = column; tmp.new_value = new_value; tmp.path = path; gtk_tree_model_foreach(model, setSubtreeForeach, &tmp); } else { gtk_tree_store_set(GTK_TREE_STORE(model), &back_iter, column, new_value, -1); } trg_files_tree_model_propogate_change_up(model, iter, column, new_value); } void trg_files_model_update_parents(GtkTreeModel * model, GtkTreeIter * iter, gint size_column) { GtkTreeIter back_iter = *iter; GtkTreeIter tmp_iter; gint64 size, oldSize; if (!gtk_tree_model_iter_parent(model, &tmp_iter, &back_iter)) return; gtk_tree_model_get(model, iter, size_column, &size, -1); do { gtk_tree_model_get(model, &tmp_iter, size_column, &oldSize, -1); gtk_tree_store_set(GTK_TREE_STORE(model), &tmp_iter, size_column, size + oldSize, -1); back_iter = tmp_iter; } while (gtk_tree_model_iter_parent(model, &tmp_iter, &back_iter)); } transmission-remote-gtk-1.4.1/src/trg-files-model-common.h000066400000000000000000000040041341276053300235440ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_FILES_TREE_MODEL_COMMON_H_ #define TRG_FILES_TREE_MODEL_COMMON_H_ void trg_files_tree_model_propogate_change_up(GtkTreeModel * model, GtkTreeIter * iter, gint column, gint new_value); void trg_files_tree_model_set_subtree(GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gint column, gint new_value); void trg_files_tree_model_set_priority(GtkTreeView * tv, gint column, gint new_value); void trg_files_model_set_wanted(GtkTreeView * tv, gint column, gint new_value); gboolean trg_files_model_update_parent_size(GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data); void trg_files_model_update_parents(GtkTreeModel * model, GtkTreeIter * iter, gint size_column); #endif /* TRG_FILES_TREE_MODEL_COMMON_H_ */ transmission-remote-gtk-1.4.1/src/trg-files-model.c000066400000000000000000000363551341276053300222670ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "protocol-constants.h" #include "trg-files-model-common.h" #include "trg-files-tree-view-common.h" #include "trg-files-tree.h" #include "trg-files-model.h" #include "trg-client.h" #include "torrent.h" #include "util.h" #include "trg-files-model.h" G_DEFINE_TYPE(TrgFilesModel, trg_files_model, GTK_TYPE_TREE_STORE) #define TRG_FILES_MODEL_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_FILES_MODEL, TrgFilesModelPrivate)) typedef struct _TrgFilesModelPrivate TrgFilesModelPrivate; struct _TrgFilesModelPrivate { gint64 torrentId; guint n_items; gboolean accept; }; /* Push a given increment to a treemodel node and its parents. * Used for updating bytescompleted. * This is only used for user interaction, the initial population is done * in a simple tree before for performance. * */ static void trg_files_update_parent_progress(GtkTreeModel * model, GtkTreeIter * iter, gint64 increment) { GtkTreeIter back_iter = *iter; if (increment < 1) return; while (1) { GtkTreeIter tmp_iter; gint64 lastCompleted, newCompleted, length; if (!gtk_tree_model_iter_parent(model, &tmp_iter, &back_iter)) break; gtk_tree_model_get(model, &tmp_iter, FILESCOL_BYTESCOMPLETED, &lastCompleted, FILESCOL_SIZE, &length, -1); newCompleted = lastCompleted + increment; gtk_tree_store_set(GTK_TREE_STORE(model), &tmp_iter, FILESCOL_PROGRESS, file_get_progress(length, newCompleted), FILESCOL_BYTESCOMPLETED, newCompleted, -1); back_iter = tmp_iter; } } /* Update the bytesCompleted and size for a nodes parents, and also figure out * if a priority/enabled change requires updating the parents (needs to iterate * over the other nodes at its level). * * It's faster doing it in here than when it's in the model. */ static void trg_files_tree_update_ancestors(trg_files_tree_node * node) { trg_files_tree_node *back_iter = node; gint pri_result = node->priority; gint enabled_result = node->enabled; while ((back_iter = back_iter->parent)) { GList *li; for (li = back_iter->children; li; li = g_list_next(li)) { trg_files_tree_node *back_node = (trg_files_tree_node *) li->data; gint common_result = 0; if (back_node->priority != pri_result) common_result = pri_result = TR_PRI_MIXED; if (back_node->enabled != enabled_result) common_result = enabled_result = TR_PRI_MIXED; if (common_result == TR_PRI_MIXED) break; } back_iter->bytesCompleted += node->bytesCompleted; back_iter->length += node->length; back_iter->priority = pri_result; back_iter->enabled = enabled_result; } } static void store_add_node(GtkTreeStore * store, GtkTreeIter * parent, trg_files_tree_node * node) { GtkTreeIter child; GList *li; if (node->name) { gdouble progress = file_get_progress(node->length, node->bytesCompleted); gtk_tree_store_insert_with_values(store, &child, parent, INT_MAX, FILESCOL_WANTED, node->enabled, FILESCOL_PROGRESS, progress, FILESCOL_SIZE, node->length, FILESCOL_ID, node->index, FILESCOL_PRIORITY, node->priority, FILESCOL_NAME, node->name, -1); } for (li = node->children; li; li = g_list_next(li)) store_add_node(store, node->name ? &child : NULL, (trg_files_tree_node *) li->data); } static trg_files_tree_node *trg_file_parser_node_insert(trg_files_tree_node * top, trg_files_tree_node * last, JsonObject * file, gint index, JsonArray * enabled, JsonArray * priorities) { gchar **path = g_strsplit(file_get_name(file), "/", -1); trg_files_tree_node *lastIter = last; GList *parentList = NULL; gchar *path_el; GList *li; int i; /* Build up a list of pointers to each parent trg_files_tree_node * reversing the order as it iterates over its parent. */ if (lastIter) while ((lastIter = lastIter->parent)) parentList = g_list_prepend(parentList, lastIter); li = parentList; lastIter = top; /* Iterate over the path list which contains each file/directory * component of the path in order. */ for (i = 0; (path_el = path[i]); i++) { gboolean isFile = !path[i + 1]; trg_files_tree_node *target_node = NULL; /* No point checking for files. If there is a last parents iterator * check it for a shortcut. I'm assuming that these come in order of * directory at least to give performance a boost. */ if (li && !isFile) { trg_files_tree_node *lastPathNode = (trg_files_tree_node *) li->data; if (!g_strcmp0(lastPathNode->name, path[i])) { target_node = lastPathNode; li = g_list_next(li); } else { /* No need to check any further. */ li = NULL; } } if (!target_node && lastIter && lastIter->childrenHash && !isFile) target_node = g_hash_table_lookup(lastIter->childrenHash, path_el); /* Node needs creating */ if (!target_node) { target_node = g_new0(trg_files_tree_node, 1); target_node->name = g_strdup(path[i]); target_node->parent = lastIter; trg_files_tree_node_add_child(lastIter, target_node); } lastIter = target_node; /* Files have more properties set here than for files. * Directories are updated from here too, by trg_files_tree_update_ancestors * working up the parents. */ if (isFile) { target_node->length = file_get_length(file); target_node->bytesCompleted = file_get_bytes_completed(file); target_node->index = index; target_node->enabled = (gint) json_array_get_int_element(enabled, index); target_node->priority = (gint) json_array_get_int_element(priorities, index); trg_files_tree_update_ancestors(target_node); } else { target_node->index = -1; } } g_list_free(parentList); g_strfreev(path); return lastIter; } void trg_files_model_set_accept(TrgFilesModel * model, gboolean accept) { TrgFilesModelPrivate *priv = TRG_FILES_MODEL_GET_PRIVATE(model); priv->accept = accept; } static void trg_files_model_iter_update(TrgFilesModel * model, GtkTreeIter * filesIter, JsonObject * file, JsonArray * wantedArray, JsonArray * prioritiesArray, gint id) { TrgFilesModelPrivate *priv = TRG_FILES_MODEL_GET_PRIVATE(model); gint64 fileLength = file_get_length(file); gint64 fileCompleted = file_get_bytes_completed(file); gint64 lastCompleted; gint wanted = (gint) json_array_get_int_element(wantedArray, id); gint priority = (gint) json_array_get_int_element(prioritiesArray, id); gdouble progress = file_get_progress(fileLength, fileCompleted); gtk_tree_model_get(GTK_TREE_MODEL(model), filesIter, FILESCOL_BYTESCOMPLETED, &lastCompleted, -1); gtk_tree_store_set(GTK_TREE_STORE(model), filesIter, FILESCOL_PROGRESS, progress, FILESCOL_BYTESCOMPLETED, fileCompleted, -1); trg_files_update_parent_progress(GTK_TREE_MODEL(model), filesIter, fileCompleted - lastCompleted); if (priv->accept) gtk_tree_store_set(GTK_TREE_STORE(model), filesIter, FILESCOL_WANTED, wanted, FILESCOL_PRIORITY, priority, -1); } static void trg_files_model_class_init(TrgFilesModelClass * klass) { g_type_class_add_private(klass, sizeof(TrgFilesModelPrivate)); } static void trg_files_model_init(TrgFilesModel * self) { TrgFilesModelPrivate *priv = TRG_FILES_MODEL_GET_PRIVATE(self); GType column_types[FILESCOL_COLUMNS]; priv->accept = TRUE; column_types[FILESCOL_NAME] = G_TYPE_STRING; column_types[FILESCOL_SIZE] = G_TYPE_INT64; column_types[FILESCOL_PROGRESS] = G_TYPE_DOUBLE; column_types[FILESCOL_ID] = G_TYPE_INT; column_types[FILESCOL_WANTED] = G_TYPE_INT; column_types[FILESCOL_PRIORITY] = G_TYPE_INT; column_types[FILESCOL_BYTESCOMPLETED] = G_TYPE_INT64; gtk_tree_store_set_column_types(GTK_TREE_STORE(self), FILESCOL_COLUMNS, column_types); } struct MinorUpdateData { GList *filesList; JsonArray *priorities; JsonArray *wanted; }; static gboolean trg_files_model_update_foreach(GtkListStore * model, GtkTreePath * path G_GNUC_UNUSED, GtkTreeIter * iter, gpointer data) { struct MinorUpdateData *mud = (struct MinorUpdateData *) data; JsonObject *file; gint id; gtk_tree_model_get(GTK_TREE_MODEL(model), iter, FILESCOL_ID, &id, -1); if (id >= 0) { file = json_node_get_object(g_list_nth_data(mud->filesList, id)); trg_files_model_iter_update(TRG_FILES_MODEL(model), iter, file, mud->wanted, mud->priorities, id); } return FALSE; } struct FirstUpdateThreadData { TrgFilesModel *model; GtkTreeView *tree_view; JsonArray *files; JsonArray *priorities; JsonArray *wanted; guint n_items; trg_files_tree_node *top_node; gint64 torrent_id; GList *filesList; gboolean idle_add; }; static gboolean trg_files_model_applytree_idlefunc(gpointer data) { struct FirstUpdateThreadData *args = (struct FirstUpdateThreadData *) data; TrgFilesModelPrivate *priv = TRG_FILES_MODEL_GET_PRIVATE(args->model); if (args->torrent_id == priv->torrentId) { store_add_node(GTK_TREE_STORE(args->model), NULL, args->top_node); gtk_tree_view_expand_all(args->tree_view); priv->n_items = args->n_items; priv->accept = TRUE; } trg_files_tree_node_free(args->top_node); g_free(data); return FALSE; } static gpointer trg_files_model_buildtree_threadfunc(gpointer data) { struct FirstUpdateThreadData *args = (struct FirstUpdateThreadData *) data; trg_files_tree_node *lastNode = NULL; GList *li; args->top_node = g_new0(trg_files_tree_node, 1); for (li = args->filesList; li; li = g_list_next(li)) { JsonObject *file = json_node_get_object((JsonNode *) li->data); lastNode = trg_file_parser_node_insert(args->top_node, lastNode, file, args->n_items++, args->wanted, args->priorities); } g_list_free(args->filesList); json_array_unref(args->files); if (args->idle_add) g_idle_add(trg_files_model_applytree_idlefunc, data); return NULL; } void trg_files_model_update(TrgFilesModel * model, GtkTreeView * tv, gint64 updateSerial, JsonObject * t, gint mode) { TrgFilesModelPrivate *priv = TRG_FILES_MODEL_GET_PRIVATE(model); JsonArray *files = torrent_get_files(t); GList *filesList = json_array_get_elements(files); guint filesListLength = g_list_length(filesList); JsonArray *priorities = torrent_get_priorities(t); JsonArray *wanted = torrent_get_wanted(t); priv->torrentId = torrent_get_id(t); /* It's quicker to build this up with simple data structures before * putting it into GTK models. */ if (mode == TORRENT_GET_MODE_FIRST || priv->n_items != filesListLength) { struct FirstUpdateThreadData *futd = g_new0(struct FirstUpdateThreadData, 1); gtk_tree_store_clear(GTK_TREE_STORE(model)); json_array_ref(files); futd->tree_view = tv; futd->files = files; futd->priorities = priorities; futd->wanted = wanted; futd->filesList = filesList; futd->torrent_id = priv->torrentId; futd->model = model; futd->idle_add = filesListLength > TRG_FILES_MODEL_CREATE_THREAD_IF_GT; /* If this update has more than a given number of files, build up the * simple tree in a thread, then g_idle_add a function which * adds the contents of this prebuilt tree. * * If less than or equal to, I don't think it's worth spawning threads * for. Just do it in the main loop. */ if (futd->idle_add) { g_thread_create(trg_files_model_buildtree_threadfunc, futd, FALSE, NULL); } else { trg_files_model_buildtree_threadfunc(futd); trg_files_model_applytree_idlefunc(futd); } } else { struct MinorUpdateData mud; mud.priorities = priorities; mud.wanted = wanted; mud.filesList = filesList; gtk_tree_model_foreach(GTK_TREE_MODEL(model), (GtkTreeModelForeachFunc) trg_files_model_update_foreach, &mud); g_list_free(filesList); } } gint64 trg_files_model_get_torrent_id(TrgFilesModel * model) { TrgFilesModelPrivate *priv = TRG_FILES_MODEL_GET_PRIVATE(model); return priv->torrentId; } TrgFilesModel *trg_files_model_new(void) { return g_object_new(TRG_TYPE_FILES_MODEL, NULL); } transmission-remote-gtk-1.4.1/src/trg-files-model.h000066400000000000000000000045511341276053300222650ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_FILES_MODEL_H_ #define TRG_FILES_MODEL_H_ #include #include #include "trg-model.h" G_BEGIN_DECLS #define TRG_TYPE_FILES_MODEL trg_files_model_get_type() #define TRG_FILES_MODEL(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_FILES_MODEL, TrgFilesModel)) #define TRG_FILES_MODEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_FILES_MODEL, TrgFilesModelClass)) #define TRG_IS_FILES_MODEL(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_FILES_MODEL)) #define TRG_IS_FILES_MODEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_FILES_MODEL)) #define TRG_FILES_MODEL_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_FILES_MODEL, TrgFilesModelClass)) typedef struct { GtkTreeStore parent; } TrgFilesModel; typedef struct { GtkTreeStoreClass parent_class; } TrgFilesModelClass; GType trg_files_model_get_type(void); TrgFilesModel *trg_files_model_new(void); G_END_DECLS enum { FILESCOL_NAME, FILESCOL_SIZE, FILESCOL_PROGRESS, FILESCOL_ID, FILESCOL_WANTED, FILESCOL_PRIORITY, FILESCOL_BYTESCOMPLETED, FILESCOL_COLUMNS }; #define TRG_FILES_MODEL_CREATE_THREAD_IF_GT 600 void trg_files_model_update(TrgFilesModel * model, GtkTreeView * tv, gint64 updateSerial, JsonObject * t, gint mode); gint64 trg_files_model_get_torrent_id(TrgFilesModel * model); void trg_files_model_set_accept(TrgFilesModel * model, gboolean accept); #endif /* TRG_FILES_MODEL_H_ */ transmission-remote-gtk-1.4.1/src/trg-files-tree-view-common.c000066400000000000000000000173641341276053300243630ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "protocol-constants.h" #include "trg-files-model-common.h" #include "trg-files-tree-view-common.h" static void expand_all_cb(GtkWidget * w, gpointer data) { gtk_tree_view_expand_all(GTK_TREE_VIEW(data)); } static void collapse_all_cb(GtkWidget * w, gpointer data) { gtk_tree_view_collapse_all(GTK_TREE_VIEW(data)); } static void view_popup_menu(GtkWidget * treeview, GdkEventButton * event, GCallback low_cb, GCallback normal_cb, GCallback high_cb, GCallback wanted_cb, GCallback unwanted_cb, gpointer data G_GNUC_UNUSED) { GtkWidget *menu, *menuitem; menu = gtk_menu_new(); menuitem = gtk_menu_item_new_with_label(_("High Priority")); g_signal_connect(menuitem, "activate", high_cb, treeview); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); menuitem = gtk_menu_item_new_with_label(_("Normal Priority")); g_signal_connect(menuitem, "activate", normal_cb, treeview); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); menuitem = gtk_menu_item_new_with_label(_("Low Priority")); g_signal_connect(menuitem, "activate", low_cb, treeview); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_separator_menu_item_new()); menuitem = gtk_menu_item_new_with_label(_("Download")); g_signal_connect(menuitem, "activate", wanted_cb, treeview); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); menuitem = gtk_menu_item_new_with_label(_("Skip")); g_signal_connect(menuitem, "activate", unwanted_cb, treeview); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_separator_menu_item_new()); menuitem = gtk_menu_item_new_with_label(_("Expand All")); g_signal_connect(menuitem, "activate", G_CALLBACK(expand_all_cb), treeview); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); menuitem = gtk_menu_item_new_with_label(_("Collapse All")); g_signal_connect(menuitem, "activate", G_CALLBACK(collapse_all_cb), treeview); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, (event != NULL) ? event->button : 0, gdk_event_get_time((GdkEvent *) event)); } gboolean trg_files_tree_view_viewOnPopupMenu(GtkWidget * treeview, GCallback low_cb, GCallback normal_cb, GCallback high_cb, GCallback wanted_cb, GCallback unwanted_cb, gpointer userdata) { view_popup_menu(treeview, NULL, low_cb, normal_cb, high_cb, wanted_cb, unwanted_cb, userdata); return TRUE; } static gboolean onViewPathToggled(GtkTreeView * view, GtkTreeViewColumn * col, GtkTreePath * path, gint pri_id, gint enabled_id, gpointer data) { int cid; gboolean handled = FALSE; if (!col || !path) return FALSE; cid = gtk_tree_view_column_get_sort_column_id(col); if ((cid == pri_id) || (cid == enabled_id)) { GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model(view); gtk_tree_model_get_iter(model, &iter, path); if (cid == pri_id) { int priority; gtk_tree_model_get(model, &iter, pri_id, &priority, -1); switch (priority) { case TR_PRI_NORMAL: priority = TR_PRI_HIGH; break; case TR_PRI_HIGH: priority = TR_PRI_LOW; break; default: priority = TR_PRI_NORMAL; break; } trg_files_tree_model_set_subtree(model, path, &iter, pri_id, priority); } else if (cid == enabled_id) { int enabled; gtk_tree_model_get(model, &iter, enabled_id, &enabled, -1); enabled = !enabled; trg_files_tree_model_set_subtree(model, path, &iter, enabled_id, enabled); } handled = TRUE; } return handled; } static gboolean getAndSelectEventPath(GtkTreeView * treeview, GdkEventButton * event, GtkTreeViewColumn ** col, GtkTreePath ** path) { GtkTreeSelection *sel; if (gtk_tree_view_get_path_at_pos (treeview, event->x, event->y, path, col, NULL, NULL)) { sel = gtk_tree_view_get_selection(treeview); if (!gtk_tree_selection_path_is_selected(sel, *path)) { gtk_tree_selection_unselect_all(sel); gtk_tree_selection_select_path(sel, *path); } return TRUE; } return FALSE; } gboolean trg_files_tree_view_onViewButtonPressed(GtkWidget * w, GdkEventButton * event, gint pri_id, gint enabled_id, GCallback low_cb, GCallback normal_cb, GCallback high_cb, GCallback wanted_cb, GCallback unwanted_cb, gpointer gdata) { GtkTreeViewColumn *col = NULL; GtkTreePath *path = NULL; GtkTreeSelection *selection; gboolean handled = FALSE; GtkTreeView *treeview = GTK_TREE_VIEW(w); if (event->type == GDK_BUTTON_PRESS && event->button == 1 && !(event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) && getAndSelectEventPath(treeview, event, &col, &path)) { handled = onViewPathToggled(treeview, col, path, pri_id, enabled_id, NULL); } else if (event->type == GDK_BUTTON_PRESS && event->button == 3) { selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), (gint) event->x, (gint) event->y, &path, NULL, NULL, NULL)) { if (!gtk_tree_selection_path_is_selected(selection, path)) { gtk_tree_selection_unselect_all(selection); gtk_tree_selection_select_path(selection, path); } view_popup_menu(w, event, low_cb, normal_cb, high_cb, wanted_cb, unwanted_cb, gdata); handled = TRUE; } } gtk_tree_path_free(path); return handled; } transmission-remote-gtk-1.4.1/src/trg-files-tree-view-common.h000066400000000000000000000040741341276053300243620ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_FILES_TREE_VIEW_COMMON_H_ #define TRG_FILES_TREE_VIEW_COMMON_H_ gboolean trg_files_tree_view_onViewButtonPressed(GtkWidget * w, GdkEventButton * event, gint pri_id, gint enabled_id, GCallback low_cb, GCallback normal_cb, GCallback high_cb, GCallback wanted_cb, GCallback unwanted_cb, gpointer gdata); gboolean trg_files_tree_view_viewOnPopupMenu(GtkWidget * treeview, GCallback low_cb, GCallback normal_cb, GCallback high_cb, GCallback wanted_cb, GCallback unwanted_cb, gpointer userdata); #endif /* TRG_FILES_TREE_VIEW_COMMON_H_ */ transmission-remote-gtk-1.4.1/src/trg-files-tree-view.c000066400000000000000000000211231341276053300230610ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-client.h" #include "trg-tree-view.h" #include "trg-files-model-common.h" #include "trg-files-tree-view-common.h" #include "trg-files-tree-view.h" #include "trg-files-model.h" #include "trg-main-window.h" #include "requests.h" #include "util.h" #include "json.h" #include "protocol-constants.h" G_DEFINE_TYPE(TrgFilesTreeView, trg_files_tree_view, TRG_TYPE_TREE_VIEW) #define TRG_FILES_TREE_VIEW_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_FILES_TREE_VIEW, TrgFilesTreeViewPrivate)) typedef struct _TrgFilesTreeViewPrivate TrgFilesTreeViewPrivate; struct _TrgFilesTreeViewPrivate { TrgClient *client; TrgMainWindow *win; }; static void trg_files_tree_view_class_init(TrgFilesTreeViewClass * klass) { g_type_class_add_private(klass, sizeof(TrgFilesTreeViewPrivate)); } static gboolean send_updated_file_prefs_foreachfunc(GtkTreeModel * model, GtkTreePath * path G_GNUC_UNUSED, GtkTreeIter * iter, gpointer data) { JsonObject *args = (JsonObject *) data; gint priority; gint id; gint wanted; gtk_tree_model_get(model, iter, FILESCOL_ID, &id, -1); if (id < 0) return FALSE; gtk_tree_model_get(model, iter, FILESCOL_WANTED, &wanted, FILESCOL_PRIORITY, &priority, -1); if (wanted) add_file_id_to_array(args, FIELD_FILES_WANTED, id); else add_file_id_to_array(args, FIELD_FILES_UNWANTED, id); if (priority == TR_PRI_LOW) add_file_id_to_array(args, FIELD_FILES_PRIORITY_LOW, id); else if (priority == TR_PRI_HIGH) add_file_id_to_array(args, FIELD_FILES_PRIORITY_HIGH, id); else add_file_id_to_array(args, FIELD_FILES_PRIORITY_NORMAL, id); return FALSE; } static gboolean on_files_update(gpointer data) { trg_response *response = (trg_response *) data; TrgFilesTreeViewPrivate *priv = TRG_FILES_TREE_VIEW_GET_PRIVATE(response->cb_data); GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(response->cb_data)); trg_files_model_set_accept(TRG_FILES_MODEL(model), TRUE); response->cb_data = priv->win; return on_generic_interactive_action_response(data); } static void send_updated_file_prefs(TrgFilesTreeView * tv) { TrgFilesTreeViewPrivate *priv = TRG_FILES_TREE_VIEW_GET_PRIVATE(tv); JsonNode *req; JsonObject *args; GtkTreeModel *model; gint64 targetId; JsonArray *targetIdArray; model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); targetId = trg_files_model_get_torrent_id(TRG_FILES_MODEL(model)); targetIdArray = json_array_new(); json_array_add_int_element(targetIdArray, targetId); req = torrent_set(targetIdArray); args = node_get_arguments(req); gtk_tree_model_foreach(model, send_updated_file_prefs_foreachfunc, args); trg_files_model_set_accept(TRG_FILES_MODEL(model), FALSE); dispatch_async(priv->client, req, on_files_update, tv); } static void set_low(GtkWidget * w G_GNUC_UNUSED, gpointer data) { trg_files_tree_model_set_priority(GTK_TREE_VIEW(data), FILESCOL_PRIORITY, TR_PRI_LOW); send_updated_file_prefs(TRG_FILES_TREE_VIEW(data)); } static void set_normal(GtkWidget * w G_GNUC_UNUSED, gpointer data) { trg_files_tree_model_set_priority(GTK_TREE_VIEW(data), FILESCOL_PRIORITY, TR_PRI_NORMAL); send_updated_file_prefs(TRG_FILES_TREE_VIEW(data)); } static void set_high(GtkWidget * w G_GNUC_UNUSED, gpointer data) { trg_files_tree_model_set_priority(GTK_TREE_VIEW(data), FILESCOL_PRIORITY, TR_PRI_HIGH); send_updated_file_prefs(TRG_FILES_TREE_VIEW(data)); } static void set_unwanted(GtkWidget * w G_GNUC_UNUSED, gpointer data) { trg_files_model_set_wanted(GTK_TREE_VIEW(data), FILESCOL_WANTED, FALSE); send_updated_file_prefs(TRG_FILES_TREE_VIEW(data)); } static void set_wanted(GtkWidget * w G_GNUC_UNUSED, gpointer data) { trg_files_model_set_wanted(GTK_TREE_VIEW(data), FILESCOL_WANTED, TRUE); send_updated_file_prefs(TRG_FILES_TREE_VIEW(data)); } static gboolean view_onButtonPressed(GtkWidget * treeview, GdkEventButton * event, gpointer userdata) { gboolean handled = trg_files_tree_view_onViewButtonPressed(treeview, event, -1, FILESCOL_WANTED, G_CALLBACK(set_low), G_CALLBACK(set_normal), G_CALLBACK(set_high), G_CALLBACK(set_wanted), G_CALLBACK(set_unwanted), userdata); if (handled) send_updated_file_prefs(TRG_FILES_TREE_VIEW(treeview)); return handled; } static gboolean search_func (GtkTreeModel *model, gint column, const gchar *key, GtkTreeIter *iter, gpointer search_data) { gchar *iter_string = NULL; gchar *lowercase = NULL; gboolean result = TRUE; gtk_tree_model_get(model, iter, column, &iter_string, -1); if (iter_string != NULL) { lowercase = g_utf8_strdown(iter_string, -1); result = g_strrstr(lowercase, key) == NULL; } g_free(lowercase); g_free(iter_string); return result; } static void trg_files_tree_view_init(TrgFilesTreeView * self) { TrgTreeView *ttv = TRG_TREE_VIEW(self); trg_column_description *desc; desc = trg_tree_view_reg_column(ttv, TRG_COLTYPE_FILEICONTEXT, FILESCOL_NAME, _("Name"), "name", 0); desc->model_column_extra = FILESCOL_ID; trg_tree_view_reg_column(ttv, TRG_COLTYPE_SIZE, FILESCOL_SIZE, _("Size"), "size", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_PROG, FILESCOL_PROGRESS, _("Progress"), "progress", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_WANTED, FILESCOL_WANTED, _("Download"), "wanted", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_PRIO, FILESCOL_PRIORITY, _("Priority"), "priority", 0); gtk_tree_view_set_search_column(GTK_TREE_VIEW(self), FILESCOL_NAME); gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(self), (GtkTreeViewSearchEqualFunc) search_func, gtk_tree_view_get_model(GTK_TREE_VIEW(self)), NULL); g_signal_connect(self, "button-press-event", G_CALLBACK(view_onButtonPressed), NULL); g_signal_connect(self, "popup-menu", G_CALLBACK(trg_files_tree_view_viewOnPopupMenu), NULL); } TrgFilesTreeView *trg_files_tree_view_new(TrgFilesModel * model, TrgMainWindow * win, TrgClient * client, const gchar * configId) { GObject *obj = g_object_new(TRG_TYPE_FILES_TREE_VIEW, "config-id", configId, "prefs", trg_client_get_prefs(client), NULL); TrgFilesTreeViewPrivate *priv = TRG_FILES_TREE_VIEW_GET_PRIVATE(obj); gtk_tree_view_set_model(GTK_TREE_VIEW(obj), GTK_TREE_MODEL(model)); priv->client = client; priv->win = win; trg_tree_view_setup_columns(TRG_TREE_VIEW(obj)); return TRG_FILES_TREE_VIEW(obj); } transmission-remote-gtk-1.4.1/src/trg-files-tree-view.h000066400000000000000000000056311341276053300230740ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_FILES_TREE_VIEW_H_ #define TRG_FILES_TREE_VIEW_H_ #include #include "trg-main-window.h" #include "trg-client.h" #include "trg-files-model.h" G_BEGIN_DECLS #define TRG_TYPE_FILES_TREE_VIEW trg_files_tree_view_get_type() #define TRG_FILES_TREE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_FILES_TREE_VIEW, TrgFilesTreeView)) #define TRG_FILES_TREE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_FILES_TREE_VIEW, TrgFilesTreeViewClass)) #define TRG_IS_FILES_TREE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_FILES_TREE_VIEW)) #define TRG_IS_FILES_TREE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_FILES_TREE_VIEW)) #define TRG_FILES_TREE_VIEW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_FILES_TREE_VIEW, TrgFilesTreeViewClass)) typedef struct { TrgTreeView parent; } TrgFilesTreeView; typedef struct { TrgTreeViewClass parent_class; } TrgFilesTreeViewClass; enum { NOT_SET = 1000, MIXED = 1001 }; GType trg_files_tree_view_get_type(void); TrgFilesTreeView *trg_files_tree_view_new(TrgFilesModel * model, TrgMainWindow * win, TrgClient * client, const gchar * configId); void trg_files_tree_view_renderPriority(GtkTreeViewColumn * column G_GNUC_UNUSED, GtkCellRenderer * renderer, GtkTreeModel * model, GtkTreeIter * iter, gpointer data G_GNUC_UNUSED); void trg_files_tree_view_renderDownload(GtkTreeViewColumn * column G_GNUC_UNUSED, GtkCellRenderer * renderer, GtkTreeModel * model, GtkTreeIter * iter, gpointer data G_GNUC_UNUSED); G_END_DECLS #endif /* TRG_FILES_TREE_VIEW_H_ */ transmission-remote-gtk-1.4.1/src/trg-files-tree.c000066400000000000000000000033041341276053300221120ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* This is the stuff common between both files trees, built up before * populating the model. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "trg-files-tree.h" void trg_files_tree_node_add_child(trg_files_tree_node* node, trg_files_tree_node* child) { if (!node->childrenHash) { node->childrenHash = g_hash_table_new(g_str_hash, g_str_equal); } g_hash_table_insert(node->childrenHash, child->name, child); node->children = g_list_append(node->children, child); } void trg_files_tree_node_free(trg_files_tree_node * node) { GList *li; for (li = node->children; li; li = g_list_next(li)) trg_files_tree_node_free((trg_files_tree_node *) li->data); if (node->childrenHash) g_hash_table_destroy(node->childrenHash); g_list_free(node->children); g_free(node->name); g_free(node); } transmission-remote-gtk-1.4.1/src/trg-files-tree.h000066400000000000000000000025631341276053300221250ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_FILES_TREE_H_ #define TRG_FILES_TREE_H_ #include #include #include "trg-files-tree.h" typedef struct { gchar *name; gint64 length; gint64 bytesCompleted; GList *children; GHashTable *childrenHash; gint index; gpointer parent; gint priority; gint enabled; } trg_files_tree_node; void trg_files_tree_node_add_child(trg_files_tree_node* node, trg_files_tree_node* child); void trg_files_tree_node_free(trg_files_tree_node * node); #endif /* TRG_FILES_MODEL_H_ */ transmission-remote-gtk-1.4.1/src/trg-general-panel.c000066400000000000000000000331371341276053300225740ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "trg-client.h" #include "torrent.h" #include "util.h" #include "trg-general-panel.h" #include "trg-torrent-model.h" #include "protocol-constants.h" #define TRG_GENERAL_PANEL_WIDTH_FROM_KEY 20 #define TRG_GENERAL_PANEL_WIDTH_FROM_VALUE 60 #define TRG_GENERAL_PANEL_SPACING_X 4 #define TRG_GENERAL_PANEL_SPACING_Y 2 #define TRG_GENERAL_PANEL_COLUMNS 3 #define TRG_GENERAL_PANEL_COLUMNS_TOTAL (TRG_GENERAL_PANEL_COLUMNS*2) static void gtk_label_clear(GtkLabel * l); static GtkLabel *gen_panel_label_get_key_label(GtkLabel * l); static GtkLabel *trg_general_panel_add_label(TrgGeneralPanel * gp, char *key, guint col, guint row); G_DEFINE_TYPE(TrgGeneralPanel, trg_general_panel, GTK_TYPE_TABLE) #define TRG_GENERAL_PANEL_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_GENERAL_PANEL, TrgGeneralPanelPrivate)) typedef struct _TrgGeneralPanelPrivate TrgGeneralPanelPrivate; struct _TrgGeneralPanelPrivate { GtkLabel *gen_name_label; GtkLabel *gen_size_label; GtkLabel *gen_completed_label; GtkLabel *gen_seeders_label; GtkLabel *gen_leechers_label; GtkLabel *gen_status_label; GtkLabel *gen_priority_label; GtkLabel *gen_eta_label; GtkLabel *gen_downloaded_label; GtkLabel *gen_uploaded_label; GtkLabel *gen_corrupted_label; GtkLabel *gen_down_rate_label; GtkLabel *gen_up_rate_label; GtkLabel *gen_ratio_label; GtkLabel *gen_limit_label; GtkLabel *gen_completedat_label; GtkLabel *gen_downloaddir_label; GtkLabel *gen_comment_label; GtkLabel *gen_error_label; GtkTreeModel *model; TrgClient *tc; }; void trg_general_panel_clear(TrgGeneralPanel * panel) { TrgGeneralPanelPrivate *priv = TRG_GENERAL_PANEL_GET_PRIVATE(panel); gtk_label_clear(priv->gen_name_label); gtk_label_clear(priv->gen_size_label); gtk_label_clear(priv->gen_completed_label); gtk_label_clear(priv->gen_seeders_label); gtk_label_clear(priv->gen_leechers_label); gtk_label_clear(priv->gen_status_label); gtk_label_clear(priv->gen_priority_label); gtk_label_clear(priv->gen_eta_label); gtk_label_clear(priv->gen_downloaded_label); gtk_label_clear(priv->gen_uploaded_label); gtk_label_clear(priv->gen_corrupted_label); gtk_label_clear(priv->gen_down_rate_label); gtk_label_clear(priv->gen_up_rate_label); gtk_label_clear(priv->gen_ratio_label); gtk_label_clear(priv->gen_limit_label); gtk_label_clear(priv->gen_completedat_label); gtk_label_clear(priv->gen_downloaddir_label); gtk_label_clear(priv->gen_comment_label); gtk_label_clear(priv->gen_error_label); gtk_label_clear(gen_panel_label_get_key_label (GTK_LABEL(priv->gen_error_label))); } static void gtk_label_clear(GtkLabel * l) { gtk_label_set_text(l, ""); } static GtkLabel *gen_panel_label_get_key_label(GtkLabel * l) { return GTK_LABEL(g_object_get_data(G_OBJECT(l), "key-label")); } static void trg_general_panel_class_init(TrgGeneralPanelClass * klass) { g_type_class_add_private(klass, sizeof(TrgGeneralPanelPrivate)); } void trg_general_panel_update(TrgGeneralPanel * panel, JsonObject * t, GtkTreeIter * iter) { TrgGeneralPanelPrivate *priv; gchar buf[32], buf1[32]; //TODO: do it better gchar *statusString, *fullStatusString, *completedAtString, *speed, *comment, *markup; const gchar *errorStr; gint64 eta, uploaded, corrupted, haveValid, completedAt; GtkLabel *keyLabel; gint64 seeders = 0, leechers = 0; priv = TRG_GENERAL_PANEL_GET_PRIVATE(panel); gtk_tree_model_get(GTK_TREE_MODEL(priv->model), iter, TORRENT_COLUMN_SEEDS, &seeders, TORRENT_COLUMN_LEECHERS, &leechers, TORRENT_COLUMN_STATUS, &statusString, -1); trg_strlsize(buf, torrent_get_size_when_done(t)); gtk_label_set_text(GTK_LABEL(priv->gen_size_label), buf); trg_strlspeed(buf, torrent_get_rate_down(t) / disk_K); if (torrent_get_download_limited(t)){ trg_strlspeed(buf1, torrent_get_download_limit(t)); speed = g_strdup_printf("%s [%s]", buf, buf1); } else speed = g_strdup_printf("%s", buf); gtk_label_set_text(GTK_LABEL(priv->gen_down_rate_label), speed); g_free(speed); trg_strlspeed(buf, torrent_get_rate_up(t) / disk_K); if (torrent_get_upload_limited(t)){ trg_strlspeed(buf1, torrent_get_upload_limit(t)); speed = g_strdup_printf("%s [%s]", buf, buf1); } else speed = g_strdup_printf("%s", buf); gtk_label_set_text(GTK_LABEL(priv->gen_up_rate_label), speed); g_free(speed); corrupted = torrent_get_corrupted(t); trg_strlsize(buf, corrupted); gtk_label_set_text(GTK_LABEL(priv->gen_corrupted_label), buf); uploaded = torrent_get_uploaded(t); trg_strlsize(buf, uploaded); gtk_label_set_text(GTK_LABEL(priv->gen_uploaded_label), buf); haveValid = torrent_get_have_valid(t); trg_strlsize(buf, torrent_get_downloaded(t)); gtk_label_set_text(GTK_LABEL(priv->gen_downloaded_label), buf); if (uploaded > 0 && haveValid > 0) { trg_strlratio(buf, (double) uploaded / (double) haveValid); gtk_label_set_text(GTK_LABEL(priv->gen_ratio_label), buf); } else { gtk_label_set_text(GTK_LABEL(priv->gen_ratio_label), _("N/A")); } trg_strlratio(buf, torrent_get_seed_ratio_limit(t)); gtk_label_set_text(GTK_LABEL(priv->gen_limit_label), buf); completedAt = torrent_get_done_date(t); if (completedAt > 0) { completedAtString = epoch_to_string(completedAt); gtk_label_set_text(GTK_LABEL(priv->gen_completedat_label), completedAtString); g_free(completedAtString); } else { gtk_label_set_text(GTK_LABEL(priv->gen_completedat_label), ""); } fullStatusString = g_strdup_printf("%s %s", statusString, torrent_get_is_private(t) ? _("(Private)") : _("(Public)")); gtk_label_set_text(GTK_LABEL(priv->gen_status_label), fullStatusString); g_free(fullStatusString); g_free(statusString); switch(torrent_get_bandwidth_priority(t)){ case TR_PRI_LOW: gtk_label_set_text(GTK_LABEL(priv->gen_priority_label), _("Low")); break; case TR_PRI_NORMAL: gtk_label_set_text(GTK_LABEL(priv->gen_priority_label), _("Normal")); break; case TR_PRI_HIGH: gtk_label_set_text(GTK_LABEL(priv->gen_priority_label), _("High")); break; } trg_strlpercent(buf, torrent_get_percent_done(t)); gtk_label_set_text(GTK_LABEL(priv->gen_completed_label), buf); gtk_label_set_text(GTK_LABEL(priv->gen_name_label), torrent_get_name(t)); gtk_label_set_text(GTK_LABEL(priv->gen_downloaddir_label), torrent_get_download_dir(t)); comment = add_links_to_text(torrent_get_comment(t)); gtk_label_set_markup(GTK_LABEL(priv->gen_comment_label), comment); g_free(comment); errorStr = torrent_get_errorstr(t); keyLabel = gen_panel_label_get_key_label(GTK_LABEL(priv->gen_error_label)); if (strlen(errorStr) > 0) { markup = g_markup_printf_escaped("%s", errorStr); gtk_label_set_markup(GTK_LABEL(priv->gen_error_label), markup); g_free(markup); markup = g_markup_printf_escaped ("%s", _("Error")); gtk_label_set_markup(keyLabel, markup); g_free(markup); } else { gtk_label_clear(GTK_LABEL(priv->gen_error_label)); gtk_label_clear(keyLabel); } if ((eta = torrent_get_eta(t)) > 0) { tr_strltime_long(buf, eta, sizeof(buf)); gtk_label_set_text(GTK_LABEL(priv->gen_eta_label), buf); } else { gtk_label_set_text(GTK_LABEL(priv->gen_eta_label), _("N/A")); } g_snprintf(buf, sizeof(buf), "%" G_GINT64_FORMAT, seeders >= 0 ? seeders : 0); gtk_label_set_text(GTK_LABEL(priv->gen_seeders_label), buf); g_snprintf(buf, sizeof(buf), "%" G_GINT64_FORMAT, leechers >= 0 ? leechers : 0); gtk_label_set_text(GTK_LABEL(priv->gen_leechers_label), buf); } static GtkLabel *trg_general_panel_add_label_with_width(TrgGeneralPanel * gp, char *key, guint col, guint row, gint width) { GtkWidget *value, *keyLabel, *alignment; int startCol = col * 2; alignment = gtk_alignment_new(0, 0, 0, 0); keyLabel = gtk_label_new(NULL); if (strlen(key) > 0) { gchar *keyMarkup = g_markup_printf_escaped(strlen(key) > 0 ? "%s:" : "", key); gtk_label_set_markup(GTK_LABEL(keyLabel), keyMarkup); g_free(keyMarkup); } gtk_container_add(GTK_CONTAINER(alignment), keyLabel); gtk_table_attach(GTK_TABLE(gp), alignment, startCol, startCol + 1, row, row + 1, GTK_FILL, 0, TRG_GENERAL_PANEL_SPACING_X, TRG_GENERAL_PANEL_SPACING_Y); alignment = gtk_alignment_new(0, 0, 0, 0); value = gtk_label_new(NULL); g_object_set_data(G_OBJECT(value), "key-label", keyLabel); gtk_label_set_selectable(GTK_LABEL(value), TRUE); gtk_container_add(GTK_CONTAINER(alignment), value); gtk_table_attach(GTK_TABLE(gp), alignment, startCol + 1, width < 0 ? TRG_GENERAL_PANEL_COLUMNS_TOTAL - 1 : startCol + 1 + width, row, row + 1, GTK_FILL | GTK_SHRINK, 0, TRG_GENERAL_PANEL_SPACING_X, TRG_GENERAL_PANEL_SPACING_Y); return GTK_LABEL(value); } static GtkLabel *trg_general_panel_add_label(TrgGeneralPanel * gp, char *key, guint col, guint row) { return trg_general_panel_add_label_with_width(gp, key, col, row, 1); } static void trg_general_panel_init(TrgGeneralPanel * self) { TrgGeneralPanelPrivate *priv = TRG_GENERAL_PANEL_GET_PRIVATE(self); int i; g_object_set(G_OBJECT(self), "n-columns", TRG_GENERAL_PANEL_COLUMNS_TOTAL, "n-rows", 7, NULL); priv->gen_name_label = trg_general_panel_add_label_with_width(self, _("Name"), 0, 0, -1); priv->gen_size_label = trg_general_panel_add_label(self, _("Size"), 0, 1); priv->gen_down_rate_label = trg_general_panel_add_label(self, _("Rate Down"), 1, 1); priv->gen_completed_label = trg_general_panel_add_label(self, _("Completed"), 2, 1); priv->gen_eta_label = trg_general_panel_add_label(self, _("ETA"), 0, 2); priv->gen_up_rate_label = trg_general_panel_add_label(self, _("Rate Up"), 1, 2); priv->gen_downloaded_label = trg_general_panel_add_label(self, _("Downloaded"), 2, 2); priv->gen_seeders_label = trg_general_panel_add_label(self, _("Seeders"), 0, 3); priv->gen_ratio_label = trg_general_panel_add_label(self, _("Ratio"), 1, 3); priv->gen_uploaded_label = trg_general_panel_add_label(self, _("Uploaded"), 2, 3); priv->gen_leechers_label = trg_general_panel_add_label(self, _("Leechers"), 0, 4); priv->gen_limit_label = trg_general_panel_add_label(self, _("Ratio limit"), 1, 4); priv->gen_corrupted_label = trg_general_panel_add_label(self, _("Corrupted"), 2, 4); priv->gen_status_label = trg_general_panel_add_label(self, _("Status"), 0, 5); priv->gen_priority_label = trg_general_panel_add_label(self, _("Priority"), 1, 5); priv->gen_completedat_label = trg_general_panel_add_label(self, _("Completed At"), 2, 5); priv->gen_downloaddir_label = trg_general_panel_add_label_with_width(self, _("Location"), 0, 6, -1); priv->gen_comment_label = trg_general_panel_add_label(self, _("Comment"), 0, 7); priv->gen_error_label = trg_general_panel_add_label_with_width(self, "", 0, 8, -1); for (i = 0; i < TRG_GENERAL_PANEL_COLUMNS_TOTAL; i++) gtk_table_set_col_spacing(GTK_TABLE(self), i, i % 2 == 0 ? TRG_GENERAL_PANEL_WIDTH_FROM_KEY : TRG_GENERAL_PANEL_WIDTH_FROM_VALUE); gtk_widget_set_sensitive(GTK_WIDGET(self), FALSE); } TrgGeneralPanel *trg_general_panel_new(GtkTreeModel * model, TrgClient * tc) { GObject *obj; TrgGeneralPanelPrivate *priv; obj = g_object_new(TRG_TYPE_GENERAL_PANEL, NULL); priv = TRG_GENERAL_PANEL_GET_PRIVATE(obj); priv->model = model; priv->tc = tc; return TRG_GENERAL_PANEL(obj); } transmission-remote-gtk-1.4.1/src/trg-general-panel.h000066400000000000000000000042401341276053300225720ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_GENERAL_PANEL_H_ #define TRG_GENERAL_PANEL_H_ #include #include #include #include "trg-client.h" #include "trg-torrent-model.h" G_BEGIN_DECLS #define TRG_TYPE_GENERAL_PANEL trg_general_panel_get_type() #define TRG_GENERAL_PANEL(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_GENERAL_PANEL, TrgGeneralPanel)) #define TRG_GENERAL_PANEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_GENERAL_PANEL, TrgGeneralPanelClass)) #define TRG_IS_GENERAL_PANEL(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_GENERAL_PANEL)) #define TRG_IS_GENERAL_PANEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_GENERAL_PANEL)) #define TRG_GENERAL_PANEL_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_GENERAL_PANEL, TrgGeneralPanelClass)) typedef struct { GtkTable parent; } TrgGeneralPanel; typedef struct { GtkTableClass parent_class; } TrgGeneralPanelClass; GType trg_general_panel_get_type(void); TrgGeneralPanel *trg_general_panel_new(GtkTreeModel * model, TrgClient * tc); G_END_DECLS void trg_general_panel_update(TrgGeneralPanel * panel, JsonObject * t, GtkTreeIter * iter); void trg_general_panel_clear(TrgGeneralPanel * panel); #endif /* TRG_GENERAL_PANEL_H_ */ transmission-remote-gtk-1.4.1/src/trg-gtk-app.c000066400000000000000000000152501341276053300214210ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-main-window.h" #include "trg-gtk-app.h" #include "util.h" enum { PROP_0, PROP_CLIENT, PROP_MINIMISE_ON_START, N_PROPS, }; struct _TrgGtkApp { GtkApplication parent; }; typedef struct { TrgClient *client; gboolean min_start; } TrgGtkAppPrivate; G_DEFINE_TYPE_WITH_PRIVATE(TrgGtkApp, trg_gtk_app, GTK_TYPE_APPLICATION) static void trg_gtk_app_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgGtkAppPrivate *priv = trg_gtk_app_get_instance_private (TRG_GTK_APP(object)); switch (property_id) { case PROP_CLIENT: g_value_set_pointer(value, priv->client); break; case PROP_MINIMISE_ON_START: g_value_set_boolean(value, priv->min_start); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_gtk_app_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgGtkAppPrivate *priv = trg_gtk_app_get_instance_private (TRG_GTK_APP(object)); switch (property_id) { case PROP_CLIENT: priv->client = g_value_get_pointer(value); break; case PROP_MINIMISE_ON_START: priv->min_start = g_value_get_boolean(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_gtk_app_startup(GApplication * app, gpointer userdata) { TrgGtkAppPrivate *priv = trg_gtk_app_get_instance_private (TRG_GTK_APP(app)); TrgMainWindow *window = trg_main_window_new(priv->client, priv->min_start); gtk_window_set_application(GTK_WINDOW(window), GTK_APPLICATION(app)); } static int trg_gtk_app_command_line(GApplication * application, GApplicationCommandLine * cmdline) { GList *windows = gtk_application_get_windows(GTK_APPLICATION(application)); TrgMainWindow *window; gchar **argv; if (!windows || !windows->data) return 1; window = TRG_MAIN_WINDOW(windows->data); argv = g_application_command_line_get_arguments(cmdline, NULL); if (g_application_command_line_get_is_remote(cmdline)) { if (!argv[0]) { gtk_window_present(GTK_WINDOW(window)); g_strfreev(argv); } else { return trg_add_from_filename(window, argv); } } else { trg_main_window_set_start_args(window, argv); auto_connect_if_required(TRG_MAIN_WINDOW(windows->data)); } return 0; } static void shift_args(gchar ** argv, int i) { gint j; g_free(argv[i]); for (j = i; argv[j]; j++) argv[j] = argv[j + 1]; } static gboolean test_local_cmdline(GApplication * application, gchar *** arguments, gint * exit_status) { TrgGtkAppPrivate *priv = trg_gtk_app_get_instance_private (TRG_GTK_APP(application)); gchar **argv; gchar *cwd = g_get_current_dir(); gchar *tmp; gint i; argv = *arguments; shift_args(argv, 0); i = 0; while (argv[i]) { if (is_minimised_arg(argv[i])) { shift_args(argv, i); priv->min_start = TRUE; } else if (!is_url(argv[i]) && !is_magnet(argv[i]) && g_file_test(argv[i], G_FILE_TEST_IS_REGULAR) && !g_path_is_absolute(argv[i])) { tmp = g_build_path(G_DIR_SEPARATOR_S, cwd, argv[i], NULL); g_free(argv[i]); argv[i] = tmp; } i++; } *exit_status = 0; g_free(cwd); return FALSE; } static void trg_gtk_app_class_init(TrgGtkAppClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); GApplicationClass *app_class = G_APPLICATION_CLASS(klass); object_class->get_property = trg_gtk_app_get_property; object_class->set_property = trg_gtk_app_set_property; app_class->local_command_line = test_local_cmdline; //app_class->startup = trg_gtk_app_startup; app_class->command_line = trg_gtk_app_command_line; g_object_class_install_property(object_class, PROP_CLIENT, g_param_spec_pointer("trg-client", "TClient", _("Client"), G_PARAM_READWRITE| G_PARAM_CONSTRUCT_ONLY| G_PARAM_STATIC_STRINGS)); g_object_class_install_property(object_class, PROP_MINIMISE_ON_START, g_param_spec_boolean("min-on-start", "Min On Start", _("Min On Start"), FALSE, G_PARAM_READWRITE| G_PARAM_CONSTRUCT_ONLY| G_PARAM_STATIC_STRINGS)); } static void trg_gtk_app_init(TrgGtkApp * self) { g_application_set_inactivity_timeout(G_APPLICATION(self), 10000); g_signal_connect(self, "command-line", G_CALLBACK(trg_gtk_app_command_line), NULL); g_signal_connect(self, "startup", G_CALLBACK(trg_gtk_app_startup), NULL); } TrgGtkApp *trg_gtk_app_new(TrgClient * client) { return g_object_new(TRG_TYPE_GTK_APP, "application-id", "io.github.TransmissionRemoteGtk", "flags", G_APPLICATION_HANDLES_COMMAND_LINE, "trg-client", client, NULL); } transmission-remote-gtk-1.4.1/src/trg-gtk-app.h000066400000000000000000000021001341276053300214140ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once #include #include "trg-client.h" G_BEGIN_DECLS #define TRG_TYPE_GTK_APP (trg_gtk_app_get_type()) G_DECLARE_FINAL_TYPE (TrgGtkApp, trg_gtk_app, TRG, GTK_APP, GtkApplication) TrgGtkApp *trg_gtk_app_new (TrgClient *client); G_END_DECLS transmission-remote-gtk-1.4.1/src/trg-icons.c000066400000000000000000000040221341276053300211640ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "trg-icons.h" #include "icon-turtle.h" typedef struct { const guint8 *raw; const char *name; } BuiltinIconInfo; static const BuiltinIconInfo my_fallback_icons[] = { {blue_turtle, "alt-speed-on"}, {grey_turtle, "alt-speed-off"} }; void register_my_icons(GtkIconTheme * theme) { int i; const int n = G_N_ELEMENTS(my_fallback_icons); GtkIconFactory *factory = gtk_icon_factory_new(); gtk_icon_factory_add_default(factory); for (i = 0; i < n; ++i) { const char *name = my_fallback_icons[i].name; if (!gtk_icon_theme_has_icon(theme, name)) { int width; GdkPixbuf *p; GtkIconSet *icon_set; p = gdk_pixbuf_new_from_inline(-1, my_fallback_icons[i].raw, FALSE, NULL); width = gdk_pixbuf_get_width(p); icon_set = gtk_icon_set_new_from_pixbuf(p); gtk_icon_theme_add_builtin_icon(name, width, p); gtk_icon_factory_add(factory, name, icon_set); g_object_unref(p); gtk_icon_set_unref(icon_set); } } g_object_unref(G_OBJECT(factory)); } transmission-remote-gtk-1.4.1/src/trg-icons.h000066400000000000000000000017051341276053300211760ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_ICONS_H_ #define TRG_ICONS_H_ void register_my_icons(GtkIconTheme * theme); #endif /* TRG_ICONS_H_ */ transmission-remote-gtk-1.4.1/src/trg-json-widgets.c000066400000000000000000000161751341276053300225020ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-json-widgets.h" #include "json.h" #include "util.h" /* Functions for creating widgets that load/save their state from/to a JSON * object. This is used by the torrent properties and remote settings dialogs. * The pattern here is farily similar to that used in local configuration, * the widget creation functions take a list as an argument, which gets a * trg_json_widget_desc appended to it. This contains the key, and the function * pointers for load/save. */ void trg_json_widgets_save(GList * list, JsonObject * out) { GList *li; for (li = list; li; li = g_list_next(li)) { trg_json_widget_desc *wd = (trg_json_widget_desc *) li->data; wd->saveFunc(wd->widget, out, wd->key); } } void trg_json_widget_desc_free(trg_json_widget_desc * wd) { g_free(wd->key); g_free(wd); } void trg_json_widget_desc_list_free(GList * list) { GList *li; for (li = list; li; li = g_list_next(li)) trg_json_widget_desc_free((trg_json_widget_desc *) li->data); g_list_free(list); } void toggle_active_arg_is_sensitive(GtkToggleButton * b, gpointer data) { gtk_widget_set_sensitive(GTK_WIDGET(data), gtk_toggle_button_get_active(b)); } GtkWidget *trg_json_widget_check_new(GList ** wl, JsonObject * obj, const gchar * key, const gchar * label, GtkWidget * toggleDep) { GtkWidget *w = gtk_check_button_new_with_mnemonic(label); trg_json_widget_desc *wd = g_new0(trg_json_widget_desc, 1); wd->saveFunc = trg_json_widget_check_save; wd->key = g_strdup(key); wd->widget = w; if (toggleDep) { gtk_widget_set_sensitive(w, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(toggleDep))); g_signal_connect(G_OBJECT(toggleDep), "toggled", G_CALLBACK(toggle_active_arg_is_sensitive), w); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), json_object_get_boolean_member(obj, key)); *wl = g_list_append(*wl, wd); return w; } GtkWidget *trg_json_widget_entry_new(GList ** wl, JsonObject * obj, const gchar * key, GtkWidget * toggleDep) { GtkWidget *w = gtk_entry_new(); trg_json_widget_desc *wd = g_new0(trg_json_widget_desc, 1); wd->saveFunc = trg_json_widget_entry_save; wd->key = g_strdup(key); wd->widget = w; if (toggleDep) { gtk_widget_set_sensitive(w, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(toggleDep))); g_signal_connect(G_OBJECT(toggleDep), "toggled", G_CALLBACK(toggle_active_arg_is_sensitive), w); } gtk_entry_set_text(GTK_ENTRY(w), json_object_get_string_member(obj, key)); *wl = g_list_append(*wl, wd); return w; } GtkWidget *trg_json_widget_spin_int_new(GList ** wl, JsonObject * obj, const gchar * key, GtkWidget * toggleDep, gint min, gint max, gint step) { GtkWidget *w = gtk_spin_button_new_with_range((gdouble)min, (gdouble)max, (gdouble)step); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(w), 0); trg_json_widget_desc *wd = g_new0(trg_json_widget_desc, 1); wd->saveFunc = trg_json_widget_spin_int_save; wd->key = g_strdup(key); wd->widget = w; if (toggleDep) { gtk_widget_set_sensitive(w, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(toggleDep))); g_signal_connect(G_OBJECT(toggleDep), "toggled", G_CALLBACK(toggle_active_arg_is_sensitive), w); } gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), (double)json_object_get_int_member(obj, key)); *wl = g_list_append(*wl, wd); return w; } GtkWidget *trg_json_widget_spin_double_new(GList ** wl, JsonObject * obj, const gchar * key, GtkWidget * toggleDep, gdouble min, gdouble max, gdouble step) { GtkWidget *w = gtk_spin_button_new_with_range(min, max, step); trg_json_widget_desc *wd = g_new0(trg_json_widget_desc, 1); wd->saveFunc = trg_json_widget_spin_double_save; wd->key = g_strdup(key); wd->widget = w; if (toggleDep) { gtk_widget_set_sensitive(w, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(toggleDep))); g_signal_connect(G_OBJECT(toggleDep), "toggled", G_CALLBACK(toggle_active_arg_is_sensitive), w); } gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), json_object_get_double_member(obj, key)); *wl = g_list_append(*wl, wd); return w; } void trg_json_widget_check_save(GtkWidget * widget, JsonObject * obj, gchar * key) { gboolean active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); json_object_set_boolean_member(obj, key, active); } void trg_json_widget_entry_save(GtkWidget * widget, JsonObject * obj, gchar * key) { json_object_set_string_member(obj, key, gtk_entry_get_text(GTK_ENTRY(widget))); } void trg_json_widget_spin_int_save(GtkWidget * widget, JsonObject * obj, gchar * key) { json_object_set_int_member(obj, key, gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON (widget))); } void trg_json_widget_spin_double_save(GtkWidget * widget, JsonObject * obj, gchar * key) { json_object_set_double_member(obj, key, gtk_spin_button_get_value(GTK_SPIN_BUTTON (widget))); } transmission-remote-gtk-1.4.1/src/trg-json-widgets.h000066400000000000000000000054501341276053300225010ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_JSON_WIDGETS_H_ #define TRG_JSON_WIDGETS_H_ #include #include typedef struct { GtkWidget *widget; gchar *key; void (*saveFunc) (GtkWidget * widget, JsonObject * obj, gchar * key); } trg_json_widget_desc; void toggle_active_arg_is_sensitive(GtkToggleButton * b, gpointer data); GtkWidget *trg_json_widget_check_new(GList ** wl, JsonObject * obj, const gchar * key, const gchar * label, GtkWidget * toggleDep); GtkWidget *trg_json_widget_entry_new(GList ** wl, JsonObject * obj, const gchar * key, GtkWidget * toggleDep); GtkWidget *trg_json_widget_spin_int_new(GList ** wl, JsonObject * obj, const gchar * key, GtkWidget * toggleDep, gint min, gint max, gint step); GtkWidget *trg_json_widget_spin_double_new(GList ** wl, JsonObject * obj, const gchar * key, GtkWidget * toggleDep, gdouble min, gdouble max, gdouble step); void trg_json_widget_check_save(GtkWidget * widget, JsonObject * obj, gchar * key); void trg_json_widget_entry_save(GtkWidget * widget, JsonObject * obj, gchar * key); void trg_json_widget_spin_int_save(GtkWidget * widget, JsonObject * obj, gchar * key); void trg_json_widget_spin_double_save(GtkWidget * widget, JsonObject * obj, gchar * key); void trg_json_widget_desc_free(trg_json_widget_desc * wd); void trg_json_widget_desc_list_free(GList * list); void trg_json_widgets_save(GList * list, JsonObject * out); #endif /* TRG_JSON_WIDGETS_H_ */ transmission-remote-gtk-1.4.1/src/trg-main-window.c000066400000000000000000003351341341276053300223150ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_LIBNOTIFY #include #endif #ifdef HAVE_LIBAPPINDICATOR #include #endif #include "trg-client.h" #include "json.h" #include "util.h" #include "requests.h" #include "session-get.h" #include "torrent.h" #include "protocol-constants.h" #include "remote-exec.h" #include "trg-main-window.h" #include "trg-icons.h" #include "trg-about-window.h" #include "trg-tree-view.h" #include "trg-prefs.h" #include "trg-sortable-filtered-model.h" #include "trg-torrent-model.h" #include "trg-torrent-tree-view.h" #include "trg-peers-model.h" #include "trg-peers-tree-view.h" #include "trg-files-tree-view.h" #include "trg-files-model.h" #include "trg-trackers-tree-view.h" #include "trg-trackers-model.h" #include "trg-state-selector.h" #include "trg-torrent-graph.h" #include "trg-torrent-move-dialog.h" #include "trg-torrent-props-dialog.h" #include "trg-torrent-add-url-dialog.h" #include "trg-torrent-add-dialog.h" #include "trg-toolbar.h" #include "trg-menu-bar.h" #include "trg-status-bar.h" #include "trg-stats-dialog.h" #ifdef HAVE_RSS #include "trg-rss-window.h" #endif #include "trg-remote-prefs-dialog.h" #include "trg-preferences-dialog.h" #include "upload.h" /* The rather large main window class, which glues everything together. */ static void update_selected_torrent_notebook(TrgMainWindow * win, gint mode, gint64 id); #ifdef HAVE_LIBNOTIFY static void torrent_event_notification(TrgTorrentModel * model, gchar * icon, gchar * desc, gint tmout, gchar * prefKey, GtkTreeIter * iter, gpointer data); #endif static void connchange_whatever_statusicon(TrgMainWindow * win, gboolean connected); static void update_whatever_statusicon(TrgMainWindow * win, trg_torrent_model_update_stats * stats); static void on_torrent_completed(TrgTorrentModel * model, GtkTreeIter * iter, gpointer data); static void on_torrent_added(TrgTorrentModel * model, GtkTreeIter * iter, gpointer data); static gboolean delete_event(GtkWidget * w, GdkEvent * event, gpointer data); static void destroy_window(TrgMainWindow * win, gpointer data G_GNUC_UNUSED); static void torrent_tv_onRowActivated(GtkTreeView * treeview, GtkTreePath * path, GtkTreeViewColumn * col, gpointer userdata); static void add_url_cb(GtkWidget * w, gpointer data); static void add_cb(GtkWidget * w, gpointer data); static void disconnect_cb(GtkWidget * w, gpointer data); static void open_local_prefs_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win); static void open_remote_prefs_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win); static TrgToolbar *trg_main_window_toolbar_new(TrgMainWindow * win); static void verify_cb(GtkWidget * w, TrgMainWindow * win); static void reannounce_cb(GtkWidget * w, TrgMainWindow * win); static void pause_cb(GtkWidget * w, TrgMainWindow * win); static void resume_cb(GtkWidget * w, TrgMainWindow * win); static void remove_cb(GtkWidget * w, TrgMainWindow * win); static void resume_all_cb(GtkWidget * w, TrgMainWindow * win); static void pause_all_cb(GtkWidget * w, TrgMainWindow * win); static void move_cb(GtkWidget * w, TrgMainWindow * win); static void delete_cb(GtkWidget * w, TrgMainWindow * win); static void open_props_cb(GtkWidget * w, TrgMainWindow * win); static gint confirm_action_dialog(GtkWindow * gtk_win, GtkTreeSelection * selection, const gchar * question_single, const gchar * question_multi, const gchar * action_stock); static void view_stats_toggled_cb(GtkWidget * w, gpointer data); static void view_states_toggled_cb(GtkCheckMenuItem * w, TrgMainWindow * win); static void view_notebook_toggled_cb(GtkCheckMenuItem * w, TrgMainWindow * win); static GtkWidget *trg_main_window_notebook_new(TrgMainWindow * win); static gboolean on_session_get_timer(gpointer data); static gboolean on_session_get(gpointer data); static gboolean on_torrent_get(gpointer data, int mode); static gboolean on_torrent_get_first(gpointer data); static gboolean on_torrent_get_active(gpointer data); static gboolean on_torrent_get_update(gpointer data); static gboolean on_torrent_get_interactive(gpointer data); static gboolean trg_session_update_timerfunc(gpointer data); static gboolean trg_update_torrents_timerfunc(gpointer data); static void open_about_cb(GtkWidget * w, GtkWindow * parent); static gboolean trg_torrent_tree_view_visible_func(GtkTreeModel * model, GtkTreeIter * iter, gpointer data); static TrgTorrentTreeView * trg_main_window_torrent_tree_view_new(TrgMainWindow * win, GtkTreeModel * model); static gboolean trg_dialog_error_handler(TrgMainWindow * win, trg_response * response); static gboolean torrent_selection_changed(GtkTreeSelection * selection, TrgMainWindow * win); static void trg_main_window_torrent_scrub(TrgMainWindow * win); static void entry_filter_changed_cb(GtkWidget * w, TrgMainWindow * win); static void torrent_state_selection_changed(TrgStateSelector * selector, guint flag, gpointer data); static void trg_main_window_conn_changed(TrgMainWindow * win, gboolean connected); static void trg_main_window_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void trg_main_window_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); static void quit_cb(GtkWidget * w, gpointer data); static TrgMenuBar *trg_main_window_menu_bar_new(TrgMainWindow * win); static void status_icon_activated(GtkStatusIcon * icon, TrgMainWindow * win); static gboolean trg_status_icon_popup_menu_cb(GtkStatusIcon * icon, TrgMainWindow * win); static gboolean status_icon_button_press_event(GtkStatusIcon * icon, GdkEventButton * event, TrgMainWindow * win); static void clear_filter_entry_cb(GtkEntry * entry, GtkEntryIconPosition icon_pos, GdkEvent * event, gpointer user_data); static GtkWidget *trg_imagemenuitem_new(GtkMenuShell * shell, const gchar * text, char *stock_id, gboolean sensitive, GCallback cb, gpointer cbdata); static void set_limit_cb(GtkWidget * w, TrgMainWindow * win); static GtkWidget *limit_item_new(TrgMainWindow * win, GtkWidget * menu, gint64 currentLimit, gfloat limit); static GtkWidget *limit_menu_new(TrgMainWindow * win, gchar * title, gchar * enabledKey, gchar * speedKey, JsonArray * ids); static void trg_torrent_tv_view_menu(GtkWidget * treeview, GdkEventButton * event, TrgMainWindow * win); static GtkMenu *trg_status_icon_view_menu(TrgMainWindow * win, const gchar * msg); static gboolean torrent_tv_button_pressed_cb(GtkWidget * treeview, GdkEventButton * event, gpointer userdata); static gboolean torrent_tv_popup_menu_cb(GtkWidget * treeview, gpointer userdata); static void trg_main_window_set_hidden_to_tray(TrgMainWindow * win, gboolean hidden); static gboolean is_ready_for_torrent_action(TrgMainWindow * win); static gboolean window_state_event(TrgMainWindow * win, GdkEventWindowState * event, gpointer trayIcon); struct _TrgMainWindow { GtkApplicationWindow parent; }; typedef struct { TrgClient *client; TrgToolbar *toolBar; TrgMenuBar *menuBar; TrgStatusBar *statusBar; GtkWidget *iconStatusItem, *iconDownloadingItem, *iconSeedingItem, *iconSepItem; #ifdef HAVE_LIBAPPINDICATOR AppIndicator *appIndicator; #endif GtkMenu *iconMenu; GtkStatusIcon *statusIcon; TrgStateSelector *stateSelector; GtkWidget *stateSelectorScroller; TrgGeneralPanel *genDetails; GtkWidget *notebook; TrgTorrentModel *torrentModel; TrgTorrentTreeView *torrentTreeView; GtkTreeModel *filteredTorrentModel; GtkTreeModel *sortedTorrentModel; gint selectedTorrentId; TrgTrackersModel *trackersModel; TrgTrackersTreeView *trackersTreeView; TrgFilesModel *filesModel; TrgFilesTreeView *filesTreeView; TrgPeersModel *peersModel; TrgPeersTreeView *peersTreeView; #if TRG_WITH_GRAPH TrgTorrentGraph *graph; #endif gint graphNotebookIndex; GtkWidget *hpaned, *vpaned; GtkWidget *filterEntry; gboolean hidden; gint width, height; guint timerId; guint sessionTimerId; gboolean min_on_start; gboolean queuesEnabled; gchar **args; } TrgMainWindowPrivate; G_DEFINE_TYPE_WITH_PRIVATE(TrgMainWindow, trg_main_window, GTK_TYPE_WINDOW) enum { PROP_0, PROP_CLIENT, PROP_MINIMISE_ON_START }; static void reset_connect_args(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (priv->args) { g_strfreev(priv->args); priv->args = NULL; } } static void trg_main_window_init(TrgMainWindow * self) { } gint trg_mw_get_selected_torrent_id(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); return priv->selectedTorrentId; } static void update_selected_torrent_notebook(TrgMainWindow * win, gint mode, gint64 id) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgClient *client = priv->client; gint64 serial = trg_client_get_serial(client); JsonObject *t; GtkTreeIter iter; if (id >= 0 && get_torrent_data(trg_client_get_torrent_table(client), id, &t, &iter)) { trg_toolbar_torrent_actions_sensitive(priv->toolBar, TRUE); trg_menu_bar_torrent_actions_sensitive(priv->menuBar, TRUE); trg_general_panel_update(priv->genDetails, t, &iter); trg_trackers_model_update(priv->trackersModel, serial, t, mode); trg_files_model_update(priv->filesModel, GTK_TREE_VIEW(priv->filesTreeView), serial, t, mode); trg_peers_model_update(priv->peersModel, TRG_TREE_VIEW(priv->peersTreeView), serial, t, mode); } else { trg_main_window_torrent_scrub(win); } priv->selectedTorrentId = id; } #ifdef HAVE_LIBNOTIFY static void torrent_event_notification(TrgTorrentModel * model, gchar * icon, gchar * desc, gint tmout, gchar * prefKey, GtkTreeIter * iter, gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgPrefs *prefs = trg_client_get_prefs(priv->client); gchar *name; NotifyNotification *notify; if (!trg_prefs_get_bool(prefs, prefKey, TRG_PREFS_NOFLAGS)) return; gtk_tree_model_get(GTK_TREE_MODEL(model), iter, TORRENT_COLUMN_NAME, &name, -1); notify = notify_notification_new(name, desc, icon #if !defined(NOTIFY_VERSION_MINOR) || (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR < 7) , NULL #endif ); #if !defined(NOTIFY_VERSION_MINOR) || (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR < 7) if (priv->statusIcon && gtk_status_icon_is_embedded(priv->statusIcon)) notify_notification_attach_to_status_icon(notify, priv->statusIcon); #endif notify_notification_set_urgency(notify, NOTIFY_URGENCY_LOW); notify_notification_set_timeout(notify, tmout); g_free(name); notify_notification_show(notify, NULL); } #endif static void on_torrent_completed(TrgTorrentModel * model, GtkTreeIter * iter, gpointer data) { #ifdef HAVE_LIBNOTIFY torrent_event_notification(model, GTK_STOCK_APPLY, _("This torrent has completed."), TORRENT_COMPLETE_NOTIFY_TMOUT, TRG_PREFS_KEY_COMPLETE_NOTIFY, iter, data); #endif } static void on_torrent_added(TrgTorrentModel * model, GtkTreeIter * iter, gpointer data) { #ifdef HAVE_LIBNOTIFY torrent_event_notification(model, GTK_STOCK_ADD, _("This torrent has been added."), TORRENT_ADD_NOTIFY_TMOUT, TRG_PREFS_KEY_ADD_NOTIFY, iter, data); #endif } static gboolean delete_event(GtkWidget * w, GdkEvent * event G_GNUC_UNUSED, gpointer data G_GNUC_UNUSED) { return FALSE; } static void destroy_window(TrgMainWindow * win, gpointer data G_GNUC_UNUSED) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgPrefs *prefs = trg_client_get_prefs(priv->client); trg_prefs_set_int(prefs, TRG_PREFS_KEY_WINDOW_HEIGHT, priv->height, TRG_PREFS_GLOBAL); trg_prefs_set_int(prefs, TRG_PREFS_KEY_WINDOW_WIDTH, priv->width, TRG_PREFS_GLOBAL); trg_prefs_set_int(prefs, TRG_PREFS_KEY_NOTEBOOK_PANED_POS, gtk_paned_get_position(GTK_PANED(priv->vpaned)), TRG_PREFS_GLOBAL); trg_prefs_set_int(prefs, TRG_PREFS_KEY_STATES_PANED_POS, gtk_paned_get_position(GTK_PANED(priv->hpaned)), TRG_PREFS_GLOBAL); trg_tree_view_persist(TRG_TREE_VIEW(priv->peersTreeView), TRG_TREE_VIEW_PERSIST_SORT | TRG_TREE_VIEW_PERSIST_LAYOUT); trg_tree_view_persist(TRG_TREE_VIEW(priv->filesTreeView), TRG_TREE_VIEW_PERSIST_SORT | TRG_TREE_VIEW_PERSIST_LAYOUT); trg_tree_view_persist(TRG_TREE_VIEW(priv->torrentTreeView), TRG_TREE_VIEW_PERSIST_SORT | TRG_TREE_VIEW_SORTABLE_PARENT | (trg_prefs_get_int (prefs, TRG_PREFS_KEY_STYLE, TRG_PREFS_GLOBAL) == TRG_STYLE_CLASSIC ? TRG_TREE_VIEW_PERSIST_LAYOUT : 0)); trg_tree_view_persist(TRG_TREE_VIEW(priv->trackersTreeView), TRG_TREE_VIEW_PERSIST_SORT | TRG_TREE_VIEW_PERSIST_LAYOUT); trg_prefs_save(prefs); #if WIN32 gtk_main_quit(); #else g_application_quit (g_application_get_default ()); #endif } static void open_props_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgTorrentPropsDialog *dialog; if (priv->selectedTorrentId < 0) return; dialog = trg_torrent_props_dialog_new(GTK_WINDOW(win), priv->torrentTreeView, priv->torrentModel, priv->client); gtk_widget_show_all(GTK_WIDGET(dialog)); } static void copy_magnetlink_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); JsonObject *json = NULL; GtkClipboard *clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); if (priv->selectedTorrentId < 0) return; if(get_torrent_data(trg_client_get_torrent_table(priv->client), priv->selectedTorrentId, &json, NULL)) gtk_clipboard_set_text(clip, torrent_get_magnetlink(json), -1); } static void torrent_tv_onRowActivated(GtkTreeView * treeview, GtkTreePath * path G_GNUC_UNUSED, GtkTreeViewColumn * col G_GNUC_UNUSED, gpointer userdata) { open_props_cb(GTK_WIDGET(treeview), userdata); } static void add_url_cb(GtkWidget * w G_GNUC_UNUSED, gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgTorrentAddUrlDialog *dlg = trg_torrent_add_url_dialog_new(win, priv-> client); gtk_widget_show_all(GTK_WIDGET(dlg)); } static void add_cb(GtkWidget * w G_GNUC_UNUSED, gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (trg_client_is_connected(priv->client)) trg_torrent_add_dialog(win, priv->client); } static void pause_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (trg_client_is_connected(priv->client)) dispatch_async(priv->client, torrent_pause(build_json_id_array (priv->torrentTreeView)), on_generic_interactive_action_response, win); } static void pause_all_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (trg_client_is_connected(priv->client)) dispatch_async(priv->client, torrent_pause(NULL), on_generic_interactive_action_response, win); } gint trg_add_from_filename(TrgMainWindow * win, gchar ** uris) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgClient *client = priv->client; TrgPrefs *prefs = trg_client_get_prefs(client); GSList *filesList = NULL; int i; if (!trg_client_is_connected(client)) { g_strfreev(uris); return EXIT_SUCCESS; } if (uris) { for (i = 0; uris[i]; i++) { if (is_minimised_arg(uris[i])) g_free(uris[i]); else if (uris[i]) filesList = g_slist_append(filesList, uris[i]); } } g_free(uris); if (!filesList) return EXIT_SUCCESS; if (trg_prefs_get_bool(prefs, TRG_PREFS_KEY_ADD_OPTIONS_DIALOG, TRG_PREFS_GLOBAL)) { TrgTorrentAddDialog *dialog = trg_torrent_add_dialog_new_from_filenames(win, client, filesList); gtk_widget_show_all(GTK_WIDGET(dialog)); gtk_window_present(GTK_WINDOW(dialog)); } else { trg_upload *upload = g_new0(trg_upload, 1); upload->list = filesList; upload->main_window = win; upload->client = client; upload->extra_args = FALSE; upload->flags = trg_prefs_get_add_flags(prefs); trg_do_upload(upload); } return EXIT_SUCCESS; } static void resume_all_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (trg_client_is_connected(priv->client)) dispatch_async(priv->client, torrent_start(NULL), on_generic_interactive_action_response, win); } static void resume_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (trg_client_is_connected(priv->client)) dispatch_async(priv->client, torrent_start(build_json_id_array (priv->torrentTreeView)), on_generic_interactive_action_response, win); } static void disconnect_cb(GtkWidget * w G_GNUC_UNUSED, gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); trg_client_inc_connid(priv->client); trg_main_window_conn_changed(TRG_MAIN_WINDOW(data), FALSE); trg_status_bar_reset(priv->statusBar); } void connect_cb(GtkWidget * w, gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgPrefs *prefs = trg_client_get_prefs(priv->client); JsonObject *currentProfile = trg_prefs_get_profile(prefs); JsonObject *profile = NULL; GtkWidget *dialog; int populate_result; if (w) profile = (JsonObject *) g_object_get_data(G_OBJECT(w), "profile"); if (trg_client_is_connected(priv->client)) disconnect_cb(NULL, data); if (profile && currentProfile != profile) trg_prefs_set_profile(prefs, profile); else trg_prefs_profile_change_emit_signal(prefs); populate_result = trg_client_populate_with_settings(priv->client); if (populate_result < 0) { gchar *msg; switch (populate_result) { case TRG_NO_HOSTNAME_SET: msg = _("No hostname set"); break; default: msg = _("Unknown error getting settings"); break; } dialog = gtk_message_dialog_new(GTK_WINDOW(data), GTK_DIALOG_DESTROY_WITH_PARENT, (populate_result == TRG_NO_HOSTNAME_SET) ? GTK_MESSAGE_INFO : GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", msg); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); reset_connect_args(TRG_MAIN_WINDOW(data)); if (populate_result == TRG_NO_HOSTNAME_SET) open_local_prefs_cb (NULL, win); return; } trg_status_bar_push_connection_msg(priv->statusBar, _("Connecting...")); trg_client_inc_connid(priv->client); dispatch_async(priv->client, session_get(), on_session_get, data); } static void open_local_prefs_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); GtkWidget *dlg = trg_preferences_dialog_get_instance(win, priv->client); gtk_widget_show_all(dlg); } static void open_remote_prefs_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (trg_client_is_connected(priv->client)) gtk_widget_show_all(GTK_WIDGET (trg_remote_prefs_dialog_get_instance (win, priv->client))); } static void main_window_toggle_filter_dirs(GtkCheckMenuItem * w, gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (gtk_widget_is_sensitive(GTK_WIDGET(w))) trg_state_selector_set_show_dirs(priv->stateSelector, gtk_check_menu_item_get_active (w)); } static void main_window_toggle_filter_trackers(GtkCheckMenuItem * w, gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (gtk_widget_is_sensitive(GTK_WIDGET(w))) trg_state_selector_set_show_trackers(priv->stateSelector, gtk_check_menu_item_get_active (w)); } static void main_window_toggle_directories_first(GtkCheckMenuItem * w, gpointer data){ TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (gtk_widget_is_sensitive(GTK_WIDGET(w))) trg_state_selector_set_directories_first(priv->stateSelector, gtk_check_menu_item_get_active(w)); } static TrgToolbar *trg_main_window_toolbar_new(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgPrefs *prefs = trg_client_get_prefs(priv->client); GObject *b_connect, *b_disconnect, *b_add, *b_resume, *b_pause; GObject *b_remove, *b_delete, *b_props, *b_local_prefs, *b_remote_prefs; TrgToolbar *toolBar = trg_toolbar_new(win, prefs); g_object_get(toolBar, "connect-button", &b_connect, "disconnect-button", &b_disconnect, "add-button", &b_add, "resume-button", &b_resume, "pause-button", &b_pause, "delete-button", &b_delete, "remove-button", &b_remove, "props-button", &b_props, "remote-prefs-button", &b_remote_prefs, "local-prefs-button", &b_local_prefs, NULL); g_signal_connect(b_connect, "clicked", G_CALLBACK(connect_cb), win); g_signal_connect(b_disconnect, "clicked", G_CALLBACK(disconnect_cb), win); g_signal_connect(b_add, "clicked", G_CALLBACK(add_cb), win); g_signal_connect(b_resume, "clicked", G_CALLBACK(resume_cb), win); g_signal_connect(b_pause, "clicked", G_CALLBACK(pause_cb), win); g_signal_connect(b_delete, "clicked", G_CALLBACK(delete_cb), win); g_signal_connect(b_remove, "clicked", G_CALLBACK(remove_cb), win); g_signal_connect(b_props, "clicked", G_CALLBACK(open_props_cb), win); g_signal_connect(b_local_prefs, "clicked", G_CALLBACK(open_local_prefs_cb), win); g_signal_connect(b_remote_prefs, "clicked", G_CALLBACK(open_remote_prefs_cb), win); return toolBar; } static void reannounce_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (trg_client_is_connected(priv->client)) dispatch_async(priv->client, torrent_reannounce(build_json_id_array (priv->torrentTreeView)), on_generic_interactive_action_response, win); } static void verify_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (is_ready_for_torrent_action(win)) dispatch_async(priv->client, torrent_verify(build_json_id_array (priv->torrentTreeView)), on_generic_interactive_action_response, win); } static void start_now_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (is_ready_for_torrent_action(win)) dispatch_async(priv->client, torrent_start_now(build_json_id_array (priv->torrentTreeView)), on_generic_interactive_action_response, win); } static void up_queue_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (priv->queuesEnabled && is_ready_for_torrent_action(win)) dispatch_async(priv->client, torrent_queue_move_up(build_json_id_array (priv->torrentTreeView)), on_generic_interactive_action_response, win); } static void top_queue_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (priv->queuesEnabled && is_ready_for_torrent_action(win)) dispatch_async(priv->client, torrent_queue_move_top(build_json_id_array (priv->torrentTreeView)), on_generic_interactive_action_response, win); } static void bottom_queue_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (priv->queuesEnabled && is_ready_for_torrent_action(win)) dispatch_async(priv->client, torrent_queue_move_bottom(build_json_id_array (priv->torrentTreeView)), on_generic_interactive_action_response, win); } static void down_queue_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (priv->queuesEnabled && is_ready_for_torrent_action(win)) dispatch_async(priv->client, torrent_queue_move_down(build_json_id_array (priv->torrentTreeView)), on_generic_interactive_action_response, win); } static gint confirm_action_dialog(GtkWindow * gtk_win, GtkTreeSelection * selection, const gchar * question_single, const gchar * question_multi, const gchar * action_stock) { TrgMainWindow *win = TRG_MAIN_WINDOW(gtk_win); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); gint selectCount; gint response; GtkWidget *dialog = NULL; selectCount = gtk_tree_selection_count_selected_rows(selection); if (selectCount == 1) { GList *list; GList *firstNode; GtkTreeIter firstIter; gchar *name = NULL; list = gtk_tree_selection_get_selected_rows(selection, NULL); firstNode = g_list_first(list); gtk_tree_model_get_iter(GTK_TREE_MODEL (priv->filteredTorrentModel), &firstIter, firstNode->data); gtk_tree_model_get(GTK_TREE_MODEL(priv->filteredTorrentModel), &firstIter, TORRENT_COLUMN_NAME, &name, -1); g_list_foreach(list, (GFunc) gtk_tree_path_free, NULL); g_list_free(list); dialog = gtk_message_dialog_new_with_markup(GTK_WINDOW(win), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, question_single, name); g_free(name); } else if (selectCount > 1) { dialog = gtk_message_dialog_new_with_markup(GTK_WINDOW(win), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, question_multi, selectCount); } else { return 0; } gtk_dialog_add_buttons(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, action_stock, GTK_RESPONSE_ACCEPT, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CANCEL); gtk_dialog_set_alternative_button_order(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT, GTK_RESPONSE_CANCEL, -1); response = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); return response; } static gboolean is_ready_for_torrent_action(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); return priv->selectedTorrentId >= 0 && trg_client_is_connected(priv->client); } static void move_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (is_ready_for_torrent_action(win)) gtk_widget_show_all(GTK_WIDGET (trg_torrent_move_dialog_new (win, priv->client, priv->torrentTreeView))); } static void remove_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); GtkTreeSelection *selection; JsonArray *ids; if (!is_ready_for_torrent_action(win)) return; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->torrentTreeView)); ids = build_json_id_array(priv->torrentTreeView); if (confirm_action_dialog(GTK_WINDOW(win), selection, _ ("Remove torrent \"%s\"?"), _("Remove %d torrents?"), GTK_STOCK_REMOVE) == GTK_RESPONSE_ACCEPT) dispatch_async(priv->client, torrent_remove(ids, FALSE), on_generic_interactive_action_response, win); else json_array_unref(ids); } static void delete_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); GtkTreeSelection *selection; JsonArray *ids; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->torrentTreeView)); ids = build_json_id_array(priv->torrentTreeView); if (!is_ready_for_torrent_action(win)) return; if (confirm_action_dialog(GTK_WINDOW(win), selection, _ ("Remove and delete torrent \"%s\"?"), _ ("Remove and delete %d torrents?"), GTK_STOCK_DELETE) == GTK_RESPONSE_ACCEPT) dispatch_async(priv->client, torrent_remove(ids, TRUE), on_delete_complete, win); else json_array_unref(ids); } static void view_stats_toggled_cb(GtkWidget * w, gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (trg_client_is_connected(priv->client)) { TrgStatsDialog *dlg = trg_stats_dialog_get_instance(TRG_MAIN_WINDOW(data), priv->client); gtk_widget_show_all(GTK_WIDGET(dlg)); } } #ifdef HAVE_RSS static void view_rss_toggled_cb(GtkWidget * w, gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (trg_client_is_connected(priv->client)) { TrgRssWindow *rss = trg_rss_window_get_instance(TRG_MAIN_WINDOW(data), priv->client); gtk_widget_show_all(GTK_WIDGET(rss)); gtk_window_present(GTK_WINDOW(rss)); } } #endif static void view_states_toggled_cb(GtkCheckMenuItem * w, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); trg_widget_set_visible(priv->stateSelectorScroller, gtk_check_menu_item_get_active(w)); } static void view_notebook_toggled_cb(GtkCheckMenuItem * w, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); trg_widget_set_visible(priv->notebook, gtk_check_menu_item_get_active(w)); } #if TRG_WITH_GRAPH static void trg_main_window_toggle_graph_cb(GtkCheckMenuItem * w, gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (!gtk_widget_is_sensitive(GTK_WIDGET(w))) { return; } else if (gtk_check_menu_item_get_active(w)) { if (priv->graphNotebookIndex < 0) trg_main_window_add_graph(TRG_MAIN_WINDOW(win), TRUE); } else if (priv->graphNotebookIndex >= 0) { trg_main_window_remove_graph(TRG_MAIN_WINDOW(win)); } } #endif void trg_main_window_notebook_set_visible(TrgMainWindow * win, gboolean visible) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); trg_widget_set_visible(priv->notebook, visible); } static GtkWidget *trg_main_window_notebook_new(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgPrefs *prefs = trg_client_get_prefs(priv->client); GtkWidget *notebook = priv->notebook = gtk_notebook_new(); GtkWidget *genScrolledWin = gtk_scrolled_window_new(NULL, NULL); priv->genDetails = trg_general_panel_new(GTK_TREE_MODEL(priv->torrentModel), priv->client); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(genScrolledWin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW (genScrolledWin), GTK_WIDGET(priv->genDetails)); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), genScrolledWin, gtk_label_new(_("General"))); priv->trackersModel = trg_trackers_model_new(); priv->trackersTreeView = trg_trackers_tree_view_new(priv->trackersModel, priv->client, win, NULL); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), my_scrolledwin_new(GTK_WIDGET (priv->trackersTreeView)), gtk_label_new(_("Trackers"))); priv->filesModel = trg_files_model_new(); priv->filesTreeView = trg_files_tree_view_new(priv->filesModel, win, priv->client, NULL); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), my_scrolledwin_new(GTK_WIDGET (priv->filesTreeView)), gtk_label_new(_("Files"))); priv->peersModel = trg_peers_model_new(); priv->peersTreeView = trg_peers_tree_view_new(prefs, priv->peersModel, NULL); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), my_scrolledwin_new(GTK_WIDGET (priv->peersTreeView)), gtk_label_new(_("Peers"))); #if TRG_WITH_GRAPH if (trg_prefs_get_bool (prefs, TRG_PREFS_KEY_SHOW_GRAPH, TRG_PREFS_GLOBAL)) trg_main_window_add_graph(win, FALSE); else priv->graphNotebookIndex = -1; #endif return notebook; } gboolean on_session_set(gpointer data) { trg_response *response = (trg_response *) data; TrgMainWindow *win = TRG_MAIN_WINDOW(response->cb_data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (response->status == CURLE_OK || response->status == FAIL_RESPONSE_UNSUCCESSFUL) trg_client_update_session(priv->client, on_session_get, response->cb_data); trg_dialog_error_handler(TRG_MAIN_WINDOW(response->cb_data), response); trg_response_free(response); return FALSE; } static gboolean hasEnabledChanged(JsonObject * a, JsonObject * b, const gchar * key) { return json_object_get_boolean_member(a, key) != json_object_get_boolean_member(b, key); } static gboolean on_session_get_timer(gpointer data) { trg_response *response = (trg_response *) data; TrgMainWindow *win = TRG_MAIN_WINDOW(response->cb_data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgPrefs *prefs = trg_client_get_prefs(priv->client); on_session_get(data); priv->sessionTimerId = g_timeout_add_seconds(trg_prefs_get_int(prefs, TRG_PREFS_KEY_SESSION_UPDATE_INTERVAL, TRG_PREFS_CONNECTION), trg_session_update_timerfunc, win); return FALSE; } static gboolean on_session_get(gpointer data) { trg_response *response = (trg_response *) data; TrgMainWindow *win = TRG_MAIN_WINDOW(response->cb_data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgClient *client = priv->client; gboolean isConnected = trg_client_is_connected(client); JsonObject *lastSession = trg_client_get_session(client); JsonObject *newSession = NULL; if (response->obj) newSession = get_arguments(response->obj); if (!isConnected) { gdouble version; if (trg_dialog_error_handler(win, response)) { trg_response_free(response); reset_connect_args(win); return FALSE; } if ((version = session_get_version(newSession)) < TRANSMISSION_MIN_SUPPORTED) { gchar *msg = g_strdup_printf(_ ("This application supports Transmission %g and later, you have %g."), TRANSMISSION_MIN_SUPPORTED, version); GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(win), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", msg); gtk_window_set_title(GTK_WINDOW(dialog), _("Error")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); g_free(msg); trg_response_free(response); reset_connect_args(win); return FALSE; } trg_status_bar_connect(priv->statusBar, newSession, client); } if (newSession) { gboolean reloadAliases = lastSession && g_strcmp0(session_get_download_dir(lastSession), session_get_download_dir(newSession)); gboolean refreshSpeed = lastSession && (hasEnabledChanged (lastSession, newSession, SGET_ALT_SPEED_ENABLED) || hasEnabledChanged(lastSession, newSession, SGET_SPEED_LIMIT_DOWN_ENABLED) || hasEnabledChanged(lastSession, newSession, SGET_SPEED_LIMIT_UP_ENABLED)); trg_client_set_session(client, newSession); if (reloadAliases) trg_main_window_reload_dir_aliases(win); if (refreshSpeed) trg_status_bar_update_speed(priv->statusBar, trg_torrent_model_get_stats (priv->torrentModel), priv->client); } if (!isConnected) { trg_main_window_conn_changed(win, TRUE); trg_trackers_tree_view_new_connection(priv->trackersTreeView, client); dispatch_async(client, torrent_get(TORRENT_GET_TAG_MODE_FULL), on_torrent_get_first, win); } trg_response_free(response); return FALSE; } static void connchange_whatever_statusicon(TrgMainWindow * win, gboolean connected) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgPrefs *prefs = trg_client_get_prefs(priv->client); gchar *display = connected ? trg_prefs_get_string(prefs, TRG_PREFS_KEY_PROFILE_NAME, TRG_PREFS_CONNECTION) : g_strdup(_("Disconnected")); #ifdef HAVE_LIBAPPINDICATOR if (priv->appIndicator) { GtkMenu *menu = trg_status_icon_view_menu(win, display); app_indicator_set_menu(priv->appIndicator, menu); } else { #else if (1) { #endif if (priv->iconMenu) gtk_widget_destroy(GTK_WIDGET(priv->iconMenu)); priv->iconMenu = trg_status_icon_view_menu(win, display); if (priv->statusIcon) gtk_status_icon_set_tooltip_text(priv->statusIcon, display); } g_free(display); } static void update_whatever_statusicon(TrgMainWindow * win, trg_torrent_model_update_stats * stats) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); #ifdef HAVE_LIBAPPINDICATOR if (!priv->appIndicator && !priv->statusIcon) #else if (!priv->statusIcon) #endif return; gtk_widget_set_visible(priv->iconSeedingItem, stats != NULL); gtk_widget_set_visible(priv->iconDownloadingItem, stats != NULL); gtk_widget_set_visible(priv->iconSepItem, stats != NULL); if (stats) { gchar *downloadingLabel; gchar *seedingLabel; gchar buf[32]; trg_strlspeed(buf, stats->downRateTotal / disk_K); downloadingLabel = g_strdup_printf(_("%d Downloading @ %s"), stats->down, buf); gtk_menu_item_set_label(GTK_MENU_ITEM(priv->iconDownloadingItem), downloadingLabel); g_free(downloadingLabel); trg_strlspeed(buf, stats->upRateTotal / disk_K); seedingLabel = g_strdup_printf(_("%d Seeding @ %s"), stats->seeding, buf); gtk_menu_item_set_label(GTK_MENU_ITEM(priv->iconSeedingItem), seedingLabel); g_free(seedingLabel); } } /* * The callback for a torrent-get response. */ static gboolean on_torrent_get(gpointer data, int mode) { trg_response *response = (trg_response *) data; TrgMainWindow *win = TRG_MAIN_WINDOW(response->cb_data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgClient *client = priv->client; TrgPrefs *prefs = trg_client_get_prefs(client); trg_torrent_model_update_stats *stats; guint interval; gint old_sort_id; GtkSortType old_order; /* Disconnected between request and response callback */ if (!trg_client_is_connected(client)) { trg_response_free(response); return FALSE; } interval = gtk_widget_get_visible(GTK_WIDGET(win)) ? trg_prefs_get_int(prefs, TRG_PREFS_KEY_UPDATE_INTERVAL, TRG_PREFS_CONNECTION) : trg_prefs_get_int(prefs, TRG_PREFS_KEY_MINUPDATE_INTERVAL, TRG_PREFS_CONNECTION); if (interval < 1) interval = TRG_INTERVAL_DEFAULT; if (response->status != CURLE_OK) { gint64 max_retries = trg_prefs_get_int(prefs, TRG_PREFS_KEY_RETRIES, TRG_PREFS_CONNECTION); if (trg_client_inc_failcount(client) >= max_retries) { trg_main_window_conn_changed(win, FALSE); trg_dialog_error_handler(win, response); } else { gchar *msg = make_error_message(response->obj, response->status); gchar *statusBarMsg = g_strdup_printf(_("Request %d/%d failed: %s"), trg_client_get_failcount(client), (gint) max_retries, msg); trg_status_bar_push_connection_msg(priv->statusBar, statusBarMsg); g_free(msg); g_free(statusBarMsg); priv->timerId = g_timeout_add_seconds(interval, trg_update_torrents_timerfunc, win); } trg_response_free(response); return FALSE; } trg_client_reset_failcount(client); trg_client_inc_serial(client); if (mode != TORRENT_GET_MODE_FIRST) gtk_widget_freeze_child_notify(GTK_WIDGET(priv->torrentTreeView)); gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE (priv->sortedTorrentModel), &old_sort_id, &old_order); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE (priv->sortedTorrentModel), GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, GTK_SORT_ASCENDING); stats = trg_torrent_model_update(priv->torrentModel, client, response->obj, mode); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE (priv->sortedTorrentModel), old_sort_id, old_order); if (mode != TORRENT_GET_MODE_FIRST) gtk_widget_thaw_child_notify(GTK_WIDGET(priv->torrentTreeView)); update_selected_torrent_notebook(win, mode, priv->selectedTorrentId); trg_status_bar_update(priv->statusBar, stats, client); update_whatever_statusicon(win, stats); #if TRG_WITH_GRAPH if (priv->graphNotebookIndex >= 0) trg_torrent_graph_set_speed(priv->graph, stats); #endif if (mode != TORRENT_GET_MODE_INTERACTION) priv->timerId = g_timeout_add_seconds(interval, trg_update_torrents_timerfunc, win); trg_response_free(response); return FALSE; } static gboolean on_torrent_get_active(gpointer data) { return on_torrent_get(data, TORRENT_GET_MODE_ACTIVE); } static gboolean on_torrent_get_first(gpointer data) { trg_response *response = (trg_response *) data; TrgMainWindow *win = TRG_MAIN_WINDOW(response->cb_data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); gboolean result = on_torrent_get(data, TORRENT_GET_MODE_FIRST); if (priv->args) { trg_add_from_filename(win, priv->args); priv->args = NULL; } return result; } static gboolean on_torrent_get_interactive(gpointer data) { return on_torrent_get(data, TORRENT_GET_MODE_INTERACTION); } static gboolean on_torrent_get_update(gpointer data) { return on_torrent_get(data, TORRENT_GET_MODE_UPDATE); } static gboolean trg_session_update_timerfunc(gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); trg_client_update_session(priv->client, on_session_get_timer, win); return FALSE; } static gboolean trg_update_torrents_timerfunc(gpointer data) { /* Check if the TrgMainWindow* has already been destroyed * and, in that case, stop polling the server. */ if (!TRG_IS_MAIN_WINDOW (data)) return FALSE; TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgClient *tc = priv->client; TrgPrefs *prefs = trg_client_get_prefs(tc); if (trg_client_is_connected(tc)) { gboolean activeOnly = trg_prefs_get_bool(prefs, TRG_PREFS_KEY_UPDATE_ACTIVE_ONLY, TRG_PREFS_CONNECTION) && (!trg_prefs_get_bool(prefs, TRG_PREFS_ACTIVEONLY_FULLSYNC_ENABLED, TRG_PREFS_CONNECTION) || (trg_client_get_serial(tc) % trg_prefs_get_int(prefs, TRG_PREFS_ACTIVEONLY_FULLSYNC_EVERY, TRG_PREFS_CONNECTION) != 0)); dispatch_async(tc, torrent_get(activeOnly ? TORRENT_GET_TAG_MODE_UPDATE : TORRENT_GET_TAG_MODE_FULL), activeOnly ? on_torrent_get_active : on_torrent_get_update, data); } return FALSE; } static void open_about_cb(GtkWidget * w G_GNUC_UNUSED, GtkWindow * parent) { GtkWidget *aboutDialog = trg_about_window_new(parent); gtk_dialog_run(GTK_DIALOG(aboutDialog)); gtk_widget_destroy(aboutDialog); } static gboolean trg_torrent_tree_view_visible_func(GtkTreeModel * model, GtkTreeIter * iter, gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); guint flags; gboolean visible; const gchar *filterText; guint32 criteria = trg_state_selector_get_flag(priv->stateSelector); gtk_tree_model_get(model, iter, TORRENT_COLUMN_FLAGS, &flags, -1); if (criteria != 0) { if (criteria & FILTER_FLAG_TRACKER) { gchar *text = trg_state_selector_get_selected_text(priv->stateSelector); JsonObject *json = NULL; gboolean matchesTracker; gtk_tree_model_get(model, iter, TORRENT_COLUMN_JSON, &json, -1); matchesTracker = (!json || !torrent_has_tracker(json, trg_state_selector_get_url_host_regex (priv-> stateSelector), text)); g_free(text); if (matchesTracker) return FALSE; } else if (criteria & FILTER_FLAG_DIR) { gchar *text = trg_state_selector_get_selected_text(priv->stateSelector); gchar *dd; int cmp; gtk_tree_model_get(model, iter, TORRENT_COLUMN_DOWNLOADDIR_SHORT, &dd, -1); cmp = g_strcmp0(text, dd); g_free(dd); g_free(text); if (cmp) return FALSE; } else if (!(flags & criteria)) { return FALSE; } } visible = TRUE; filterText = gtk_entry_get_text(GTK_ENTRY(priv->filterEntry)); if (strlen(filterText) > 0) { gchar *name = NULL; gtk_tree_model_get(model, iter, TORRENT_COLUMN_NAME, &name, -1); if (name) { gchar *filterCmp = g_utf8_casefold(filterText, -1); gchar *nameCmp = g_utf8_casefold(name, -1); if (!strstr(nameCmp, filterCmp)) visible = FALSE; g_free(nameCmp); g_free(filterCmp); g_free(name); } } return visible; } void trg_main_window_reload_dir_aliases(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); trg_torrent_model_reload_dir_aliases(priv->client, GTK_TREE_MODEL (priv->torrentModel)); } static TrgTorrentTreeView * trg_main_window_torrent_tree_view_new(TrgMainWindow * win, GtkTreeModel * model) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgTorrentTreeView *torrentTreeView = trg_torrent_tree_view_new(priv->client, model); GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(torrentTreeView)); g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(torrent_selection_changed), win); return torrentTreeView; } static gboolean trg_dialog_error_handler(TrgMainWindow * win, trg_response * response) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (response->status != CURLE_OK) { GtkWidget *dialog; const gchar *msg; msg = make_error_message(response->obj, response->status); trg_status_bar_clear_indicators(priv->statusBar); trg_status_bar_push_connection_msg(priv->statusBar, msg); dialog = gtk_message_dialog_new(GTK_WINDOW(win), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", msg); gtk_window_set_title(GTK_WINDOW(dialog), _("Error")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); g_free((gpointer) msg); return TRUE; } else { return FALSE; } } static gboolean torrent_selection_changed(GtkTreeSelection * selection, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); GList *selectionList; GList *firstNode; gint64 id; if (trg_torrent_model_is_remove_in_progress(priv->torrentModel)) { trg_main_window_torrent_scrub(win); return TRUE; } selectionList = gtk_tree_selection_get_selected_rows(selection, NULL); firstNode = g_list_first(selectionList); id = -1; if (firstNode) { GtkTreeIter iter; if (gtk_tree_model_get_iter(priv->filteredTorrentModel, &iter, (GtkTreePath *) firstNode->data)) { gtk_tree_model_get(priv->filteredTorrentModel, &iter, TORRENT_COLUMN_ID, &id, -1); } } g_list_foreach(selectionList, (GFunc) gtk_tree_path_free, NULL); g_list_free(selectionList); update_selected_torrent_notebook(win, TORRENT_GET_MODE_FIRST, id); return TRUE; } gboolean on_delete_complete(gpointer data) { trg_response *response = (trg_response *) data; TrgMainWindow *win = TRG_MAIN_WINDOW(response->cb_data); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgClient *tc = priv->client; if (trg_client_is_connected(tc) && response->status == CURLE_OK) trg_client_update_session(priv->client, on_session_get, response->cb_data); return on_generic_interactive_action_response(data); } void on_generic_interactive_action(TrgMainWindow *win, trg_response *response) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgClient *tc = priv->client; if (trg_client_is_connected(tc)) { trg_dialog_error_handler(win, response); if (response->status == CURLE_OK) { gint64 id; if (json_object_has_member(response->obj, PARAM_TAG)) id = json_object_get_int_member(response->obj, PARAM_TAG); else id = TORRENT_GET_TAG_MODE_FULL; dispatch_async(tc, torrent_get(id), on_torrent_get_interactive, win); } } trg_response_free(response); } gboolean on_generic_interactive_action_response(gpointer data) { trg_response *response = (trg_response *) data; TrgMainWindow *win = TRG_MAIN_WINDOW(response->cb_data); on_generic_interactive_action(win, response); return FALSE; } static void trg_main_window_torrent_scrub(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); gtk_tree_store_clear(GTK_TREE_STORE(priv->filesModel)); gtk_list_store_clear(GTK_LIST_STORE(priv->trackersModel)); gtk_list_store_clear(GTK_LIST_STORE(priv->peersModel)); trg_general_panel_clear(priv->genDetails); trg_trackers_model_set_no_selection(TRG_TRACKERS_MODEL (priv->trackersModel)); trg_toolbar_torrent_actions_sensitive(priv->toolBar, FALSE); trg_menu_bar_torrent_actions_sensitive(priv->menuBar, FALSE); } static void entry_filter_changed_cb(GtkWidget * w, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); gboolean clearSensitive = gtk_entry_get_text_length(GTK_ENTRY(w)) > 0; gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER (priv->filteredTorrentModel)); g_object_set(priv->filterEntry, "secondary-icon-sensitive", clearSensitive, NULL); } static void torrent_state_selection_changed(TrgStateSelector * selector G_GNUC_UNUSED, guint flag G_GNUC_UNUSED, gpointer data) { gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(data)); } static void trg_main_window_conn_changed(TrgMainWindow * win, gboolean connected) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgClient *tc = priv->client; trg_toolbar_connected_change(priv->toolBar, connected); trg_menu_bar_connected_change(priv->menuBar, connected); gtk_widget_set_sensitive(GTK_WIDGET(priv->torrentTreeView), connected); gtk_widget_set_sensitive(GTK_WIDGET(priv->peersTreeView), connected); gtk_widget_set_sensitive(GTK_WIDGET(priv->filesTreeView), connected); gtk_widget_set_sensitive(GTK_WIDGET(priv->trackersTreeView), connected); gtk_widget_set_sensitive(GTK_WIDGET(priv->genDetails), connected); if (connected) { TrgPrefs *prefs = trg_client_get_prefs(priv->client); priv->sessionTimerId = g_timeout_add_seconds(trg_prefs_get_int (prefs, TRG_PREFS_KEY_SESSION_UPDATE_INTERVAL, TRG_PREFS_CONNECTION), trg_session_update_timerfunc, win); } else { trg_main_window_torrent_scrub(win); trg_state_selector_disconnect(priv->stateSelector); #if TRG_WITH_GRAPH if (priv->graphNotebookIndex >= 0) trg_torrent_graph_set_nothing(priv->graph); #endif trg_torrent_model_remove_all(priv->torrentModel); g_source_remove(priv->timerId); g_source_remove(priv->sessionTimerId); priv->sessionTimerId = priv->timerId = 0; } trg_client_status_change(tc, connected); connchange_whatever_statusicon(win, connected); } static void trg_main_window_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgMainWindow *win = TRG_MAIN_WINDOW(object); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); switch (property_id) { case PROP_CLIENT: g_value_set_pointer(value, priv->client); break; case PROP_MINIMISE_ON_START: g_value_set_boolean(value, priv->min_on_start); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_main_window_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgMainWindow *win = TRG_MAIN_WINDOW(object); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); switch (property_id) { case PROP_CLIENT: priv->client = g_value_get_pointer(value); break; case PROP_MINIMISE_ON_START: priv->min_on_start = g_value_get_boolean(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void quit_cb(GtkWidget * w G_GNUC_UNUSED, gpointer data) { gtk_widget_destroy(GTK_WIDGET(data)); } static TrgMenuBar *trg_main_window_menu_bar_new(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); GObject *b_disconnect, *b_add, *b_resume, *b_pause, *b_verify, *b_remove, *b_delete, *b_props, *b_local_prefs, *b_remote_prefs, *b_about, *b_view_states, *b_view_notebook, *b_view_stats, *b_add_url, *b_quit, *b_move, *b_reannounce, *b_pause_all, *b_resume_all, *b_dir_filters, *b_tracker_filters, *b_directories_first, *b_up_queue, *b_down_queue, *b_top_queue, *b_bottom_queue, #if TRG_WITH_GRAPH *b_show_graph, #endif #ifdef HAVE_RSS *b_view_rss, #endif *b_start_now, *b_copy_magnetlink; TrgMenuBar *menuBar; GtkAccelGroup *accel_group; accel_group = gtk_accel_group_new(); menuBar = trg_menu_bar_new(win, trg_client_get_prefs(priv->client), priv->torrentTreeView, accel_group); g_object_get(menuBar, "disconnect-button", &b_disconnect, "add-button", &b_add, "add-url-button", &b_add_url, "resume-button", &b_resume, "resume-all-button", &b_resume_all, "pause-button", &b_pause, "pause-all-button", &b_pause_all, "delete-button", &b_delete, "remove-button", &b_remove, "move-button", &b_move, "verify-button", &b_verify, "reannounce-button", &b_reannounce, "props-button", &b_props, "remote-prefs-button", &b_remote_prefs, "local-prefs-button", &b_local_prefs, "view-notebook-button", &b_view_notebook, "view-states-button", &b_view_states, "view-stats-button", &b_view_stats, "about-button", &b_about, "quit-button", &b_quit, "dir-filters", &b_dir_filters, "tracker-filters", &b_tracker_filters, TRG_PREFS_KEY_DIRECTORIES_FIRST, &b_directories_first, #if TRG_WITH_GRAPH "show-graph", &b_show_graph, #endif #ifdef HAVE_RSS "view-rss-button", &b_view_rss, #endif "up-queue", &b_up_queue, "down-queue", &b_down_queue, "top-queue", &b_top_queue, "bottom-queue", &b_bottom_queue, "start-now", &b_start_now, "copymagnet-button", &b_copy_magnetlink, NULL); g_signal_connect(b_disconnect, "activate", G_CALLBACK(disconnect_cb), win); g_signal_connect(b_add, "activate", G_CALLBACK(add_cb), win); g_signal_connect(b_add_url, "activate", G_CALLBACK(add_url_cb), win); g_signal_connect(b_resume, "activate", G_CALLBACK(resume_cb), win); g_signal_connect(b_resume_all, "activate", G_CALLBACK(resume_all_cb), win); g_signal_connect(b_pause, "activate", G_CALLBACK(pause_cb), win); g_signal_connect(b_pause_all, "activate", G_CALLBACK(pause_all_cb), win); g_signal_connect(b_verify, "activate", G_CALLBACK(verify_cb), win); g_signal_connect(b_reannounce, "activate", G_CALLBACK(reannounce_cb), win); g_signal_connect(b_delete, "activate", G_CALLBACK(delete_cb), win); g_signal_connect(b_remove, "activate", G_CALLBACK(remove_cb), win); g_signal_connect(b_up_queue, "activate", G_CALLBACK(up_queue_cb), win); g_signal_connect(b_down_queue, "activate", G_CALLBACK(down_queue_cb), win); g_signal_connect(b_top_queue, "activate", G_CALLBACK(top_queue_cb), win); g_signal_connect(b_bottom_queue, "activate", G_CALLBACK(bottom_queue_cb), win); g_signal_connect(b_start_now, "activate", G_CALLBACK(start_now_cb), win); g_signal_connect(b_move, "activate", G_CALLBACK(move_cb), win); g_signal_connect(b_about, "activate", G_CALLBACK(open_about_cb), win); g_signal_connect(b_local_prefs, "activate", G_CALLBACK(open_local_prefs_cb), win); g_signal_connect(b_remote_prefs, "activate", G_CALLBACK(open_remote_prefs_cb), win); g_signal_connect(b_view_notebook, "toggled", G_CALLBACK(view_notebook_toggled_cb), win); g_signal_connect(b_dir_filters, "toggled", G_CALLBACK(main_window_toggle_filter_dirs), win); g_signal_connect(b_tracker_filters, "toggled", G_CALLBACK(main_window_toggle_filter_trackers), win); g_signal_connect(b_directories_first, "toggled", G_CALLBACK(main_window_toggle_directories_first), win); g_signal_connect(b_view_states, "toggled", G_CALLBACK(view_states_toggled_cb), win); g_signal_connect(b_view_stats, "activate", G_CALLBACK(view_stats_toggled_cb), win); #ifdef HAVE_RSS g_signal_connect(b_view_rss, "activate", G_CALLBACK(view_rss_toggled_cb), win); #endif #if TRG_WITH_GRAPH g_signal_connect(b_show_graph, "toggled", G_CALLBACK(trg_main_window_toggle_graph_cb), win); #endif g_signal_connect(b_props, "activate", G_CALLBACK(open_props_cb), win); g_signal_connect(b_copy_magnetlink, "activate", G_CALLBACK(copy_magnetlink_cb), win); g_signal_connect(b_quit, "activate", G_CALLBACK(quit_cb), win); gtk_window_add_accel_group(GTK_WINDOW(win), accel_group); return menuBar; } static void status_icon_activated(GtkStatusIcon * icon G_GNUC_UNUSED, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgPrefs *prefs = trg_client_get_prefs(priv->client); trg_main_window_set_hidden_to_tray(win, !priv->hidden && trg_prefs_get_bool(prefs, TRG_PREFS_KEY_SYSTEM_TRAY_MINIMISE, TRG_PREFS_GLOBAL)); } static gboolean trg_status_icon_popup_menu_cb(GtkStatusIcon * icon, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); gtk_menu_popup(priv->iconMenu, NULL, NULL, #ifdef WIN32 NULL, #else gtk_status_icon_position_menu, #endif priv->statusIcon, 0, gtk_get_current_event_time()); return TRUE; } static gboolean status_icon_button_press_event(GtkStatusIcon * icon, GdkEventButton * event, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (event->type == GDK_BUTTON_PRESS && event->button == 3) { gtk_menu_popup(priv->iconMenu, NULL, NULL, #ifdef WIN32 NULL, #else gtk_status_icon_position_menu, #endif priv->statusIcon, event->button, gdk_event_get_time((GdkEvent *) event)); return TRUE; } else { return FALSE; } } static void clear_filter_entry_cb(GtkEntry * entry, GtkEntryIconPosition icon_pos, GdkEvent * event, gpointer user_data) { gtk_entry_set_text(entry, ""); } static GtkWidget *trg_imagemenuitem_new(GtkMenuShell * shell, const gchar * text, char *stock_id, gboolean sensitive, GCallback cb, gpointer cbdata) { GtkWidget *item = gtk_image_menu_item_new_with_label(stock_id); gtk_image_menu_item_set_use_stock(GTK_IMAGE_MENU_ITEM(item), TRUE); gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM (item), TRUE); gtk_menu_item_set_label(GTK_MENU_ITEM(item), text); g_signal_connect(item, "activate", cb, cbdata); gtk_widget_set_sensitive(item, sensitive); gtk_menu_shell_append(shell, item); return item; } static void set_limit_cb(GtkWidget * w, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); GtkWidget *parent = gtk_widget_get_parent(w); gint speed = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w), "limit")); gchar *speedKey = g_object_get_data(G_OBJECT(parent), "speedKey"); gchar *enabledKey = g_object_get_data(G_OBJECT(parent), "enabledKey"); gpointer limitIds = g_object_get_data(G_OBJECT(parent), "limit-ids"); JsonNode *req = NULL; JsonObject *args; if (limitIds) req = torrent_set((JsonArray *) limitIds); else req = session_set(); args = node_get_arguments(req); if (speed >= 0) json_object_set_int_member(args, speedKey, speed); json_object_set_boolean_member(args, enabledKey, speed >= 0); if (limitIds) dispatch_async(priv->client, req, on_generic_interactive_action_response, win); else dispatch_async(priv->client, req, on_session_set, win); } static void set_priority_cb(GtkWidget * w, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); GtkWidget *parent = gtk_widget_get_parent(w); gint priority = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w), "priority")); gpointer limitIds = g_object_get_data(G_OBJECT(parent), "pri-ids"); JsonNode *req = NULL; JsonObject *args; req = torrent_set((JsonArray *) limitIds); args = node_get_arguments(req); json_object_set_int_member(args, FIELD_BANDWIDTH_PRIORITY, priority); dispatch_async(priv->client, req, on_generic_interactive_action_response, win); } static GtkWidget *limit_item_new(TrgMainWindow * win, GtkWidget * menu, gint64 currentLimit, gfloat limit) { char speed[32]; GtkWidget *item; gboolean active = limit < 0 ? FALSE : (currentLimit == (gint64) limit); trg_strlspeed(speed, limit); item = gtk_check_menu_item_new_with_label(speed); g_object_set_data(G_OBJECT(item), "limit", GINT_TO_POINTER((gint) limit)); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), active); g_signal_connect(item, "activate", G_CALLBACK(set_limit_cb), win); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); return item; } static GtkWidget *priority_menu_item_new(TrgMainWindow * win, GtkMenuShell * menu, const gchar * label, gint value, gint current_value) { GtkWidget *item = gtk_check_menu_item_new_with_label(label); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), value == current_value); g_object_set_data(G_OBJECT(item), "priority", GINT_TO_POINTER(value)); g_signal_connect(item, "activate", G_CALLBACK(set_priority_cb), win); gtk_menu_shell_append(menu, item); return item; } static GtkWidget *priority_menu_new(TrgMainWindow * win, JsonArray * ids) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgClient *client = priv->client; JsonObject *t = NULL; gint selected_pri = TR_PRI_UNSET; GtkWidget *toplevel, *menu; if (get_torrent_data(trg_client_get_torrent_table(client), priv->selectedTorrentId, &t, NULL)) selected_pri = torrent_get_bandwidth_priority(t); toplevel = gtk_image_menu_item_new_with_label(GTK_STOCK_NETWORK); gtk_image_menu_item_set_use_stock(GTK_IMAGE_MENU_ITEM(toplevel), TRUE); gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM (toplevel), TRUE); gtk_menu_item_set_label(GTK_MENU_ITEM(toplevel), _("Priority")); menu = gtk_menu_new(); g_object_set_data_full(G_OBJECT(menu), "pri-ids", ids, (GDestroyNotify) json_array_unref); priority_menu_item_new(win, GTK_MENU_SHELL(menu), _("High"), TR_PRI_HIGH, selected_pri); priority_menu_item_new(win, GTK_MENU_SHELL(menu), _("Normal"), TR_PRI_NORMAL, selected_pri); priority_menu_item_new(win, GTK_MENU_SHELL(menu), _("Low"), TR_PRI_LOW, selected_pri); gtk_menu_item_set_submenu(GTK_MENU_ITEM(toplevel), menu); return toplevel; } static GtkWidget *limit_menu_new(TrgMainWindow * win, gchar * title, gchar * enabledKey, gchar * speedKey, JsonArray * ids) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgClient *client = priv->client; JsonObject *current = NULL; GtkTreeIter iter; GtkWidget *toplevel, *menu, *item; gint64 limit; if (ids) get_torrent_data(trg_client_get_torrent_table(client), priv->selectedTorrentId, ¤t, &iter); else current = trg_client_get_session(client); limit = json_object_get_boolean_member(current, enabledKey) ? json_object_get_int_member(current, speedKey) : -1; toplevel = gtk_image_menu_item_new_with_label(GTK_STOCK_NETWORK); gtk_image_menu_item_set_use_stock(GTK_IMAGE_MENU_ITEM(toplevel), TRUE); gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM (toplevel), TRUE); gtk_menu_item_set_label(GTK_MENU_ITEM(toplevel), title); menu = gtk_menu_new(); g_object_set_data_full(G_OBJECT(menu), "speedKey", g_strdup(speedKey), g_free); g_object_set_data_full(G_OBJECT(menu), "enabledKey", g_strdup(enabledKey), g_free); g_object_set_data_full(G_OBJECT(menu), "limit-ids", ids, (GDestroyNotify) json_array_unref); item = gtk_check_menu_item_new_with_label(_("No Limit")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), limit < 0); g_object_set_data(G_OBJECT(item), "limit", GINT_TO_POINTER(-1)); g_signal_connect(item, "activate", G_CALLBACK(set_limit_cb), win); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_separator_menu_item_new()); limit_item_new(win, menu, limit, 0); limit_item_new(win, menu, limit, 5); limit_item_new(win, menu, limit, 10); limit_item_new(win, menu, limit, 25); limit_item_new(win, menu, limit, 50); limit_item_new(win, menu, limit, 75); limit_item_new(win, menu, limit, 100); limit_item_new(win, menu, limit, 150); limit_item_new(win, menu, limit, 200); limit_item_new(win, menu, limit, 300); limit_item_new(win, menu, limit, 400); limit_item_new(win, menu, limit, 500); limit_item_new(win, menu, limit, 750); limit_item_new(win, menu, limit, 1024); limit_item_new(win, menu, limit, 1280); limit_item_new(win, menu, limit, 1536); limit_item_new(win, menu, limit, 2048); limit_item_new(win, menu, limit, 2560); limit_item_new(win, menu, limit, 3072); gtk_menu_item_set_submenu(GTK_MENU_ITEM(toplevel), menu); return toplevel; } static void exec_cmd_cb(GtkWidget * w, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); JsonObject *cmd_obj = (JsonObject *) g_object_get_data(G_OBJECT(w), "cmd-object"); GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->torrentTreeView)); GtkTreeModel *model; GList *selectedRows = gtk_tree_selection_get_selected_rows(selection, &model); GError *cmd_error = NULL; gchar *cmd_line = NULL; gchar **argv = NULL; cmd_line = build_remote_exec_cmd(priv->client, model, selectedRows, json_object_get_string_member(cmd_obj, TRG_PREFS_KEY_EXEC_COMMANDS_SUBKEY_CMD)); g_debug("Exec: %s", cmd_line); if (!cmd_line) return; /* GTK has bug, won't let you pass a string here containing a quoted param, so use parse and then spawn * rather than g_spawn_command_line_async(cmd_line,&cmd_error); */ g_shell_parse_argv(cmd_line, NULL, &argv, NULL); g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &cmd_error); g_list_foreach(selectedRows, (GFunc) gtk_tree_path_free, NULL); g_list_free(selectedRows); if (argv) g_strfreev(argv); g_free(cmd_line); if (cmd_error) { GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(win), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", cmd_error->message); gtk_window_set_title(GTK_WINDOW(dialog), _("Error")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); g_error_free(cmd_error); } } static void trg_torrent_tv_view_menu(GtkWidget * treeview, GdkEventButton * event, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgPrefs *prefs = trg_client_get_prefs(priv->client); GtkWidget *menu; gint n_cmds; JsonArray *ids; JsonArray *cmds; menu = gtk_menu_new(); ids = build_json_id_array(TRG_TORRENT_TREE_VIEW(treeview)); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Properties"), GTK_STOCK_PROPERTIES, TRUE, G_CALLBACK(open_props_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Copy Magnet Link"), GTK_STOCK_COPY, TRUE, G_CALLBACK(copy_magnetlink_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Resume"), GTK_STOCK_MEDIA_PLAY, TRUE, G_CALLBACK(resume_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Pause"), GTK_STOCK_MEDIA_PAUSE, TRUE, G_CALLBACK(pause_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Verify"), GTK_STOCK_REFRESH, TRUE, G_CALLBACK(verify_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Re-announce"), GTK_STOCK_REFRESH, TRUE, G_CALLBACK(reannounce_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Move"), GTK_STOCK_HARDDISK, TRUE, G_CALLBACK(move_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Remove"), GTK_STOCK_REMOVE, TRUE, G_CALLBACK(remove_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Remove and delete data"), GTK_STOCK_DELETE, TRUE, G_CALLBACK(delete_cb), win); cmds = trg_prefs_get_array(prefs, TRG_PREFS_KEY_EXEC_COMMANDS, TRG_PREFS_CONNECTION); n_cmds = json_array_get_length(cmds); if (n_cmds > 0) { GList *cmds_list = json_array_get_elements(cmds); GtkMenuShell *cmds_shell; GList *cmds_li; if (n_cmds < 3) { gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_separator_menu_item_new()); cmds_shell = GTK_MENU_SHELL(menu); } else { GtkImageMenuItem *cmds_menu = GTK_IMAGE_MENU_ITEM(gtk_image_menu_item_new_with_label (GTK_STOCK_EXECUTE)); gtk_image_menu_item_set_use_stock(cmds_menu, TRUE); gtk_image_menu_item_set_always_show_image(cmds_menu, TRUE); gtk_menu_item_set_label(GTK_MENU_ITEM(cmds_menu), _("Actions")); cmds_shell = GTK_MENU_SHELL(gtk_menu_new()); gtk_menu_item_set_submenu(GTK_MENU_ITEM(cmds_menu), GTK_WIDGET(cmds_shell)); gtk_menu_shell_append(GTK_MENU_SHELL(menu), GTK_WIDGET(cmds_menu)); } for (cmds_li = cmds_list; cmds_li; cmds_li = g_list_next(cmds_li)) { JsonObject *cmd_obj = json_node_get_object((JsonNode *) cmds_li->data); const gchar *cmd_label = json_object_get_string_member(cmd_obj, "label"); GtkWidget *item = trg_imagemenuitem_new(cmds_shell, cmd_label, GTK_STOCK_EXECUTE, TRUE, G_CALLBACK (exec_cmd_cb), win); g_object_set_data(G_OBJECT(item), "cmd-object", cmd_obj); } g_list_free(cmds_list); } gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_separator_menu_item_new()); if (priv->queuesEnabled) { trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Start Now"), GTK_STOCK_MEDIA_PLAY, TRUE, G_CALLBACK(start_now_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Move Up Queue"), GTK_STOCK_GO_UP, TRUE, G_CALLBACK(up_queue_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Move Down Queue"), GTK_STOCK_GO_DOWN, TRUE, G_CALLBACK(down_queue_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Bottom Of Queue"), GTK_STOCK_GOTO_BOTTOM, TRUE, G_CALLBACK(bottom_queue_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Top Of Queue"), GTK_STOCK_GOTO_TOP, TRUE, G_CALLBACK(top_queue_cb), win); gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_separator_menu_item_new()); } gtk_menu_shell_append(GTK_MENU_SHELL(menu), limit_menu_new(win, _("Down Limit"), FIELD_DOWNLOAD_LIMITED, FIELD_DOWNLOAD_LIMIT, ids)); gtk_menu_shell_append(GTK_MENU_SHELL(menu), limit_menu_new(win, _("Up Limit"), FIELD_UPLOAD_LIMITED, FIELD_UPLOAD_LIMIT, ids)); gtk_menu_shell_append(GTK_MENU_SHELL(menu), priority_menu_new(win, ids)); gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, (event != NULL) ? event->button : 0, gdk_event_get_time((GdkEvent *) event)); } static GtkMenu *trg_status_icon_view_menu(TrgMainWindow * win, const gchar * msg) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgPrefs *prefs = trg_client_get_prefs(priv->client); gboolean connected = trg_client_is_connected(priv->client); GtkWidget *menu, *connect; menu = gtk_menu_new(); priv->iconStatusItem = gtk_menu_item_new_with_label(msg); gtk_widget_set_sensitive(priv->iconStatusItem, FALSE); gtk_menu_shell_append(GTK_MENU_SHELL(menu), priv->iconStatusItem); if (connected) { priv->iconDownloadingItem = gtk_menu_item_new_with_label(_("Updating...")); gtk_widget_set_visible(priv->iconDownloadingItem, FALSE); gtk_widget_set_sensitive(priv->iconDownloadingItem, FALSE); gtk_menu_shell_append(GTK_MENU_SHELL(menu), priv->iconDownloadingItem); priv->iconSeedingItem = gtk_menu_item_new_with_label(_("Updating...")); gtk_widget_set_visible(priv->iconSeedingItem, FALSE); gtk_widget_set_sensitive(priv->iconSeedingItem, FALSE); gtk_menu_shell_append(GTK_MENU_SHELL(menu), priv->iconSeedingItem); } priv->iconSepItem = gtk_separator_menu_item_new(); gtk_widget_set_sensitive(priv->iconSepItem, FALSE); gtk_menu_shell_append(GTK_MENU_SHELL(menu), priv->iconSepItem); connect = gtk_image_menu_item_new_with_label(GTK_STOCK_CONNECT); gtk_image_menu_item_set_use_stock(GTK_IMAGE_MENU_ITEM(connect), TRUE); gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM(connect), TRUE); gtk_menu_item_set_label(GTK_MENU_ITEM(connect), _("Connect")); gtk_menu_item_set_submenu(GTK_MENU_ITEM(connect), trg_menu_bar_file_connect_menu_new(win, prefs)); gtk_menu_shell_append(GTK_MENU_SHELL(menu), connect); if (connected) { trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Disconnect"), GTK_STOCK_DISCONNECT, connected, G_CALLBACK(disconnect_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Add"), GTK_STOCK_ADD, connected, G_CALLBACK(add_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Add from URL"), GTK_STOCK_ADD, connected, G_CALLBACK(add_url_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Resume All"), GTK_STOCK_MEDIA_PLAY, connected, G_CALLBACK(resume_all_cb), win); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Pause All"), GTK_STOCK_MEDIA_PAUSE, connected, G_CALLBACK(pause_all_cb), win); gtk_menu_shell_append(GTK_MENU_SHELL(menu), limit_menu_new(win, _("Down Limit"), SGET_SPEED_LIMIT_DOWN_ENABLED, SGET_SPEED_LIMIT_DOWN, NULL)); gtk_menu_shell_append(GTK_MENU_SHELL(menu), limit_menu_new(win, _("Up Limit"), SGET_SPEED_LIMIT_UP_ENABLED, SGET_SPEED_LIMIT_UP, NULL)); } gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_separator_menu_item_new()); trg_imagemenuitem_new(GTK_MENU_SHELL(menu), _("Quit"), GTK_STOCK_QUIT, TRUE, G_CALLBACK(quit_cb), win); gtk_widget_show_all(menu); return GTK_MENU(menu); } static gboolean torrent_tv_button_pressed_cb(GtkWidget * treeview, GdkEventButton * event, gpointer userdata) { GtkTreeSelection *selection; GtkTreePath *path; if (event->type == GDK_BUTTON_PRESS && event->button == 3) { selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), (gint) event->x, (gint) event->y, &path, NULL, NULL, NULL)) { if (!gtk_tree_selection_path_is_selected(selection, path)) { gtk_tree_selection_unselect_all(selection); gtk_tree_selection_select_path(selection, path); } gtk_tree_path_free(path); trg_torrent_tv_view_menu(treeview, event, userdata); return TRUE; } } return FALSE; } static gboolean torrent_tv_popup_menu_cb(GtkWidget * treeview, gpointer userdata) { trg_torrent_tv_view_menu(treeview, NULL, userdata); return TRUE; } static void trg_main_window_set_hidden_to_tray(TrgMainWindow * win, gboolean hidden) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (hidden) { gtk_widget_hide(GTK_WIDGET(win)); } else { gtk_window_deiconify(GTK_WINDOW(win)); gtk_window_present(GTK_WINDOW(win)); if (priv->timerId > 0) { g_source_remove(priv->timerId); dispatch_async(priv->client, torrent_get(TORRENT_GET_TAG_MODE_FULL), on_torrent_get_update, win); } } priv->hidden = hidden; } static gboolean window_state_event(TrgMainWindow * win, GdkEventWindowState * event, gpointer trayIcon) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgPrefs *prefs = trg_client_get_prefs(priv->client); if (priv->statusIcon && (event->changed_mask & GDK_WINDOW_STATE_ICONIFIED) && (event->new_window_state & GDK_WINDOW_STATE_ICONIFIED) && trg_prefs_get_bool(prefs, TRG_PREFS_KEY_SYSTEM_TRAY_MINIMISE, TRG_PREFS_GLOBAL)) { trg_main_window_set_hidden_to_tray(win, TRUE); return TRUE; } return FALSE; } void trg_main_window_remove_status_icon(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); #ifdef HAVE_LIBAPPINDICATOR if (priv->appIndicator) { g_object_unref(G_OBJECT(priv->appIndicator)); priv->appIndicator = NULL; } else { #else if (1) { #endif if (priv->statusIcon) g_object_unref(G_OBJECT(priv->statusIcon)); priv->statusIcon = NULL; } } #if TRG_WITH_GRAPH void trg_main_window_add_graph(TrgMainWindow * win, gboolean show) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); priv->graph = trg_torrent_graph_new(gtk_widget_get_style(priv->notebook)); priv->graphNotebookIndex = gtk_notebook_append_page(GTK_NOTEBOOK(priv->notebook), GTK_WIDGET(priv->graph), gtk_label_new(_("Graph"))); if (show) gtk_widget_show_all(priv->notebook); trg_torrent_graph_start(priv->graph); } void trg_main_window_remove_graph(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if (priv->graphNotebookIndex >= 0) { gtk_notebook_remove_page(GTK_NOTEBOOK(priv->notebook), priv->graphNotebookIndex); priv->graphNotebookIndex = -1; } } #endif /*static gboolean status_icon_size_changed(GtkStatusIcon *status_icon, gint size, gpointer user_data) { gtk_status_icon_set_from_icon_name(status_icon, PACKAGE_NAME); return TRUE; }*/ void trg_main_window_add_status_icon(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); #ifdef HAVE_LIBAPPINDICATOR if ((priv->appIndicator = app_indicator_new(PACKAGE_NAME, PACKAGE_NAME, APP_INDICATOR_CATEGORY_APPLICATION_STATUS))) { app_indicator_set_status(priv->appIndicator, APP_INDICATOR_STATUS_ACTIVE); app_indicator_set_menu(priv->appIndicator, trg_status_icon_view_menu(win, NULL)); } else { #else if (1) { #endif priv->statusIcon = gtk_status_icon_new_from_icon_name(PACKAGE_NAME); gtk_status_icon_set_screen(priv->statusIcon, gtk_window_get_screen(GTK_WINDOW(win))); g_signal_connect(priv->statusIcon, "activate", G_CALLBACK(status_icon_activated), win); g_signal_connect(priv->statusIcon, "button-press-event", G_CALLBACK(status_icon_button_press_event), win); g_signal_connect(priv->statusIcon, "popup-menu", G_CALLBACK(trg_status_icon_popup_menu_cb), win); gtk_status_icon_set_visible(priv->statusIcon, TRUE); } connchange_whatever_statusicon(win, trg_client_is_connected(priv->client)); } TrgStateSelector *trg_main_window_get_state_selector(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); return priv->stateSelector; } /* Couldn't find a way to get the width/height on exit, so save the * values of this event for when that happens. */ static gboolean trg_main_window_config_event(TrgMainWindow * win, GdkEvent * event, gpointer user_data G_GNUC_UNUSED) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); priv->width = event->configure.width; priv->height = event->configure.height; return FALSE; } static void trg_client_session_updated_cb(TrgClient * tc, JsonObject * session, TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); gboolean queuesEnabled; trg_status_bar_session_update(priv->statusBar, session); if (json_object_has_member(session, SGET_DOWNLOAD_QUEUE_ENABLED)) { queuesEnabled = json_object_get_boolean_member(session, SGET_DOWNLOAD_QUEUE_ENABLED) || json_object_get_boolean_member(session, SGET_SEED_QUEUE_ENABLED); } else { queuesEnabled = FALSE; } if (priv->queuesEnabled != queuesEnabled) { trg_menu_bar_set_supports_queues(priv->menuBar, queuesEnabled); trg_state_selector_set_queues_enabled(priv->stateSelector, queuesEnabled); } priv->queuesEnabled = queuesEnabled; } /* Drag & Drop support */ static GtkTargetEntry target_list[] = { /* datatype (string), restrictions on DnD (GtkTargetFlags), datatype (int) */ {"text/uri-list", GTK_TARGET_OTHER_APP | GTK_TARGET_OTHER_WIDGET, 0} }; static guint n_targets = G_N_ELEMENTS(target_list); static void on_dropped_file(GtkWidget * widget, GdkDragContext * context, gint x, gint y, GtkSelectionData * data, guint info, guint time, gpointer user_data) { TrgMainWindow *win = user_data; if ((gtk_selection_data_get_length(data) >= 0) && (gtk_selection_data_get_format(data) == 8)) { gchar **uri_list = gtk_selection_data_get_uris(data); guint num_files = g_strv_length(uri_list); gchar **file_list = g_new0(gchar *, num_files + 1); int i; for (i = 0; i < num_files; i++) file_list[i] = g_filename_from_uri(uri_list[i], NULL, NULL); g_strfreev(uri_list); gtk_drag_finish(context, TRUE, FALSE, time); trg_add_from_filename(win, file_list); } else { gtk_drag_finish(context, FALSE, FALSE, time); } } static gboolean window_key_press_handler(GtkWidget * widget, GdkEvent * event, gpointer user_data) { TrgMainWindow *win = TRG_MAIN_WINDOW(widget); TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); if ((event->key.state & GDK_CONTROL_MASK) && event->key.keyval == GDK_k) { gtk_widget_grab_focus(priv->filterEntry); return TRUE; } return FALSE; } static GObject *trg_main_window_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { TrgMainWindow *self = TRG_MAIN_WINDOW(G_OBJECT_CLASS (trg_main_window_parent_class)-> constructor(type, n_construct_properties, construct_params)); TrgMainWindowPrivate *priv = G_TYPE_INSTANCE_GET_PRIVATE(self, TRG_TYPE_MAIN_WINDOW, TrgMainWindowPrivate); GtkWidget *w; GtkWidget *outerVbox; GtkWidget *toolbarHbox; //GtkWidget *outerAlignment; GtkIconTheme *theme; gint width, height, pos; gboolean tray; TrgPrefs *prefs; priv->queuesEnabled = TRUE; prefs = trg_client_get_prefs(priv->client); theme = gtk_icon_theme_get_default(); register_my_icons(theme); #ifdef HAVE_LIBNOTIFY notify_init(PACKAGE_NAME); #endif gtk_window_set_default_icon_name(PACKAGE_NAME); gtk_window_set_title(GTK_WINDOW(self), _("Transmission Remote")); gtk_window_set_default_size(GTK_WINDOW(self), 1000, 600); g_signal_connect(G_OBJECT(self), "delete-event", G_CALLBACK(delete_event), NULL); g_signal_connect(G_OBJECT(self), "destroy", G_CALLBACK(destroy_window), NULL); g_signal_connect(G_OBJECT(self), "window-state-event", G_CALLBACK(window_state_event), NULL); g_signal_connect(G_OBJECT(self), "configure-event", G_CALLBACK(trg_main_window_config_event), NULL); g_signal_connect(G_OBJECT(self), "key-press-event", G_CALLBACK(window_key_press_handler), NULL); priv->torrentModel = trg_torrent_model_new(); trg_client_set_torrent_table(priv->client, get_torrent_table(priv->torrentModel)); g_signal_connect(priv->torrentModel, "torrent-completed", G_CALLBACK(on_torrent_completed), self); g_signal_connect(priv->torrentModel, "torrent-added", G_CALLBACK(on_torrent_added), self); priv->sortedTorrentModel = gtk_tree_model_sort_new_with_model(GTK_TREE_MODEL (priv->torrentModel)); priv->filteredTorrentModel = trg_sortable_filtered_model_new(GTK_TREE_SORTABLE (priv->sortedTorrentModel), NULL); gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER (priv->filteredTorrentModel), trg_torrent_tree_view_visible_func, self, NULL); priv->torrentTreeView = trg_main_window_torrent_tree_view_new(self, priv-> filteredTorrentModel); g_signal_connect(priv->torrentTreeView, "popup-menu", G_CALLBACK(torrent_tv_popup_menu_cb), self); g_signal_connect(priv->torrentTreeView, "button-press-event", G_CALLBACK(torrent_tv_button_pressed_cb), self); g_signal_connect(priv->torrentTreeView, "row-activated", G_CALLBACK(torrent_tv_onRowActivated), self); outerVbox = trg_vbox_new(FALSE, 0); /* Create a GtkAlignment to hold the outerVbox making possible * some padding. */ //outerAlignment = gtk_alignment_new (0.5f, 0.5f, 1.0f, 1.0f); //gtk_alignment_set_padding (GTK_ALIGNMENT (outerAlignment), 0, 0, 0, 0); //gtk_container_add (GTK_CONTAINER (outerAlignment), outerVbox); gtk_container_add(GTK_CONTAINER(self), outerVbox); priv->menuBar = trg_main_window_menu_bar_new(self); gtk_box_pack_start(GTK_BOX(outerVbox), GTK_WIDGET(priv->menuBar), FALSE, FALSE, 0); toolbarHbox = trg_hbox_new(FALSE, 0); priv->toolBar = trg_main_window_toolbar_new(self); gtk_box_pack_start(GTK_BOX(toolbarHbox), GTK_WIDGET(priv->toolBar), TRUE, TRUE, 0); w = gtk_entry_new(); gtk_entry_set_icon_from_stock(GTK_ENTRY(w), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CLEAR); g_signal_connect(w, "icon-release", G_CALLBACK(clear_filter_entry_cb), NULL); gtk_box_pack_start(GTK_BOX(toolbarHbox), w, FALSE, FALSE, 0); g_object_set(w, "secondary-icon-sensitive", FALSE, NULL); priv->filterEntry = w; g_signal_connect(G_OBJECT(priv->filterEntry), "changed", G_CALLBACK(entry_filter_changed_cb), self); gtk_box_pack_start(GTK_BOX(outerVbox), GTK_WIDGET(toolbarHbox), FALSE, FALSE, 0); priv->hpaned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL); priv->vpaned = gtk_paned_new(GTK_ORIENTATION_VERTICAL); gtk_box_pack_start(GTK_BOX(outerVbox), priv->vpaned, TRUE, TRUE, 0); gtk_paned_pack1(GTK_PANED(priv->vpaned), priv->hpaned, TRUE, TRUE); priv->stateSelector = trg_state_selector_new(priv->client, priv->torrentModel); priv->stateSelectorScroller = my_scrolledwin_new(GTK_WIDGET(priv->stateSelector)); gtk_paned_pack1(GTK_PANED(priv->hpaned), priv->stateSelectorScroller, FALSE, FALSE); gtk_paned_pack2(GTK_PANED(priv->hpaned), my_scrolledwin_new(GTK_WIDGET (priv-> torrentTreeView)), TRUE, TRUE); g_signal_connect(G_OBJECT(priv->stateSelector), "torrent-state-changed", G_CALLBACK(torrent_state_selection_changed), priv->filteredTorrentModel); priv->notebook = trg_main_window_notebook_new(self); gtk_paned_pack2(GTK_PANED(priv->vpaned), priv->notebook, FALSE, FALSE); tray = trg_prefs_get_bool(prefs, TRG_PREFS_KEY_SYSTEM_TRAY, TRG_PREFS_GLOBAL); if (tray) trg_main_window_add_status_icon(self); else trg_main_window_remove_status_icon(self); priv->statusBar = trg_status_bar_new(self, priv->client); g_signal_connect(priv->client, "session-updated", G_CALLBACK(trg_client_session_updated_cb), self); gtk_box_pack_start(GTK_BOX(outerVbox), GTK_WIDGET(priv->statusBar), FALSE, FALSE, 2); width = trg_prefs_get_int(prefs, TRG_PREFS_KEY_WINDOW_WIDTH, TRG_PREFS_GLOBAL); height = trg_prefs_get_int(prefs, TRG_PREFS_KEY_WINDOW_HEIGHT, TRG_PREFS_GLOBAL); pos = trg_prefs_get_int(prefs, TRG_PREFS_KEY_NOTEBOOK_PANED_POS, TRG_PREFS_GLOBAL); if (width > 0 && height > 0) gtk_window_set_default_size(GTK_WINDOW(self), width, height); else if (pos < 1) gtk_paned_set_position(GTK_PANED(priv->vpaned), 300); if (pos > 0) gtk_paned_set_position(GTK_PANED(priv->vpaned), pos); gtk_widget_show_all(GTK_WIDGET(self)); trg_widget_set_visible(priv->stateSelectorScroller, trg_prefs_get_bool(prefs, TRG_PREFS_KEY_SHOW_STATE_SELECTOR, TRG_PREFS_GLOBAL)); trg_widget_set_visible(priv->notebook, trg_prefs_get_bool(prefs, TRG_PREFS_KEY_SHOW_NOTEBOOK, TRG_PREFS_GLOBAL)); pos = trg_prefs_get_int(prefs, TRG_PREFS_KEY_STATES_PANED_POS, TRG_PREFS_GLOBAL); if (pos > 0) gtk_paned_set_position(GTK_PANED(priv->hpaned), pos); if (tray && priv->min_on_start) trg_main_window_set_hidden_to_tray(self, TRUE); /* Drag and Drop */ gtk_drag_dest_set(GTK_WIDGET(self), /* widget that will accept a drop */ GTK_DEST_DEFAULT_ALL, /* default actions for dest on DnD */ target_list, /* lists of target to support */ n_targets, /* size of list */ GDK_ACTION_MOVE /* what to do with data after dropped */ /* | GDK_ACTION_COPY ... seems that file managers only need ACTION_MOVE, not ACTION_COPY */ ); g_signal_connect(self, "drag-data-received", G_CALLBACK(on_dropped_file), self); return G_OBJECT(self); } static void trg_main_window_class_init(TrgMainWindowClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->constructor = trg_main_window_constructor; object_class->get_property = trg_main_window_get_property; object_class->set_property = trg_main_window_set_property; g_object_class_install_property(object_class, PROP_CLIENT, g_param_spec_pointer("trg-client", "TClient", "Client", G_PARAM_READWRITE| G_PARAM_CONSTRUCT_ONLY| G_PARAM_STATIC_STRINGS)); g_object_class_install_property(object_class, PROP_MINIMISE_ON_START, g_param_spec_boolean("min-on-start", "Min On Start", "Min On Start", FALSE, G_PARAM_READWRITE| G_PARAM_CONSTRUCT_ONLY| G_PARAM_STATIC_STRINGS)); } void trg_main_window_set_start_args(TrgMainWindow * win, gchar ** args) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); priv->args = args; } void auto_connect_if_required(TrgMainWindow * win) { TrgMainWindowPrivate *priv = trg_main_window_get_instance_private(win); TrgPrefs *prefs = trg_client_get_prefs(priv->client); gchar *host = trg_prefs_get_string(prefs, TRG_PREFS_KEY_HOSTNAME, TRG_PREFS_PROFILE); if (host) { gint len = strlen(host); g_free(host); if (len > 0 && trg_prefs_get_bool(prefs, TRG_PREFS_KEY_AUTO_CONNECT, TRG_PREFS_PROFILE)) { connect_cb(NULL, win); } } } TrgMainWindow *trg_main_window_new(TrgClient * tc, gboolean minonstart) { return g_object_new(TRG_TYPE_MAIN_WINDOW, "trg-client", tc, "min-on-start", minonstart, NULL); } transmission-remote-gtk-1.4.1/src/trg-main-window.h000066400000000000000000000047531341276053300223220ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once #include #include #include "trg-torrent-model.h" #include "trg-peers-model.h" #include "trg-files-model.h" #include "trg-trackers-model.h" #include "trg-general-panel.h" #include "trg-torrent-tree-view.h" #include "trg-client.h" G_BEGIN_DECLS #define TRG_TYPE_MAIN_WINDOW (trg_main_window_get_type()) G_DECLARE_FINAL_TYPE (TrgMainWindow, trg_main_window, TRG, MAIN_WINDOW, GtkApplicationWindow) #define TORRENT_COMPLETE_NOTIFY_TMOUT 8000 #define TORRENT_ADD_NOTIFY_TMOUT 3000 gint trg_add_from_filename(TrgMainWindow * win, gchar ** uris); gboolean on_session_set(gpointer data); gboolean on_delete_complete(gpointer data); void on_generic_interactive_action(TrgMainWindow *win, trg_response *response); gboolean on_generic_interactive_action_response(gpointer data); void auto_connect_if_required(TrgMainWindow * win); void trg_main_window_set_start_args(TrgMainWindow * win, gchar ** args); TrgMainWindow *trg_main_window_new(TrgClient * tc, gboolean minonstart); void trg_main_window_add_status_icon(TrgMainWindow * win); void trg_main_window_remove_status_icon(TrgMainWindow * win); void trg_main_window_add_graph(TrgMainWindow * win, gboolean show); void trg_main_window_remove_graph(TrgMainWindow * win); TrgStateSelector *trg_main_window_get_state_selector(TrgMainWindow * win); gint trg_mw_get_selected_torrent_id(TrgMainWindow * win); GtkTreeModel *trg_main_window_get_torrent_model(TrgMainWindow * win); void trg_main_window_notebook_set_visible(TrgMainWindow * win, gboolean visible); void connect_cb(GtkWidget * w, gpointer data); void trg_main_window_reload_dir_aliases(TrgMainWindow * win); G_END_DECLS transmission-remote-gtk-1.4.1/src/trg-menu-bar.c000066400000000000000000001227011341276053300215640ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "trg-prefs.h" #include "trg-torrent-graph.h" #include "trg-tree-view.h" #include "trg-torrent-tree-view.h" #include "trg-main-window.h" #include "trg-menu-bar.h" enum { PROP_0, PROP_CONNECT_BUTTON, PROP_DISCONNECT_BUTTON, PROP_ADD_BUTTON, PROP_ADD_URL_BUTTON, PROP_REMOVE_BUTTON, PROP_DELETE_BUTTON, PROP_RESUME_BUTTON, PROP_RESUME_ALL_BUTTON, PROP_PAUSE_BUTTON, PROP_PAUSE_ALL_BUTTON, PROP_VERIFY_BUTTON, PROP_REANNOUNCE_BUTTON, PROP_PROPS_BUTTON, PROP_COPYMAGNET_BUTTON, PROP_MOVE_BUTTON, PROP_REMOTE_PREFS_BUTTON, PROP_LOCAL_PREFS_BUTTON, PROP_ABOUT_BUTTON, PROP_VIEW_STATS_BUTTON, #ifdef HAVE_RSS PROP_VIEW_RSS_BUTTON, #endif PROP_VIEW_STATES_BUTTON, PROP_VIEW_NOTEBOOK_BUTTON, PROP_QUIT, PROP_PREFS, PROP_MAIN_WINDOW, PROP_TORRENT_TREE_VIEW, PROP_ACCEL_GROUP, PROP_DIR_FILTERS, PROP_TRACKER_FILTERS, PROP_DIRECTORIES_FIRST, #if TRG_WITH_GRAPH PROP_VIEW_SHOW_GRAPH, #endif PROP_MOVE_DOWN_QUEUE, PROP_MOVE_UP_QUEUE, PROP_MOVE_BOTTOM_QUEUE, PROP_MOVE_TOP_QUEUE, PROP_START_NOW }; #define G_DATAKEY_CONF_KEY "conf-key" #define G_DATAKEY_PREF_VALUE "pref-index" G_DEFINE_TYPE(TrgMenuBar, trg_menu_bar, GTK_TYPE_MENU_BAR) #define TRG_MENU_BAR_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_MENU_BAR, TrgMenuBarPrivate)) typedef struct _TrgMenuBarPrivate TrgMenuBarPrivate; struct _TrgMenuBarPrivate { GtkWidget *mb_connect; GtkWidget *mb_disconnect; GtkWidget *mb_add; GtkWidget *mb_add_url; GtkWidget *mb_move; GtkWidget *mb_remove; GtkWidget *mb_delete; GtkWidget *mb_resume; GtkWidget *mb_pause; GtkWidget *mb_resume_all; GtkWidget *mb_pause_all; GtkWidget *mb_verify; GtkWidget *mb_reannounce; GtkWidget *mb_props; GtkWidget *mb_copy_magnetlink; GtkWidget *mb_local_prefs; GtkWidget *mb_remote_prefs; GtkWidget *mb_view_states; GtkWidget *mb_view_notebook; GtkWidget *mb_view_stats; #ifdef HAVE_RSS GtkWidget *mb_view_rss; #endif GtkWidget *mb_about; GtkWidget *mb_quit; GtkWidget *mb_directory_filters; GtkWidget *mb_tracker_filters; GtkWidget *mb_directory_first; #if TRG_WITH_GRAPH GtkWidget *mb_view_graph; #endif GtkWidget *mb_down_queue; GtkWidget *mb_up_queue; GtkWidget *mb_bottom_queue; GtkWidget *mb_top_queue; GtkWidget *mb_start_now; GtkWidget *mb_queues_seperator; GtkWidget *mb_view_classic; GtkWidget *mb_view_transmission; GtkWidget *mb_view_transmission_compact; GtkAccelGroup *accel_group; TrgPrefs *prefs; TrgMainWindow *main_window; TrgTorrentTreeView *torrent_tree_view; }; void trg_menu_bar_set_supports_queues(TrgMenuBar * mb, gboolean supportsQueues) { TrgMenuBarPrivate *priv = TRG_MENU_BAR_GET_PRIVATE(mb); gtk_widget_set_visible(priv->mb_down_queue, supportsQueues); gtk_widget_set_visible(priv->mb_up_queue, supportsQueues); gtk_widget_set_visible(priv->mb_top_queue, supportsQueues); gtk_widget_set_visible(priv->mb_bottom_queue, supportsQueues); gtk_widget_set_visible(priv->mb_queues_seperator, supportsQueues); gtk_widget_set_visible(priv->mb_start_now, supportsQueues); } void trg_menu_bar_connected_change(TrgMenuBar * mb, gboolean connected) { TrgMenuBarPrivate *priv = TRG_MENU_BAR_GET_PRIVATE(mb); gtk_widget_set_sensitive(priv->mb_add, connected); gtk_widget_set_sensitive(priv->mb_add_url, connected); gtk_widget_set_sensitive(priv->mb_disconnect, connected); gtk_widget_set_sensitive(priv->mb_remote_prefs, connected); gtk_widget_set_sensitive(priv->mb_view_stats, connected); #ifdef HAVE_RSS gtk_widget_set_sensitive(priv->mb_view_rss, connected); #endif gtk_widget_set_sensitive(priv->mb_resume_all, connected); gtk_widget_set_sensitive(priv->mb_pause_all, connected); } void trg_menu_bar_torrent_actions_sensitive(TrgMenuBar * mb, gboolean sensitive) { TrgMenuBarPrivate *priv = TRG_MENU_BAR_GET_PRIVATE(mb); gtk_widget_set_sensitive(priv->mb_props, sensitive); gtk_widget_set_sensitive(priv->mb_copy_magnetlink, sensitive); gtk_widget_set_sensitive(priv->mb_remove, sensitive); gtk_widget_set_sensitive(priv->mb_delete, sensitive); gtk_widget_set_sensitive(priv->mb_resume, sensitive); gtk_widget_set_sensitive(priv->mb_pause, sensitive); gtk_widget_set_sensitive(priv->mb_verify, sensitive); gtk_widget_set_sensitive(priv->mb_reannounce, sensitive); gtk_widget_set_sensitive(priv->mb_move, sensitive); gtk_widget_set_sensitive(priv->mb_start_now, sensitive); gtk_widget_set_sensitive(priv->mb_up_queue, sensitive); gtk_widget_set_sensitive(priv->mb_down_queue, sensitive); gtk_widget_set_sensitive(priv->mb_top_queue, sensitive); gtk_widget_set_sensitive(priv->mb_bottom_queue, sensitive); } static void trg_menu_bar_set_property(GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec G_GNUC_UNUSED) { TrgMenuBarPrivate *priv = TRG_MENU_BAR_GET_PRIVATE(object); switch (prop_id) { case PROP_ACCEL_GROUP: priv->accel_group = g_value_get_object(value); break; case PROP_PREFS: priv->prefs = g_value_get_object(value); break; case PROP_MAIN_WINDOW: priv->main_window = g_value_get_object(value); break; case PROP_TORRENT_TREE_VIEW: priv->torrent_tree_view = g_value_get_object(value); break; } } static void trg_menu_bar_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgMenuBarPrivate *priv = TRG_MENU_BAR_GET_PRIVATE(object); switch (property_id) { case PROP_CONNECT_BUTTON: g_value_set_object(value, priv->mb_connect); break; case PROP_DISCONNECT_BUTTON: g_value_set_object(value, priv->mb_disconnect); break; case PROP_ADD_BUTTON: g_value_set_object(value, priv->mb_add); break; case PROP_ADD_URL_BUTTON: g_value_set_object(value, priv->mb_add_url); break; case PROP_REMOVE_BUTTON: g_value_set_object(value, priv->mb_remove); break; case PROP_DELETE_BUTTON: g_value_set_object(value, priv->mb_delete); break; case PROP_MOVE_UP_QUEUE: g_value_set_object(value, priv->mb_up_queue); break; case PROP_MOVE_DOWN_QUEUE: g_value_set_object(value, priv->mb_down_queue); break; case PROP_MOVE_TOP_QUEUE: g_value_set_object(value, priv->mb_top_queue); break; case PROP_MOVE_BOTTOM_QUEUE: g_value_set_object(value, priv->mb_bottom_queue); break; case PROP_START_NOW: g_value_set_object(value, priv->mb_start_now); break; case PROP_MOVE_BUTTON: g_value_set_object(value, priv->mb_move); break; case PROP_RESUME_BUTTON: g_value_set_object(value, priv->mb_resume); break; case PROP_RESUME_ALL_BUTTON: g_value_set_object(value, priv->mb_resume_all); break; case PROP_PAUSE_BUTTON: g_value_set_object(value, priv->mb_pause); break; case PROP_PAUSE_ALL_BUTTON: g_value_set_object(value, priv->mb_pause_all); break; case PROP_VERIFY_BUTTON: g_value_set_object(value, priv->mb_verify); break; case PROP_REANNOUNCE_BUTTON: g_value_set_object(value, priv->mb_reannounce); break; case PROP_PROPS_BUTTON: g_value_set_object(value, priv->mb_props); break; case PROP_COPYMAGNET_BUTTON: g_value_set_object(value, priv->mb_copy_magnetlink); break; case PROP_REMOTE_PREFS_BUTTON: g_value_set_object(value, priv->mb_remote_prefs); break; case PROP_LOCAL_PREFS_BUTTON: g_value_set_object(value, priv->mb_local_prefs); break; case PROP_ABOUT_BUTTON: g_value_set_object(value, priv->mb_about); break; #if TRG_WITH_GRAPH case PROP_VIEW_SHOW_GRAPH: g_value_set_object(value, priv->mb_view_graph); break; #endif case PROP_VIEW_STATES_BUTTON: g_value_set_object(value, priv->mb_view_states); break; case PROP_VIEW_NOTEBOOK_BUTTON: g_value_set_object(value, priv->mb_view_notebook); break; case PROP_VIEW_STATS_BUTTON: g_value_set_object(value, priv->mb_view_stats); break; #ifdef HAVE_RSS case PROP_VIEW_RSS_BUTTON: g_value_set_object(value, priv->mb_view_rss); break; #endif case PROP_QUIT: g_value_set_object(value, priv->mb_quit); break; case PROP_DIR_FILTERS: g_value_set_object(value, priv->mb_directory_filters); break; case PROP_TRACKER_FILTERS: g_value_set_object(value, priv->mb_tracker_filters); break; case PROP_DIRECTORIES_FIRST: g_value_set_object(value, priv->mb_directory_first); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_menu_bar_install_widget_prop(GObjectClass * class, guint propId, const gchar * name, const gchar * nick) { g_object_class_install_property(class, propId, g_param_spec_object(name, nick, nick, GTK_TYPE_WIDGET, G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } GtkWidget *trg_menu_bar_item_new(GtkMenuShell * shell, const gchar * text, const gchar * stock_id, gboolean sensitive) { GtkWidget *item = gtk_image_menu_item_new_with_label(stock_id); gtk_image_menu_item_set_use_stock(GTK_IMAGE_MENU_ITEM(item), TRUE); gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM (item), TRUE); gtk_menu_item_set_use_underline(GTK_MENU_ITEM(item), TRUE); gtk_menu_item_set_label(GTK_MENU_ITEM(item), text); gtk_widget_set_sensitive(item, sensitive); gtk_menu_shell_append(shell, item); return item; } static void trg_menu_bar_accel_add(TrgMenuBar * menu, GtkWidget * item, guint key, GdkModifierType mods) { TrgMenuBarPrivate *priv = TRG_MENU_BAR_GET_PRIVATE(menu); gtk_widget_add_accelerator(item, "activate", priv->accel_group, key, mods, GTK_ACCEL_VISIBLE); } static void view_menu_radio_item_toggled_cb(GtkCheckMenuItem * w, gpointer data) { TrgPrefs *p = TRG_PREFS(data); const gchar *key = (gchar *) g_object_get_data(G_OBJECT(w), G_DATAKEY_CONF_KEY); if (gtk_check_menu_item_get_active(w)) { gint index = GPOINTER_TO_INT(g_object_get_data (G_OBJECT(w), G_DATAKEY_PREF_VALUE)); trg_prefs_set_int(p, key, index, TRG_PREFS_GLOBAL); } } static void view_menu_item_toggled_cb(GtkCheckMenuItem * w, gpointer data) { TrgPrefs *p = TRG_PREFS(data); const gchar *key = (gchar *) g_object_get_data(G_OBJECT(w), G_DATAKEY_CONF_KEY); trg_prefs_set_bool(p, key, gtk_check_menu_item_get_active(w), TRG_PREFS_GLOBAL); } static void view_menu_bar_toggled_dependency_cb(GtkCheckMenuItem * w, gpointer data) { gtk_widget_set_sensitive(GTK_WIDGET(data), gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(w))); } static void trg_menu_bar_view_item_update(TrgPrefs * p, const gchar * updatedKey, gpointer data) { const gchar *key = (gchar *) g_object_get_data(G_OBJECT(data), G_DATAKEY_CONF_KEY); if (!g_strcmp0(updatedKey, key)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), trg_prefs_get_bool(p, key, TRG_PREFS_GLOBAL)); } static void trg_menu_bar_view_radio_item_update(TrgPrefs * p, const gchar * updatedKey, gpointer data) { const gchar *key = (gchar *) g_object_get_data(G_OBJECT(data), G_DATAKEY_CONF_KEY); gint myIndex = GPOINTER_TO_INT(g_object_get_data (G_OBJECT(data), G_DATAKEY_PREF_VALUE)); if (!g_strcmp0(updatedKey, key)) { gboolean shouldBeActive = trg_prefs_get_int(p, key, TRG_PREFS_GLOBAL) == myIndex; if (shouldBeActive != gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(data))) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(data), shouldBeActive); } } static GtkWidget *trg_menu_bar_view_radio_item_new(TrgPrefs * prefs, GSList * group, const gchar * key, gint index, const gchar * label) { GtkWidget *w = gtk_radio_menu_item_new_with_label(group, label); g_object_set_data_full(G_OBJECT(w), G_DATAKEY_CONF_KEY, g_strdup(key), g_free); g_object_set_data(G_OBJECT(w), G_DATAKEY_PREF_VALUE, GINT_TO_POINTER(index)); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w), trg_prefs_get_int(prefs, key, TRG_PREFS_GLOBAL) == (gint64) index); g_signal_connect(w, "toggled", G_CALLBACK(view_menu_radio_item_toggled_cb), prefs); g_signal_connect(prefs, "pref-changed", G_CALLBACK(trg_menu_bar_view_radio_item_update), w); return w; } static GtkWidget *trg_menu_bar_view_item_new(TrgPrefs * prefs, const gchar * key, const gchar * label, GtkWidget * dependency) { GtkWidget *w = gtk_check_menu_item_new_with_label(label); g_object_set_data_full(G_OBJECT(w), G_DATAKEY_CONF_KEY, g_strdup(key), g_free); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w), trg_prefs_get_bool(prefs, key, TRG_PREFS_GLOBAL)); if (dependency) { gtk_widget_set_sensitive(w, gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(dependency))); g_signal_connect(dependency, "toggled", G_CALLBACK(view_menu_bar_toggled_dependency_cb), w); } g_signal_connect(w, "toggled", G_CALLBACK(view_menu_item_toggled_cb), prefs); g_signal_connect(prefs, "pref-changed", G_CALLBACK(trg_menu_bar_view_item_update), w); return w; } static GtkWidget *trg_menu_bar_view_menu_new(TrgMenuBar * mb) { TrgMenuBarPrivate *priv = TRG_MENU_BAR_GET_PRIVATE(mb); GtkWidget *view = gtk_menu_item_new_with_mnemonic(_("_View")); GtkWidget *viewMenu = gtk_menu_new(); GSList *group; gtk_menu_item_set_submenu(GTK_MENU_ITEM(view), viewMenu); priv->mb_view_transmission = trg_menu_bar_view_radio_item_new(priv->prefs, NULL, TRG_PREFS_KEY_STYLE, TRG_STYLE_TR, _("Transmission Style")); gtk_menu_shell_append(GTK_MENU_SHELL(viewMenu), priv->mb_view_transmission); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM (priv->mb_view_transmission)); priv->mb_view_transmission_compact = trg_menu_bar_view_radio_item_new(priv->prefs, group, TRG_PREFS_KEY_STYLE, TRG_STYLE_TR_COMPACT, _("Transmission Compact Style")); gtk_menu_shell_append(GTK_MENU_SHELL(viewMenu), priv->mb_view_transmission_compact); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM (priv->mb_view_transmission_compact)); priv->mb_view_classic = trg_menu_bar_view_radio_item_new(priv->prefs, group, TRG_PREFS_KEY_STYLE, TRG_STYLE_CLASSIC, _("Classic Style")); gtk_menu_shell_append(GTK_MENU_SHELL(viewMenu), priv->mb_view_classic); gtk_menu_shell_append(GTK_MENU_SHELL(viewMenu), trg_tree_view_sort_menu(TRG_TREE_VIEW (priv->torrent_tree_view), _("Sort"))); priv->mb_view_states = trg_menu_bar_view_item_new(priv->prefs, TRG_PREFS_KEY_SHOW_STATE_SELECTOR, _("State selector"), NULL); trg_menu_bar_accel_add(mb, priv->mb_view_states, GDK_F2, 0); gtk_menu_shell_append(GTK_MENU_SHELL(viewMenu), priv->mb_view_states); priv->mb_directory_filters = trg_menu_bar_view_item_new(priv->prefs, TRG_PREFS_KEY_FILTER_DIRS, _("Directory filters"), priv->mb_view_states); trg_menu_bar_accel_add(mb, priv->mb_directory_filters, GDK_F3, 0); gtk_menu_shell_append(GTK_MENU_SHELL(viewMenu), priv->mb_directory_filters); priv->mb_tracker_filters = trg_menu_bar_view_item_new(priv->prefs, TRG_PREFS_KEY_FILTER_TRACKERS, _("Tracker filters"), priv->mb_view_states); trg_menu_bar_accel_add(mb, priv->mb_tracker_filters, GDK_F4, 0); gtk_menu_shell_append(GTK_MENU_SHELL(viewMenu), priv->mb_tracker_filters); priv->mb_directory_first = trg_menu_bar_view_item_new(priv->prefs, TRG_PREFS_KEY_DIRECTORIES_FIRST, _("Directories first"), priv->mb_view_states); gtk_menu_shell_append(GTK_MENU_SHELL(viewMenu), priv->mb_directory_first); priv->mb_view_notebook = trg_menu_bar_view_item_new(priv->prefs, TRG_PREFS_KEY_SHOW_NOTEBOOK, _("Torrent Details"), NULL); trg_menu_bar_accel_add(mb, priv->mb_view_notebook, GDK_F5, 0); gtk_menu_shell_append(GTK_MENU_SHELL(viewMenu), priv->mb_view_notebook); #if TRG_WITH_GRAPH priv->mb_view_graph = trg_menu_bar_view_item_new(priv->prefs, TRG_PREFS_KEY_SHOW_GRAPH, _("Graph"), priv->mb_view_notebook); trg_menu_bar_accel_add(mb, priv->mb_view_graph, GDK_F6, 0); gtk_menu_shell_append(GTK_MENU_SHELL(viewMenu), priv->mb_view_graph); #endif priv->mb_view_stats = gtk_menu_item_new_with_mnemonic(_("_Statistics")); trg_menu_bar_accel_add(mb, priv->mb_view_stats, GDK_F7, 0); gtk_widget_set_sensitive(priv->mb_view_stats, FALSE); gtk_menu_shell_append(GTK_MENU_SHELL(viewMenu), priv->mb_view_stats); #ifdef HAVE_RSS priv->mb_view_rss = gtk_menu_item_new_with_mnemonic(_("_RSS")); //trg_menu_bar_accel_add(mb, priv->mb_view_rss, GDK_F7, 0); gtk_widget_set_sensitive(priv->mb_view_rss, FALSE); gtk_menu_shell_append(GTK_MENU_SHELL(viewMenu), priv->mb_view_rss); #endif return view; } static GtkWidget *trg_menu_bar_options_menu_new(TrgMenuBar * menu) { TrgMenuBarPrivate *priv = TRG_MENU_BAR_GET_PRIVATE(menu); GtkWidget *opts = gtk_menu_item_new_with_mnemonic(_("_Options")); GtkWidget *optsMenu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(opts), optsMenu); priv->mb_local_prefs = trg_menu_bar_item_new(GTK_MENU_SHELL(optsMenu), _("_Local Preferences"), GTK_STOCK_PREFERENCES, TRUE); trg_menu_bar_accel_add(menu, priv->mb_local_prefs, GDK_s, GDK_CONTROL_MASK); priv->mb_remote_prefs = trg_menu_bar_item_new(GTK_MENU_SHELL(optsMenu), _("_Remote Preferences"), GTK_STOCK_NETWORK, FALSE); trg_menu_bar_accel_add(menu, priv->mb_remote_prefs, GDK_s, GDK_MOD1_MASK); return opts; } static void trg_menu_bar_file_connect_item_new(TrgMainWindow * win, GtkMenuShell * shell, const gchar * text, gboolean checked, JsonObject * profile) { GtkWidget *item = gtk_check_menu_item_new_with_label(text); gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(item), checked); g_object_set_data(G_OBJECT(item), "profile", profile); gtk_check_menu_item_set_draw_as_radio(GTK_CHECK_MENU_ITEM(item), TRUE); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(connect_cb), win); gtk_menu_shell_append(shell, item); } GtkWidget *trg_menu_bar_file_connect_menu_new(TrgMainWindow * win, TrgPrefs * p) { GtkWidget *menu = gtk_menu_new(); GList *profiles = json_array_get_elements(trg_prefs_get_profiles(p)); JsonObject *currentProfile = trg_prefs_get_profile(p); GList *li; for (li = profiles; li; li = g_list_next(li)) { JsonObject *profile = json_node_get_object((JsonNode *) li->data); const gchar *name_value; if (json_object_has_member(profile, TRG_PREFS_KEY_PROFILE_NAME)) { name_value = json_object_get_string_member(profile, TRG_PREFS_KEY_PROFILE_NAME); } else { name_value = _(TRG_PROFILE_NAME_DEFAULT); } trg_menu_bar_file_connect_item_new(win, GTK_MENU_SHELL(menu), name_value, profile == currentProfile, profile); } g_list_free(profiles); return menu; } static GtkWidget *trg_menu_bar_file_file_menu_new(TrgMenuBar * menu) { TrgMenuBarPrivate *priv = TRG_MENU_BAR_GET_PRIVATE(menu); GtkWidget *file = gtk_menu_item_new_with_mnemonic(_("_File")); GtkWidget *fileMenu = gtk_menu_new(); GtkWidget *connectMenu = trg_menu_bar_file_connect_menu_new(priv->main_window, priv->prefs); priv->mb_connect = trg_menu_bar_item_new(GTK_MENU_SHELL(fileMenu), _("Connect"), GTK_STOCK_CONNECT, TRUE); gtk_menu_item_set_submenu(GTK_MENU_ITEM(priv->mb_connect), connectMenu); priv->mb_disconnect = trg_menu_bar_item_new(GTK_MENU_SHELL(fileMenu), _("_Disconnect"), GTK_STOCK_DISCONNECT, FALSE); trg_menu_bar_accel_add(menu, priv->mb_disconnect, GDK_d, GDK_CONTROL_MASK); priv->mb_add = trg_menu_bar_item_new(GTK_MENU_SHELL(fileMenu), _("_Add"), GTK_STOCK_ADD, FALSE); trg_menu_bar_accel_add(menu, priv->mb_add, GDK_o, GDK_CONTROL_MASK); priv->mb_add_url = trg_menu_bar_item_new(GTK_MENU_SHELL(fileMenu), _("Add from _URL"), GTK_STOCK_ADD, FALSE); trg_menu_bar_accel_add(menu, priv->mb_add_url, GDK_u, GDK_CONTROL_MASK); priv->mb_quit = trg_menu_bar_item_new(GTK_MENU_SHELL(fileMenu), _("_Quit"), GTK_STOCK_QUIT, TRUE); trg_menu_bar_accel_add(menu, priv->mb_quit, GDK_q, GDK_CONTROL_MASK); gtk_menu_item_set_submenu(GTK_MENU_ITEM(file), fileMenu); return file; } static GtkWidget *trg_menu_bar_torrent_menu_new(TrgMenuBar * menu) { TrgMenuBarPrivate *priv = TRG_MENU_BAR_GET_PRIVATE(menu); GtkWidget *torrent = gtk_menu_item_new_with_mnemonic(_("_Torrent")); GtkWidget *torrentMenu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(torrent), torrentMenu); priv->mb_props = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("Properties"), GTK_STOCK_PROPERTIES, FALSE); trg_menu_bar_accel_add(menu, priv->mb_props, GDK_i, GDK_CONTROL_MASK); priv->mb_copy_magnetlink = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("_Copy Magnet Link"), GTK_STOCK_COPY, FALSE); trg_menu_bar_accel_add(menu, priv->mb_copy_magnetlink, GDK_c, GDK_CONTROL_MASK); priv->mb_resume = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("_Resume"), GTK_STOCK_MEDIA_PLAY, FALSE); trg_menu_bar_accel_add(menu, priv->mb_resume, GDK_r, GDK_CONTROL_MASK); priv->mb_pause = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("_Pause"), GTK_STOCK_MEDIA_PAUSE, FALSE); trg_menu_bar_accel_add(menu, priv->mb_pause, GDK_p, GDK_CONTROL_MASK); priv->mb_verify = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("_Verify"), GTK_STOCK_REFRESH, FALSE); trg_menu_bar_accel_add(menu, priv->mb_verify, GDK_h, GDK_CONTROL_MASK); priv->mb_reannounce = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("Re-_announce"), GTK_STOCK_REFRESH, FALSE); trg_menu_bar_accel_add(menu, priv->mb_reannounce, GDK_q, GDK_CONTROL_MASK); priv->mb_move = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("_Move"), GTK_STOCK_HARDDISK, FALSE); trg_menu_bar_accel_add(menu, priv->mb_move, GDK_m, GDK_CONTROL_MASK); priv->mb_remove = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("Remove"), GTK_STOCK_REMOVE, FALSE); trg_menu_bar_accel_add(menu, priv->mb_remove, GDK_Delete, 0); priv->mb_delete = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("Remove and delete data"), GTK_STOCK_DELETE, FALSE); trg_menu_bar_accel_add(menu, priv->mb_delete, GDK_Delete, GDK_SHIFT_MASK); priv->mb_queues_seperator = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(torrentMenu), priv->mb_queues_seperator); priv->mb_start_now = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("Start Now"), GTK_STOCK_MEDIA_PLAY, FALSE); priv->mb_up_queue = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("Move Up Queue"), GTK_STOCK_GO_UP, FALSE); trg_menu_bar_accel_add(menu, priv->mb_up_queue, GDK_Up, GDK_SHIFT_MASK); priv->mb_down_queue = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("Move Down Queue"), GTK_STOCK_GO_DOWN, FALSE); trg_menu_bar_accel_add(menu, priv->mb_down_queue, GDK_Down, GDK_SHIFT_MASK); priv->mb_bottom_queue = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("Bottom Of Queue"), GTK_STOCK_GOTO_BOTTOM, FALSE); priv->mb_top_queue = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("Top Of Queue"), GTK_STOCK_GOTO_TOP, FALSE); gtk_menu_shell_append(GTK_MENU_SHELL(torrentMenu), gtk_separator_menu_item_new()); priv->mb_resume_all = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("_Resume All"), GTK_STOCK_MEDIA_PLAY, FALSE); trg_menu_bar_accel_add(menu, priv->mb_resume_all, GDK_r, GDK_SHIFT_MASK | GDK_CONTROL_MASK); priv->mb_pause_all = trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("_Pause All"), GTK_STOCK_MEDIA_PAUSE, FALSE); trg_menu_bar_accel_add(menu, priv->mb_pause_all, GDK_p, GDK_SHIFT_MASK | GDK_CONTROL_MASK); return torrent; } static GtkWidget *trg_menu_bar_help_menu_new(TrgMenuBar * menuBar) { TrgMenuBarPrivate *priv = TRG_MENU_BAR_GET_PRIVATE(menuBar); GtkWidget *help = gtk_menu_item_new_with_mnemonic(_("_Help")); GtkWidget *helpMenu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(help), helpMenu); gtk_menu_shell_append(GTK_MENU_SHELL(menuBar), help); priv->mb_about = trg_menu_bar_item_new(GTK_MENU_SHELL(helpMenu), _("_About"), GTK_STOCK_ABOUT, TRUE); return helpMenu; } static void menu_bar_refresh_menu(GtkWidget * w, gpointer data) { TrgMenuBarPrivate *priv = TRG_MENU_BAR_GET_PRIVATE(data); GtkWidget *old = gtk_menu_item_get_submenu(GTK_MENU_ITEM(priv->mb_connect)); GtkWidget *new = trg_menu_bar_file_connect_menu_new(priv->main_window, priv->prefs); gtk_widget_destroy(old); gtk_menu_item_set_submenu(GTK_MENU_ITEM(priv->mb_connect), new); gtk_widget_show_all(new); } static GObject *trg_menu_bar_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *object; TrgMenuBarPrivate *priv; TrgMenuBar *menu; object = G_OBJECT_CLASS (trg_menu_bar_parent_class)->constructor(type, n_construct_properties, construct_params); menu = TRG_MENU_BAR(object); priv = TRG_MENU_BAR_GET_PRIVATE(object); gtk_menu_shell_append(GTK_MENU_SHELL(object), trg_menu_bar_file_file_menu_new(menu)); gtk_menu_shell_append(GTK_MENU_SHELL(object), trg_menu_bar_torrent_menu_new(menu)); gtk_menu_shell_append(GTK_MENU_SHELL(object), trg_menu_bar_options_menu_new(menu)); gtk_menu_shell_append(GTK_MENU_SHELL(object), trg_menu_bar_view_menu_new(menu)); trg_menu_bar_help_menu_new(TRG_MENU_BAR(object)); g_signal_connect(G_OBJECT(priv->prefs), "pref-profile-changed", G_CALLBACK(menu_bar_refresh_menu), object); return object; } static void trg_menu_bar_class_init(TrgMenuBarClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_menu_bar_get_property; object_class->set_property = trg_menu_bar_set_property; object_class->constructor = trg_menu_bar_constructor; g_type_class_add_private(klass, sizeof(TrgMenuBarPrivate)); trg_menu_bar_install_widget_prop(object_class, PROP_CONNECT_BUTTON, "connect-button", "Connect Button"); trg_menu_bar_install_widget_prop(object_class, PROP_DISCONNECT_BUTTON, "disconnect-button", "Disconnect Button"); trg_menu_bar_install_widget_prop(object_class, PROP_ADD_BUTTON, "add-button", "Add Button"); trg_menu_bar_install_widget_prop(object_class, PROP_ADD_URL_BUTTON, "add-url-button", "Add URL Button"); trg_menu_bar_install_widget_prop(object_class, PROP_REMOVE_BUTTON, "remove-button", "Remove Button"); trg_menu_bar_install_widget_prop(object_class, PROP_MOVE_BUTTON, "move-button", "Move Button"); trg_menu_bar_install_widget_prop(object_class, PROP_DELETE_BUTTON, "delete-button", "Delete Button"); trg_menu_bar_install_widget_prop(object_class, PROP_RESUME_BUTTON, "resume-button", "Resume Button"); trg_menu_bar_install_widget_prop(object_class, PROP_RESUME_ALL_BUTTON, "resume-all-button", "Resume All Button"); trg_menu_bar_install_widget_prop(object_class, PROP_VERIFY_BUTTON, "verify-button", "Verify Button"); trg_menu_bar_install_widget_prop(object_class, PROP_REANNOUNCE_BUTTON, "reannounce-button", "Re-announce Button"); trg_menu_bar_install_widget_prop(object_class, PROP_PAUSE_ALL_BUTTON, "pause-all-button", "Pause All Button"); trg_menu_bar_install_widget_prop(object_class, PROP_PAUSE_BUTTON, "pause-button", "Pause Button"); trg_menu_bar_install_widget_prop(object_class, PROP_PROPS_BUTTON, "props-button", "Props Button"); trg_menu_bar_install_widget_prop(object_class, PROP_COPYMAGNET_BUTTON, "copymagnet-button", "Copy-magnet Button"); trg_menu_bar_install_widget_prop(object_class, PROP_ABOUT_BUTTON, "about-button", "About Button"); trg_menu_bar_install_widget_prop(object_class, PROP_VIEW_STATS_BUTTON, "view-stats-button", "View stats button"); #ifdef HAVE_RSS trg_menu_bar_install_widget_prop(object_class, PROP_VIEW_RSS_BUTTON, "view-rss-button", "View rss button"); #endif trg_menu_bar_install_widget_prop(object_class, PROP_VIEW_STATES_BUTTON, "view-states-button", "View states Button"); trg_menu_bar_install_widget_prop(object_class, PROP_VIEW_NOTEBOOK_BUTTON, "view-notebook-button", "View notebook Button"); trg_menu_bar_install_widget_prop(object_class, PROP_REMOTE_PREFS_BUTTON, "remote-prefs-button", "Remote Prefs Button"); trg_menu_bar_install_widget_prop(object_class, PROP_LOCAL_PREFS_BUTTON, "local-prefs-button", "Local Prefs Button"); trg_menu_bar_install_widget_prop(object_class, PROP_QUIT, "quit-button", "Quit Button"); trg_menu_bar_install_widget_prop(object_class, PROP_DIR_FILTERS, "dir-filters", "Dir Filters"); trg_menu_bar_install_widget_prop(object_class, PROP_TRACKER_FILTERS, "tracker-filters", "Tracker Filters"); trg_menu_bar_install_widget_prop(object_class, PROP_DIRECTORIES_FIRST, TRG_PREFS_KEY_DIRECTORIES_FIRST, "Directories first"); #if TRG_WITH_GRAPH trg_menu_bar_install_widget_prop(object_class, PROP_VIEW_SHOW_GRAPH, "show-graph", "Show Graph"); #endif trg_menu_bar_install_widget_prop(object_class, PROP_MOVE_DOWN_QUEUE, "down-queue", "Down Queue"); trg_menu_bar_install_widget_prop(object_class, PROP_MOVE_UP_QUEUE, "up-queue", "Up Queue"); trg_menu_bar_install_widget_prop(object_class, PROP_MOVE_BOTTOM_QUEUE, "bottom-queue", "Bottom Queue"); trg_menu_bar_install_widget_prop(object_class, PROP_MOVE_TOP_QUEUE, "top-queue", "Top Queue"); trg_menu_bar_install_widget_prop(object_class, PROP_START_NOW, "start-now", "Start Now"); g_object_class_install_property(object_class, PROP_PREFS, g_param_spec_object("prefs", "prefs", "Prefs", TRG_TYPE_PREFS, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_ACCEL_GROUP, g_param_spec_object("accel-group", "accel-group", "accel-group", GTK_TYPE_ACCEL_GROUP, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_MAIN_WINDOW, g_param_spec_object("mainwin", "mainwin", "mainwin", TRG_TYPE_MAIN_WINDOW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_TORRENT_TREE_VIEW, g_param_spec_object ("torrent-tree-view", "torrent-tree-view", "torrent-tree-view", TRG_TYPE_TORRENT_TREE_VIEW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } static void trg_menu_bar_init(TrgMenuBar * self) { } TrgMenuBar *trg_menu_bar_new(TrgMainWindow * win, TrgPrefs * prefs, TrgTorrentTreeView * ttv, GtkAccelGroup * accel_group) { return g_object_new(TRG_TYPE_MENU_BAR, "torrent-tree-view", ttv, "prefs", prefs, "mainwin", win, "accel-group", accel_group, NULL); } transmission-remote-gtk-1.4.1/src/trg-menu-bar.h000066400000000000000000000051111341276053300215640ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_MENU_BAR_H_ #define TRG_MENU_BAR_H_ #include #include #include "trg-prefs.h" #include "trg-torrent-tree-view.h" #include "trg-main-window.h" G_BEGIN_DECLS #define TRG_TYPE_MENU_BAR trg_menu_bar_get_type() #define TRG_MENU_BAR(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_MENU_BAR, TrgMenuBar)) #define TRG_MENU_BAR_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_MENU_BAR, TrgMenuBarClass)) #define TRG_IS_MENU_BAR(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_MENU_BAR)) #define TRG_IS_MENU_BAR_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_MENU_BAR)) #define TRG_MENU_BAR_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_MENU_BAR, TrgMenuBarClass)) typedef struct { GtkMenuBar parent; } TrgMenuBar; typedef struct { GtkMenuBarClass parent_class; } TrgMenuBarClass; GType trg_menu_bar_get_type(void); TrgMenuBar *trg_menu_bar_new(TrgMainWindow * win, TrgPrefs * prefs, TrgTorrentTreeView * ttv, GtkAccelGroup * accel_group); GtkWidget *trg_menu_bar_item_new(GtkMenuShell * shell, const gchar * text, const gchar * stock_id, gboolean sensitive); G_END_DECLS void trg_menu_bar_torrent_actions_sensitive(TrgMenuBar * mb, gboolean sensitive); void trg_menu_bar_connected_change(TrgMenuBar * mb, gboolean connected); void trg_menu_bar_set_supports_queues(TrgMenuBar * mb, gboolean supportsQueues); GtkWidget *trg_menu_bar_file_connect_menu_new(TrgMainWindow * win, TrgPrefs * p); #endif /* TRG_MENU_BAR_H_ */ transmission-remote-gtk-1.4.1/src/trg-model.c000066400000000000000000000073001341276053300211530ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "trg-model.h" /* An extension of GtkListStore which provides some functions for looking up * an entry by ID. Also for removing entries which have an old update serial, * which means it needs removing. */ struct trg_model_remove_removed_foreachfunc_args { gint64 currentSerial; gint serial_column; GList *toRemove; }; static gboolean trg_model_remove_removed_foreachfunc(GtkTreeModel * model, GtkTreePath * path G_GNUC_UNUSED, GtkTreeIter * iter, gpointer data) { struct trg_model_remove_removed_foreachfunc_args *args = (struct trg_model_remove_removed_foreachfunc_args *) data; gint64 rowSerial; gtk_tree_model_get(model, iter, args->serial_column, &rowSerial, -1); if (rowSerial != args->currentSerial) args->toRemove = g_list_append(args->toRemove, gtk_tree_iter_copy(iter)); return FALSE; } guint trg_model_remove_removed(GtkListStore * model, gint serial_column, gint64 currentSerial) { struct trg_model_remove_removed_foreachfunc_args args; GList *li; guint removed = 0; args.toRemove = NULL; args.currentSerial = currentSerial; args.serial_column = serial_column; gtk_tree_model_foreach(GTK_TREE_MODEL(model), trg_model_remove_removed_foreachfunc, &args); if (args.toRemove != NULL) { for (li = g_list_last(args.toRemove); li != NULL; li = g_list_previous(li)) { gtk_list_store_remove(model, (GtkTreeIter *) li->data); gtk_tree_iter_free((GtkTreeIter *) li->data); removed++; } g_list_free(args.toRemove); } return removed; } struct find_existing_item_foreach_args { gint64 id; gint search_column; GtkTreeIter *iter; gboolean found; }; static gboolean find_existing_item_foreachfunc(GtkTreeModel * model, GtkTreePath * path G_GNUC_UNUSED, GtkTreeIter * iter, gpointer data) { struct find_existing_item_foreach_args *args = (struct find_existing_item_foreach_args *) data; gint64 currentId; gtk_tree_model_get(model, iter, args->search_column, ¤tId, -1); if (currentId == args->id) { args->iter = iter; return args->found = TRUE; } return FALSE; } gboolean find_existing_model_item(GtkTreeModel * model, gint search_column, gint64 id, GtkTreeIter * iter) { struct find_existing_item_foreach_args args; args.id = id; args.found = FALSE; args.search_column = search_column; gtk_tree_model_foreach(model, find_existing_item_foreachfunc, &args); if (args.found == TRUE) *iter = *(args.iter); return args.found; } transmission-remote-gtk-1.4.1/src/trg-model.h000066400000000000000000000022621341276053300211620ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_MODEL_H_ #define TRG_MODEL_H_ #include guint trg_model_remove_removed(GtkListStore * model, gint serial_column, gint64 currentSerial); gboolean find_existing_model_item(GtkTreeModel * model, gint search_column, gint64 id, GtkTreeIter * iter); #endif /* TRG_MODEL_H_ */ transmission-remote-gtk-1.4.1/src/trg-peers-model.c000066400000000000000000000306501341276053300222730ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #ifdef HAVE_GEOIP #include #include #endif #include "trg-tree-view.h" #include "torrent.h" #include "trg-client.h" #include "trg-peers-model.h" #include "trg-model.h" #include "util.h" G_DEFINE_TYPE(TrgPeersModel, trg_peers_model, GTK_TYPE_LIST_STORE) #define TRG_PEERS_MODEL_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_PEERS_MODEL, TrgPeersModelPrivate)) #ifdef HAVE_GEOIP typedef struct _TrgPeersModelPrivate TrgPeersModelPrivate; struct _TrgPeersModelPrivate { GeoIP *geoip; GeoIP *geoipv6; GeoIP *geoipcity; }; #endif static void trg_peers_model_class_init(TrgPeersModelClass * klass G_GNUC_UNUSED) { #ifdef HAVE_GEOIP g_type_class_add_private(klass, sizeof(TrgPeersModelPrivate)); #endif } static gboolean find_existing_peer_item_foreachfunc(GtkTreeModel * model, GtkTreePath * path G_GNUC_UNUSED, GtkTreeIter * iter, gpointer data) { struct peerAndIter *pi = (struct peerAndIter *) data; gchar *ip; gtk_tree_model_get(model, iter, PEERSCOL_IP, &ip, -1); if (g_strcmp0(ip, pi->ip) == 0) { pi->iter = *iter; pi->found = TRUE; } g_free(ip); return pi->found; } static gboolean find_existing_peer_item(TrgPeersModel * model, JsonObject * p, GtkTreeIter * iter) { struct peerAndIter pi; pi.ip = peer_get_address(p); pi.found = FALSE; gtk_tree_model_foreach(GTK_TREE_MODEL(model), find_existing_peer_item_foreachfunc, &pi); if (pi.found == TRUE) *iter = pi.iter; return pi.found; } struct ResolvedDnsIdleData { GtkTreeRowReference *rowRef; gchar *rdns; }; static gboolean resolved_dns_idle_cb(gpointer data) { struct ResolvedDnsIdleData *idleData = data; GtkTreeModel *model = gtk_tree_row_reference_get_model(idleData->rowRef); GtkTreePath *path = gtk_tree_row_reference_get_path(idleData->rowRef); if (path != NULL) { GtkTreeIter iter; if (gtk_tree_model_get_iter(model, &iter, path) == TRUE) { gtk_list_store_set(GTK_LIST_STORE(model), &iter, PEERSCOL_HOST, idleData->rdns, -1); } gtk_tree_path_free(path); } gtk_tree_row_reference_free(idleData->rowRef); g_free(idleData->rdns); g_free(idleData); return FALSE; } static void resolved_dns_cb(GObject * source_object, GAsyncResult * res, gpointer data) { gchar *rdns = g_resolver_lookup_by_address_finish(G_RESOLVER(source_object), res, NULL); GtkTreeRowReference *rowRef = data; if (rdns != NULL) { struct ResolvedDnsIdleData *idleData = g_new(struct ResolvedDnsIdleData, 1); idleData->rdns = rdns; idleData->rowRef = rowRef; g_idle_add(resolved_dns_idle_cb, idleData); } else { gtk_tree_row_reference_free(rowRef); } } #ifdef HAVE_GEOIP /* for handling v4 or v6 addresses. string is owned by GeoIP, should not be freed. */ static const gchar* lookup_country(TrgPeersModel *model, const gchar *address) { TrgPeersModelPrivate *priv = TRG_PEERS_MODEL_GET_PRIVATE(model); if (strchr(address, ':') && priv->geoipv6) return GeoIP_country_name_by_addr_v6(priv->geoipv6, address); else if (priv->geoip) return GeoIP_country_name_by_addr(priv->geoip, address); else return NULL; } #endif void trg_peers_model_update(TrgPeersModel * model, TrgTreeView * tv, gint64 updateSerial, JsonObject * t, gint mode) { #ifdef HAVE_GEOIP TrgPeersModelPrivate *priv = TRG_PEERS_MODEL_GET_PRIVATE(model); gboolean doGeoLookup = trg_tree_view_is_column_showing(tv, PEERSCOL_COUNTRY); gboolean doGeoCityLookup = trg_tree_view_is_column_showing(tv, PEERSCOL_CITY); #endif gboolean doHostLookup = trg_tree_view_is_column_showing(tv, PEERSCOL_HOST); JsonArray *peers; GtkTreeIter peerIter; GList *li, *peersList; gboolean isNew; peers = torrent_get_peers(t); if (mode == TORRENT_GET_MODE_FIRST) gtk_list_store_clear(GTK_LIST_STORE(model)); peersList = json_array_get_elements(peers); for (li = peersList; li; li = g_list_next(li)) { JsonObject *peer = json_node_get_object((JsonNode *) li->data); const gchar *address = NULL, *flagStr; #ifdef HAVE_GEOIP const gchar *country = NULL; GeoIPRecord *city = NULL; #endif if (mode == TORRENT_GET_MODE_FIRST || find_existing_peer_item(model, peer, &peerIter) == FALSE) { gtk_list_store_append(GTK_LIST_STORE(model), &peerIter); address = peer_get_address(peer); #ifdef HAVE_GEOIP if (address) { /* just in case address wasn't set */ if (doGeoLookup) country = lookup_country(model, address); if (doGeoCityLookup) city = GeoIP_record_by_addr(priv->geoipcity, address); } #endif gtk_list_store_set(GTK_LIST_STORE(model), &peerIter, PEERSCOL_ICON, "network-workgroup", PEERSCOL_IP, address, #ifdef HAVE_GEOIP PEERSCOL_COUNTRY, country ? country : "", PEERSCOL_CITY, city ? city->city : "", #endif PEERSCOL_CLIENT, peer_get_client_name(peer), -1); isNew = TRUE; } else { isNew = FALSE; } #ifdef HAVE_GEOIP if (city) GeoIPRecord_delete(city); #endif flagStr = peer_get_flagstr(peer); gtk_list_store_set(GTK_LIST_STORE(model), &peerIter, PEERSCOL_FLAGS, flagStr, PEERSCOL_PROGRESS, peer_get_progress(peer), PEERSCOL_DOWNSPEED, peer_get_rate_to_client(peer), PEERSCOL_UPSPEED, peer_get_rate_to_peer(peer), PEERSCOL_UPDATESERIAL, updateSerial, -1); if (doHostLookup && isNew == TRUE) { GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &peerIter); GtkTreeRowReference *treeRef = gtk_tree_row_reference_new(GTK_TREE_MODEL(model), path); GInetAddress *inetAddr; GResolver *resolver; gtk_tree_path_free(path); inetAddr = g_inet_address_new_from_string(address); resolver = g_resolver_get_default(); g_resolver_lookup_by_address_async(resolver, inetAddr, NULL, resolved_dns_cb, treeRef); g_object_unref(resolver); g_object_unref(inetAddr); } } g_list_free(peersList); if (mode != TORRENT_GET_MODE_FIRST) trg_model_remove_removed(GTK_LIST_STORE(model), PEERSCOL_UPDATESERIAL, updateSerial); } static void trg_peers_model_init(TrgPeersModel * self) { #ifdef HAVE_GEOIP TrgPeersModelPrivate *priv = TRG_PEERS_MODEL_GET_PRIVATE(self); gchar *geoip_db_path = NULL; gchar *geoip_v6_db_path = NULL; gchar *geoip_city_db_path = NULL; gchar *geoip_city_alt_db_path = NULL; #endif GType column_types[PEERSCOL_COLUMNS]; column_types[PEERSCOL_ICON] = G_TYPE_STRING; column_types[PEERSCOL_IP] = G_TYPE_STRING; #ifdef HAVE_GEOIP column_types[PEERSCOL_COUNTRY] = G_TYPE_STRING; column_types[PEERSCOL_CITY] = G_TYPE_STRING; #endif column_types[PEERSCOL_HOST] = G_TYPE_STRING; column_types[PEERSCOL_FLAGS] = G_TYPE_STRING; column_types[PEERSCOL_PROGRESS] = G_TYPE_DOUBLE; column_types[PEERSCOL_DOWNSPEED] = G_TYPE_INT64; column_types[PEERSCOL_UPSPEED] = G_TYPE_INT64; column_types[PEERSCOL_CLIENT] = G_TYPE_STRING; column_types[PEERSCOL_UPDATESERIAL] = G_TYPE_INT64; gtk_list_store_set_column_types(GTK_LIST_STORE(self), PEERSCOL_COLUMNS, column_types); #ifdef HAVE_GEOIP #ifdef WIN32 geoip_db_path = trg_win32_support_path("GeoIP.dat"); geoip_v6_db_path = trg_win32_support_path("GeoIPv6.dat"); geoip_city_db_path = trg_win32_support_path("GeoLiteCity.dat"); geoip_city_alt_db_path = trg_win32_support_path("GeoIPCity.dat"); #else geoip_db_path = g_strdup(TRG_GEOIP_DATABASE); geoip_v6_db_path = g_strdup(TRG_GEOIPV6_DATABASE); geoip_city_db_path = g_strdup(TRG_GEOIP_CITY_DATABASE); geoip_city_alt_db_path = g_strdup(TRG_GEOIP_CITY_ALT_DATABASE); #endif if (g_file_test(geoip_db_path, G_FILE_TEST_EXISTS) == TRUE) priv->geoip = GeoIP_open(geoip_db_path, GEOIP_STANDARD | GEOIP_CHECK_CACHE); if (g_file_test(geoip_v6_db_path, G_FILE_TEST_EXISTS) == TRUE) priv->geoipv6 = GeoIP_open(geoip_v6_db_path, GEOIP_STANDARD | GEOIP_CHECK_CACHE); if (g_file_test(geoip_city_db_path, G_FILE_TEST_EXISTS) == TRUE) priv->geoipcity = GeoIP_open(geoip_city_db_path, GEOIP_STANDARD | GEOIP_CHECK_CACHE); else if (g_file_test(geoip_city_alt_db_path, G_FILE_TEST_EXISTS) == TRUE) priv->geoipcity = GeoIP_open(geoip_city_alt_db_path, GEOIP_STANDARD | GEOIP_CHECK_CACHE); if (priv->geoipcity) GeoIP_set_charset(priv->geoipcity, GEOIP_CHARSET_UTF8); g_free(geoip_city_db_path); g_free(geoip_city_alt_db_path); g_free(geoip_db_path); g_free(geoip_v6_db_path); #endif } #ifdef HAVE_GEOIP static gboolean trg_peers_model_add_city_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { TrgPeersModelPrivate *priv = TRG_PEERS_MODEL_GET_PRIVATE(model); gchar *address = NULL; GeoIPRecord *record = NULL; gtk_tree_model_get(GTK_TREE_MODEL(model), iter, PEERSCOL_IP, &address, -1); record = GeoIP_record_by_addr(priv->geoipcity, address); if (record) { gtk_list_store_set(GTK_LIST_STORE(model), iter, PEERSCOL_CITY, record->city, -1); GeoIPRecord_delete(record); } g_free(address); return FALSE; } gboolean trg_peers_model_has_city_db(TrgPeersModel *model) { TrgPeersModelPrivate *priv = TRG_PEERS_MODEL_GET_PRIVATE(model); return priv->geoipcity != NULL; } gboolean trg_peers_model_has_country_db(TrgPeersModel *model) { TrgPeersModelPrivate *priv = TRG_PEERS_MODEL_GET_PRIVATE(model); return priv->geoip != NULL; } void trg_peers_model_add_city_column(TrgPeersModel *model) { TrgPeersModelPrivate *priv = TRG_PEERS_MODEL_GET_PRIVATE(model); if (priv->geoipcity) gtk_tree_model_foreach(GTK_TREE_MODEL(model), trg_peers_model_add_city_foreach, NULL); } static gboolean trg_peers_model_add_country_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { gchar *address = NULL; gtk_tree_model_get(GTK_TREE_MODEL(model), iter, PEERSCOL_IP, &address, -1); gtk_list_store_set(GTK_LIST_STORE(model), iter, PEERSCOL_COUNTRY, lookup_country(TRG_PEERS_MODEL(model), address), -1); g_free(address); return FALSE; } void trg_peers_model_add_country_column(TrgPeersModel *model) { TrgPeersModelPrivate *priv = TRG_PEERS_MODEL_GET_PRIVATE(model); if (priv->geoip) gtk_tree_model_foreach(GTK_TREE_MODEL(model), trg_peers_model_add_country_foreach, NULL); } #endif TrgPeersModel *trg_peers_model_new() { return g_object_new(TRG_TYPE_PEERS_MODEL, NULL); } transmission-remote-gtk-1.4.1/src/trg-peers-model.h000066400000000000000000000057641341276053300223100ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_PEERS_MODEL_H_ #define TRG_PEERS_MODEL_H_ #if HAVE_CONFIG_H #include "config.h" #endif #include #include #ifdef HAVE_GEOIP #include #endif #include #include "trg-tree-view.h" G_BEGIN_DECLS #define TRG_TYPE_PEERS_MODEL trg_peers_model_get_type() #define TRG_PEERS_MODEL(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_PEERS_MODEL, TrgPeersModel)) #define TRG_PEERS_MODEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_PEERS_MODEL, TrgPeersModelClass)) #define TRG_IS_PEERS_MODEL(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_PEERS_MODEL)) #define TRG_IS_PEERS_MODEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_PEERS_MODEL)) #define TRG_PEERS_MODEL_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_PEERS_MODEL, TrgPeersModelClass)) typedef struct { GtkListStore parent; } TrgPeersModel; typedef struct { GtkListStoreClass parent_class; } TrgPeersModelClass; GType trg_peers_model_get_type(void); TrgPeersModel *trg_peers_model_new(void); G_END_DECLS struct peerAndIter { const gchar *ip; GtkTreeIter iter; gboolean found; }; enum { PEERSCOL_ICON, PEERSCOL_IP, #if HAVE_GEOIP PEERSCOL_COUNTRY, PEERSCOL_CITY, #endif PEERSCOL_HOST, PEERSCOL_FLAGS, PEERSCOL_PROGRESS, PEERSCOL_DOWNSPEED, PEERSCOL_UPSPEED, PEERSCOL_CLIENT, PEERSCOL_UPDATESERIAL, PEERSCOL_COLUMNS }; void trg_peers_model_update(TrgPeersModel * model, TrgTreeView * tv, gint64 updateSerial, JsonObject * t, gboolean first); #if HAVE_GEOIP void trg_peers_model_add_city_column(TrgPeersModel *model); void trg_peers_model_add_country_column(TrgPeersModel *model); gboolean trg_peers_model_has_city_db(TrgPeersModel *model); gboolean trg_peers_model_has_country_db(TrgPeersModel *model); #endif #endif /* TRG_PEERS_MODEL_H_ */ #define TRG_GEOIP_DATABASE "/usr/share/GeoIP/GeoIP.dat" #define TRG_GEOIPV6_DATABASE "/usr/share/GeoIP/GeoIPv6.dat" #define TRG_GEOIP_CITY_DATABASE "/usr/share/GeoIP/GeoLiteCity.dat" #define TRG_GEOIP_CITY_ALT_DATABASE "/usr/share/GeoIP/GeoIPCity.dat" transmission-remote-gtk-1.4.1/src/trg-peers-tree-view.c000066400000000000000000000076271341276053300231120ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_GEOIP #include #endif #include #include #include #include "trg-prefs.h" #include "trg-tree-view.h" #include "trg-peers-model.h" #include "trg-peers-tree-view.h" G_DEFINE_TYPE(TrgPeersTreeView, trg_peers_tree_view, TRG_TYPE_TREE_VIEW) static void trg_peers_tree_view_class_init(TrgPeersTreeViewClass * klass G_GNUC_UNUSED) { } static void trg_peers_tree_view_init(TrgPeersTreeView * self) { } static void trg_peers_tree_view_setup_columns(TrgPeersTreeView * self, TrgPeersModel *model) { TrgTreeView *ttv = TRG_TREE_VIEW(self); trg_column_description *desc; desc = trg_tree_view_reg_column(ttv, TRG_COLTYPE_ICONTEXT, PEERSCOL_IP, _("IP"), "ip", 0); desc->model_column_extra = PEERSCOL_ICON; trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, PEERSCOL_HOST, _("Host"), "host", 0); #ifdef HAVE_GEOIP if (trg_peers_model_has_country_db(model)) trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, PEERSCOL_COUNTRY, _("Country"), "country", 0); if (trg_peers_model_has_city_db(model)) trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, PEERSCOL_CITY, _("City"), "city", 0); #endif trg_tree_view_reg_column(ttv, TRG_COLTYPE_SPEED, PEERSCOL_DOWNSPEED, _("Down Speed"), "down-speed", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_SPEED, PEERSCOL_UPSPEED, _("Up Speed"), "up-speed", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_PROG, PEERSCOL_PROGRESS, _("Progress"), "progress", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, PEERSCOL_FLAGS, _("Flags"), "flags", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, PEERSCOL_CLIENT, _("Client"), "client", 0); gtk_tree_view_set_search_column(GTK_TREE_VIEW(self), PEERSCOL_HOST); } #ifdef HAVE_GEOIP static void trg_peers_tree_view_column_added(TrgTreeView *tv, const gchar *id) { TrgPeersModel *model = TRG_PEERS_MODEL(gtk_tree_view_get_model(GTK_TREE_VIEW(tv))); if (!g_strcmp0(id, "city")) { trg_peers_model_add_city_column(model); } else if (!g_strcmp0(id, "country")) { trg_peers_model_add_country_column(model); } } #endif TrgPeersTreeView *trg_peers_tree_view_new(TrgPrefs * prefs, TrgPeersModel * model, const gchar * configId) { GObject *obj = g_object_new(TRG_TYPE_PEERS_TREE_VIEW, "config-id", configId, "prefs", prefs, NULL); trg_peers_tree_view_setup_columns(TRG_PEERS_TREE_VIEW(obj), model); gtk_tree_view_set_model(GTK_TREE_VIEW(obj), GTK_TREE_MODEL(model)); trg_tree_view_restore_sort(TRG_TREE_VIEW(obj), 0x00); trg_tree_view_setup_columns(TRG_TREE_VIEW(obj)); #ifdef HAVE_GEOIP g_signal_connect(obj, "column-added", G_CALLBACK(trg_peers_tree_view_column_added), NULL); #endif return TRG_PEERS_TREE_VIEW(obj); } transmission-remote-gtk-1.4.1/src/trg-peers-tree-view.h000066400000000000000000000040771341276053300231130ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_PEERS_TREE_VIEW_H_ #define TRG_PEERS_TREE_VIEW_H_ #include #include #include "trg-prefs.h" #include "trg-peers-model.h" G_BEGIN_DECLS #define TRG_TYPE_PEERS_TREE_VIEW trg_peers_tree_view_get_type() #define TRG_PEERS_TREE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_PEERS_TREE_VIEW, TrgPeersTreeView)) #define TRG_PEERS_TREE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_PEERS_TREE_VIEW, TrgPeersTreeViewClass)) #define TRG_IS_PEERS_TREE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_PEERS_TREE_VIEW)) #define TRG_IS_PEERS_TREE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_PEERS_TREE_VIEW)) #define TRG_PEERS_TREE_VIEW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_PEERS_TREE_VIEW, TrgPeersTreeViewClass)) typedef struct { TrgTreeView parent; } TrgPeersTreeView; typedef struct { TrgTreeViewClass parent_class; } TrgPeersTreeViewClass; GType trg_peers_tree_view_get_type(void); TrgPeersTreeView *trg_peers_tree_view_new(TrgPrefs * prefs, TrgPeersModel * model, const gchar * configId); G_END_DECLS #endif /* TRG_PEERS_TREE_VIEW_H_ */ transmission-remote-gtk-1.4.1/src/trg-persistent-tree-view.c000066400000000000000000000465071341276053300241740ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "trg-prefs.h" #include "trg-persistent-tree-view.h" #include "trg-preferences-dialog.h" #include "util.h" /* A config TreeView which can save/restore simple data into the TrgConf backend. * It's not actually a GtkTreeView, it's a GtKVBox which contains the buttons * to add/remove entries as well as the TreeView. */ G_DEFINE_TYPE(TrgPersistentTreeView, trg_persistent_tree_view, GTK_TYPE_VBOX) #define GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_PERSISTENT_TREE_VIEW, TrgPersistentTreeViewPrivate)) typedef struct _TrgPersistentTreeViewPrivate TrgPersistentTreeViewPrivate; enum { PROP_0, PROP_PREFS, PROP_KEY, PROP_MODEL, PROP_CONF_FLAGS }; struct _TrgPersistentTreeViewPrivate { TrgPrefs *prefs; gchar *key; GSList *columns; GtkTreeView *tv; JsonArray *ja; GtkWidget *delButton; GtkWidget *upButton; GtkWidget *downButton; trg_pref_widget_desc *wd; GtkTreeModel *model; trg_persistent_tree_view_column *addSelect; gint conf_flags; }; static void selection_changed(TrgPersistentTreeView * ptv, GtkTreeSelection * selection) { TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(ptv); GtkTreeIter iter; GtkTreeModel *model; if (gtk_tree_selection_get_selected(selection, &model, &iter)) { GtkTreePath *path = gtk_tree_model_get_path(model, &iter); gtk_widget_set_sensitive(priv->upButton, gtk_tree_path_prev(path)); gtk_widget_set_sensitive(priv->downButton, gtk_tree_model_iter_next(model, &iter)); gtk_tree_path_free(path); gtk_widget_set_sensitive(priv->delButton, TRUE); } else { gtk_widget_set_sensitive(priv->delButton, FALSE); gtk_widget_set_sensitive(priv->upButton, FALSE); gtk_widget_set_sensitive(priv->downButton, FALSE); } } static void selection_changed_cb(GtkTreeSelection * selection, gpointer data) { selection_changed(TRG_PERSISTENT_TREE_VIEW(data), selection); } static void trg_persistent_tree_view_edit(GtkCellRendererText * renderer, gchar * path, gchar * new_text, gpointer user_data) { trg_persistent_tree_view_column *cd = (trg_persistent_tree_view_column *) user_data; TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(cd->tv); GtkTreeModel *model = gtk_tree_view_get_model(priv->tv); GtkTreeIter iter; gtk_tree_model_get_iter_from_string(model, &iter, path); gtk_list_store_set(GTK_LIST_STORE(model), &iter, cd->index, new_text, -1); } static void trg_persistent_tree_view_refresh(TrgPrefs * prefs, void *wdp) { trg_pref_widget_desc *wd = (trg_pref_widget_desc *) wdp; TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(wd->widget); GtkListStore *model = GTK_LIST_STORE(gtk_tree_view_get_model(priv->tv)); GtkTreeIter iter; JsonArray *ja; GList *ja_list, *li; GSList *sli; ja = trg_prefs_get_array(prefs, wd->key, wd->flags); gtk_list_store_clear(model); if (!ja) return; ja_list = json_array_get_elements(ja); for (li = ja_list; li; li = g_list_next(li)) { JsonNode *ja_node = (JsonNode *) li->data; JsonObject *jobj = json_node_get_object(ja_node); gtk_list_store_append(model, &iter); for (sli = priv->columns; sli; sli = g_slist_next(sli)) { trg_persistent_tree_view_column *cd = (trg_persistent_tree_view_column *) sli->data; gtk_list_store_set(model, &iter, cd->index, json_object_get_string_member(jobj, cd->key), -1); } } g_list_free(ja_list); } static gboolean trg_persistent_tree_view_save_foreachfunc(GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data) { TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(data); JsonObject *new = json_object_new(); gchar *value; GSList *li; for (li = priv->columns; li; li = g_slist_next(li)) { trg_persistent_tree_view_column *cd = (trg_persistent_tree_view_column *) li->data; gtk_tree_model_get(model, iter, cd->index, &value, -1); json_object_set_string_member(new, cd->key, value); g_free(value); } json_array_add_object_element(priv->ja, new); return FALSE; } static void trg_persistent_tree_view_save(TrgPrefs * prefs, void *wdp) { trg_pref_widget_desc *wd = (trg_pref_widget_desc *) wdp; TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(wd->widget); GtkTreeModel *model = gtk_tree_view_get_model(priv->tv); JsonNode *node = trg_prefs_get_value(prefs, wd->key, JSON_NODE_ARRAY, wd->flags | TRG_PREFS_REPLACENODE); priv->ja = json_array_new(); gtk_tree_model_foreach(model, trg_persistent_tree_view_save_foreachfunc, wd->widget); json_node_take_array(node, priv->ja); trg_prefs_changed_emit_signal(prefs, wd->key); } trg_persistent_tree_view_column * trg_persistent_tree_view_add_column(TrgPersistentTreeView * ptv, gint index, const gchar * key, const gchar * label) { TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(ptv); trg_persistent_tree_view_column *cd = g_new0(trg_persistent_tree_view_column, 1); GtkCellRenderer *renderer; cd->key = g_strdup(key); cd->label = g_strdup(label); cd->index = index; cd->tv = ptv; renderer = gtk_cell_renderer_text_new(); g_object_set(G_OBJECT(renderer), "editable", TRUE, NULL); g_signal_connect(renderer, "edited", G_CALLBACK(trg_persistent_tree_view_edit), cd); cd->column = gtk_tree_view_column_new_with_attributes(cd->label, renderer, "text", cd->index, NULL); gtk_tree_view_column_set_resizable(cd->column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(priv->tv), cd->column); priv->columns = g_slist_append(priv->columns, cd); return cd; } static GtkTreeView * trg_persistent_tree_view_tree_view_new(TrgPersistentTreeView * ptv, GtkTreeModel * model) { GtkTreeView *tv = GTK_TREE_VIEW(gtk_tree_view_new_with_model(model)); GtkTreeSelection *selection; g_object_unref(G_OBJECT(model)); gtk_tree_view_set_rubber_banding(tv, TRUE); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(selection_changed_cb), ptv); return tv; } static void trg_persistent_tree_view_add_cb(GtkWidget * w, gpointer data) { TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(data); GtkTreeModel *model = gtk_tree_view_get_model(priv->tv); GtkTreeIter iter; GtkTreePath *path; gtk_list_store_append(GTK_LIST_STORE(model), &iter); path = gtk_tree_model_get_path(model, &iter); if (priv->addSelect) gtk_tree_view_set_cursor(priv->tv, path, priv->addSelect->column, TRUE); gtk_tree_path_free(path); } static void trg_persistent_tree_view_up_cb(GtkWidget * w, gpointer data) { TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(data); GtkTreeSelection *selection = gtk_tree_view_get_selection(priv->tv); GtkTreeModel *model; GtkTreeIter iter, prevIter; GtkTreePath *path; if (gtk_tree_selection_get_selected(selection, &model, &iter)) { path = gtk_tree_model_get_path(model, &iter); if (gtk_tree_path_prev(path) && gtk_tree_model_get_iter(model, &prevIter, path)) { gtk_list_store_move_before(GTK_LIST_STORE(model), &iter, &prevIter); selection_changed(TRG_PERSISTENT_TREE_VIEW(data), selection); } gtk_tree_path_free(path); } } static void trg_persistent_tree_view_down_cb(GtkWidget * w, gpointer data) { TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(data); GtkTreeSelection *selection = gtk_tree_view_get_selection(priv->tv); GtkTreeModel *model; GtkTreeIter iter, nextIter; if (gtk_tree_selection_get_selected(selection, &model, &iter)) { nextIter = iter; if (gtk_tree_model_iter_next(model, &nextIter)) { gtk_list_store_move_after(GTK_LIST_STORE(model), &iter, &nextIter); selection_changed(TRG_PERSISTENT_TREE_VIEW(data), selection); } } } static void trg_persistent_tree_view_del_cb(GtkWidget * w, gpointer data) { TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(data); GtkTreeSelection *selection = gtk_tree_view_get_selection(priv->tv); GtkTreeModel *model; GtkTreeIter iter; if (gtk_tree_selection_get_selected(selection, &model, &iter)) gtk_list_store_remove(GTK_LIST_STORE(model), &iter); } static void trg_persistent_tree_view_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { switch (property_id) { default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_persistent_tree_view_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(object); switch (property_id) { case PROP_PREFS: priv->prefs = g_value_get_object(value); break; case PROP_KEY: priv->key = g_strdup(g_value_get_pointer(value)); break; case PROP_MODEL: priv->model = g_value_get_object(value); break; case PROP_CONF_FLAGS: priv->conf_flags = g_value_get_int(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_persistent_tree_view_finalize(GObject * object) { TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(object); GSList *li; for (li = priv->columns; li; li = g_slist_next(li)) { trg_persistent_tree_view_column *cd = (trg_persistent_tree_view_column *) li->data; g_free(cd->key); g_free(cd->label); g_free(cd); } g_slist_free(priv->columns); g_free(priv->key); G_OBJECT_CLASS(trg_persistent_tree_view_parent_class)->finalize (object); } trg_pref_widget_desc * trg_persistent_tree_view_get_widget_desc(TrgPersistentTreeView * ptv) { TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(ptv); return priv->wd; } void trg_persistent_tree_view_set_add_select(TrgPersistentTreeView * ptv, trg_persistent_tree_view_column * cd) { TrgPersistentTreeViewPrivate *priv = GET_PRIVATE(ptv); priv->addSelect = cd; } static GObject *trg_persistent_tree_view_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *object; TrgPersistentTreeViewPrivate *priv; GtkWidget *hbox, *w; object = G_OBJECT_CLASS (trg_persistent_tree_view_parent_class)->constructor(type, n_construct_properties, construct_params); priv = GET_PRIVATE(object); hbox = trg_hbox_new(FALSE, 0); w = gtk_button_new_from_stock(GTK_STOCK_ADD); g_signal_connect(w, "clicked", G_CALLBACK(trg_persistent_tree_view_add_cb), object); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); w = priv->delButton = gtk_button_new_from_stock(GTK_STOCK_DELETE); gtk_widget_set_sensitive(w, FALSE); g_signal_connect(w, "clicked", G_CALLBACK(trg_persistent_tree_view_del_cb), object); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); w = priv->upButton = gtk_button_new_from_stock(GTK_STOCK_GO_UP); gtk_widget_set_sensitive(w, FALSE); g_signal_connect(w, "clicked", G_CALLBACK(trg_persistent_tree_view_up_cb), object); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); w = priv->downButton = gtk_button_new_from_stock(GTK_STOCK_GO_DOWN); gtk_widget_set_sensitive(w, FALSE); g_signal_connect(w, "clicked", G_CALLBACK(trg_persistent_tree_view_down_cb), object); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); priv->tv = trg_persistent_tree_view_tree_view_new(TRG_PERSISTENT_TREE_VIEW (object), priv->model); gtk_box_pack_start(GTK_BOX(object), my_scrolledwin_new(GTK_WIDGET(priv->tv)), TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(object), hbox, FALSE, FALSE, 4); priv->wd = trg_pref_widget_desc_new(GTK_WIDGET(priv->tv), priv->key, priv->conf_flags); priv->wd->widget = GTK_WIDGET(object); priv->wd->saveFunc = &trg_persistent_tree_view_save; priv->wd->refreshFunc = &trg_persistent_tree_view_refresh; return object; } static void trg_persistent_tree_view_class_init(TrgPersistentTreeViewClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(TrgPersistentTreeViewPrivate)); object_class->get_property = trg_persistent_tree_view_get_property; object_class->set_property = trg_persistent_tree_view_set_property; object_class->finalize = trg_persistent_tree_view_finalize; object_class->constructor = trg_persistent_tree_view_constructor; g_object_class_install_property(object_class, PROP_KEY, g_param_spec_pointer("conf-key", "Conf Key", "Conf Key", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_PREFS, g_param_spec_object("prefs", "Prefs", "Prefs", TRG_TYPE_PREFS, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_CONF_FLAGS, g_param_spec_int("conf-flags", "Conf Flags", "Conf Flags", INT_MIN, INT_MAX, TRG_PREFS_PROFILE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_MODEL, g_param_spec_object("persistent-model", "Persistent Model", "Persistent Model", GTK_TYPE_LIST_STORE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } static void trg_persistent_tree_view_init(TrgPersistentTreeView * self) { } TrgPersistentTreeView *trg_persistent_tree_view_new(TrgPrefs * prefs, GtkListStore * model, const gchar * key, gint conf_flags) { GObject *obj = g_object_new(TRG_TYPE_PERSISTENT_TREE_VIEW, "prefs", prefs, "conf-key", key, "persistent-model", model, "conf-flags", conf_flags, NULL); return TRG_PERSISTENT_TREE_VIEW(obj); } transmission-remote-gtk-1.4.1/src/trg-persistent-tree-view.h000066400000000000000000000056531341276053300241760ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _TRG_PERSISTENT_TREE_VIEW #define _TRG_PERSISTENT_TREE_VIEW #include #include #include "trg-preferences-dialog.h" G_BEGIN_DECLS #define TRG_TYPE_PERSISTENT_TREE_VIEW trg_persistent_tree_view_get_type() #define TRG_PERSISTENT_TREE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_PERSISTENT_TREE_VIEW, TrgPersistentTreeView)) #define TRG_PERSISTENT_TREE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_PERSISTENT_TREE_VIEW, TrgPersistentTreeViewClass)) #define TRG_IS_PERSISTENT_TREE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_PERSISTENT_TREE_VIEW)) #define TRG_IS_PERSISTENT_TREE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_PERSISTENT_TREE_VIEW)) #define TRG_PERSISTENT_TREE_VIEW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_PERSISTENT_TREE_VIEW, TrgPersistentTreeViewClass)) typedef struct { GtkVBox parent; } TrgPersistentTreeView; typedef struct { GtkTreeViewClass parent_class; } TrgPersistentTreeViewClass; GType trg_persistent_tree_view_get_type(void); typedef struct { GtkTreeViewColumn *column; gchar *key; gchar *label; TrgPersistentTreeView *tv; gint index; } trg_persistent_tree_view_column; TrgPersistentTreeView *trg_persistent_tree_view_new(TrgPrefs * prefs, GtkListStore * model, const gchar * key, gint conf_flags); trg_pref_widget_desc * trg_persistent_tree_view_get_widget_desc(TrgPersistentTreeView * ptv); void trg_persistent_tree_view_set_add_select(TrgPersistentTreeView * ptv, trg_persistent_tree_view_column * cd); trg_persistent_tree_view_column * trg_persistent_tree_view_add_column(TrgPersistentTreeView * ptv, gint index, const gchar * key, const gchar * label); G_END_DECLS #endif /* _TRG_PERSISTENT_TREE_VIEW */ transmission-remote-gtk-1.4.1/src/trg-preferences-dialog.c000066400000000000000000001117701341276053300236200ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include "hig.h" #include "trg-json-widgets.h" #include "trg-preferences-dialog.h" #include "trg-persistent-tree-view.h" #include "trg-main-window.h" #include "trg-prefs.h" #include "util.h" /* UI frontend to modify configurables stored in TrgConf. * To avoid lots of repetitive code, use our own functions for creating widgets * which also create a trg_pref_widget_desc structure and add it to a list. * This contains details of the config key, config flags etc, and a function * pointer for a save/display function. These are all called on save/load. */ #define TRG_PREFERENCES_DIALOG_GET_PRIVATE(object) \ (G_TYPE_INSTANCE_GET_PRIVATE ((object), TRG_TYPE_PREFERENCES_DIALOG, TrgPreferencesDialogPrivate)) G_DEFINE_TYPE(TrgPreferencesDialog, trg_preferences_dialog, GTK_TYPE_DIALOG) enum { PROP_0, PROP_TRG_CLIENT, PROP_MAIN_WINDOW }; struct _TrgPreferencesDialogPrivate { TrgMainWindow *win; TrgClient *client; TrgPrefs *prefs; GtkWidget *profileDelButton; GtkWidget *profileComboBox; GtkWidget *profileNameEntry; GtkWidget *fullUpdateCheck; GList *widgets; GtkWidget *notebook; }; static GObject *instance = NULL; static void trg_pref_widget_desc_free(trg_pref_widget_desc * wd) { g_free(wd->key); g_free(wd); } trg_pref_widget_desc *trg_pref_widget_desc_new(GtkWidget * w, gchar * key, int flags) { trg_pref_widget_desc *desc = g_new0(trg_pref_widget_desc, 1); desc->widget = w; desc->key = g_strdup(key); desc->flags = flags; return desc; } static void trg_pref_widget_refresh(TrgPreferencesDialog * dlg, trg_pref_widget_desc * wd) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); wd->refreshFunc(priv->prefs, wd); } static void trg_pref_widget_refresh_all(TrgPreferencesDialog * dlg) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); GList *li; for (li = priv->widgets; li; li = g_list_next(li)) trg_pref_widget_refresh(dlg, (trg_pref_widget_desc *) li->data); } static void trg_pref_widget_save(TrgPreferencesDialog * dlg, trg_pref_widget_desc * wd) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); wd->saveFunc(priv->prefs, wd); } static void trg_pref_widget_save_all(TrgPreferencesDialog * dlg) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); GList *li; if (trg_prefs_get_profile(priv->prefs) == NULL) return; trg_client_configlock(priv->client); for (li = priv->widgets; li; li = g_list_next(li)) { trg_pref_widget_desc *wd = (trg_pref_widget_desc *) li->data; trg_pref_widget_save(dlg, wd); } trg_client_configunlock(priv->client); } static void trg_preferences_dialog_set_property(GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec G_GNUC_UNUSED) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(object); switch (prop_id) { case PROP_MAIN_WINDOW: priv->win = g_value_get_object(value); break; case PROP_TRG_CLIENT: priv->client = g_value_get_pointer(value); priv->prefs = trg_client_get_prefs(priv->client); break; } } static void trg_preferences_response_cb(GtkDialog * dlg, gint res_id, gpointer data G_GNUC_UNUSED) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); GList *li; if (res_id == GTK_RESPONSE_OK) { trg_pref_widget_save_all(TRG_PREFERENCES_DIALOG(dlg)); trg_prefs_save(priv->prefs); } trg_main_window_reload_dir_aliases(priv->win); for (li = priv->widgets; li; li = g_list_next(li)) trg_pref_widget_desc_free((trg_pref_widget_desc *) li->data); g_list_free(priv->widgets); gtk_widget_destroy(GTK_WIDGET(dlg)); instance = NULL; } static void trg_preferences_dialog_get_property(GObject * object, guint prop_id, GValue * value, GParamSpec * pspec G_GNUC_UNUSED) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(object); switch (prop_id) { case PROP_MAIN_WINDOW: g_value_set_object(value, priv->win); break; case PROP_TRG_CLIENT: g_value_set_pointer(value, priv->client); break; } } static void entry_refresh(TrgPrefs * prefs, void *wdp) { trg_pref_widget_desc *wd = (trg_pref_widget_desc *) wdp; gchar *value = trg_prefs_get_string(prefs, wd->key, wd->flags); if (value) { gtk_entry_set_text(GTK_ENTRY(wd->widget), value); g_free(value); } else { gtk_entry_set_text(GTK_ENTRY(wd->widget), ""); } } static void entry_save(TrgPrefs * prefs, void *wdp) { trg_pref_widget_desc *wd = (trg_pref_widget_desc *) wdp; trg_prefs_set_string(prefs, wd->key, gtk_entry_get_text(GTK_ENTRY(wd->widget)), wd->flags); } static GtkWidget *trgp_entry_new(TrgPreferencesDialog * dlg, gchar * key, int flags) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); GtkWidget *w = gtk_entry_new(); trg_pref_widget_desc *wd = trg_pref_widget_desc_new(w, key, flags); wd->saveFunc = &entry_save; wd->refreshFunc = &entry_refresh; entry_refresh(priv->prefs, wd); priv->widgets = g_list_append(priv->widgets, wd); return w; } static void check_refresh(TrgPrefs * prefs, void *wdp) { trg_pref_widget_desc *wd = (trg_pref_widget_desc *) wdp; gboolean value = trg_prefs_get_bool(prefs, wd->key, wd->flags); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wd->widget), value); } static void check_save(TrgPrefs * prefs, void *wdp) { trg_pref_widget_desc *wd = (trg_pref_widget_desc *) wdp; trg_prefs_set_bool(prefs, wd->key, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (wd->widget)), wd->flags); } static void trgp_toggle_dependent(GtkToggleButton * b, gpointer data) { gtk_widget_set_sensitive(GTK_WIDGET(data), gtk_toggle_button_get_active(b)); } static GtkWidget *trgp_check_new(TrgPreferencesDialog * dlg, const char *mnemonic, gchar * key, int flags, GtkToggleButton * dependency) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); GtkWidget *w = gtk_check_button_new_with_mnemonic(mnemonic); trg_pref_widget_desc *wd = trg_pref_widget_desc_new(w, key, flags); wd->saveFunc = &check_save; wd->refreshFunc = &check_refresh; check_refresh(priv->prefs, wd); if (dependency) { g_signal_connect(dependency, "toggled", G_CALLBACK(trgp_toggle_dependent), w); gtk_widget_set_sensitive(w, gtk_toggle_button_get_active(dependency)); } priv->widgets = g_list_append(priv->widgets, wd); return w; } static void spin_refresh(TrgPrefs * prefs, void *wdp) { trg_pref_widget_desc *wd = (trg_pref_widget_desc *) wdp; GtkWidget *widget = wd->widget; gint value = trg_prefs_get_int(prefs, wd->key, wd->flags); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), value); } static void spin_save(TrgPrefs * prefs, void *wdp) { trg_pref_widget_desc *wd = (trg_pref_widget_desc *) wdp; trg_prefs_set_int(prefs, wd->key, gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON (wd->widget)), wd->flags); } static GtkWidget *trgp_spin_new(TrgPreferencesDialog * dlg, gchar * key, int low, int high, int step, int flags, GtkToggleButton * dependency) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); GtkWidget *w = gtk_spin_button_new_with_range(low, high, step); trg_pref_widget_desc *wd = trg_pref_widget_desc_new(w, key, flags); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(w), 0); wd->saveFunc = &spin_save; wd->refreshFunc = &spin_refresh; if (dependency) { g_signal_connect(dependency, "toggled", G_CALLBACK(trgp_toggle_dependent), w); gtk_widget_set_sensitive(w, gtk_toggle_button_get_active(dependency)); } spin_refresh(priv->prefs, wd); priv->widgets = g_list_append(priv->widgets, wd); return w; } static void toggle_filter_trackers(GtkToggleButton * w, gpointer win) { TrgStateSelector *selector = trg_main_window_get_state_selector(TRG_MAIN_WINDOW(win)); trg_state_selector_set_show_trackers(selector, gtk_toggle_button_get_active(w)); } static void toggle_directories_first(GtkToggleButton * w, gpointer win){ TrgStateSelector *selector = trg_main_window_get_state_selector(TRG_MAIN_WINDOW(win)); trg_state_selector_set_directories_first(selector, gtk_toggle_button_get_active(w)); } #if TRG_WITH_GRAPH static void toggle_graph(GtkToggleButton * w, gpointer win) { if (gtk_toggle_button_get_active(w)) trg_main_window_add_graph(TRG_MAIN_WINDOW(win), TRUE); else trg_main_window_remove_graph(TRG_MAIN_WINDOW(win)); } #endif static void toggle_tray_icon(GtkToggleButton * w, gpointer win) { if (gtk_toggle_button_get_active(w)) trg_main_window_add_status_icon(TRG_MAIN_WINDOW(win)); else trg_main_window_remove_status_icon(TRG_MAIN_WINDOW(win)); } static void menu_bar_toggle_filter_dirs(GtkToggleButton * w, gpointer win) { TrgStateSelector *selector = trg_main_window_get_state_selector(TRG_MAIN_WINDOW(win)); trg_state_selector_set_show_dirs(selector, gtk_toggle_button_get_active(w)); } static void view_states_toggled_cb(GtkToggleButton * w, gpointer data) { GtkWidget *scroll = gtk_widget_get_parent(GTK_WIDGET (trg_main_window_get_state_selector (TRG_MAIN_WINDOW(data)))); trg_widget_set_visible(scroll, gtk_toggle_button_get_active(w)); } static void notebook_toggled_cb(GtkToggleButton * b, gpointer data) { trg_main_window_notebook_set_visible(TRG_MAIN_WINDOW(data), gtk_toggle_button_get_active(b)); } static void trgp_double_special_dependent(GtkWidget * widget, gpointer data) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(gtk_widget_get_toplevel (widget)); gtk_widget_set_sensitive(GTK_WIDGET(data), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widget)) && gtk_widget_get_sensitive (priv->fullUpdateCheck) && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (priv-> fullUpdateCheck))); } static GtkWidget *trg_prefs_generalPage(TrgPreferencesDialog * dlg) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); GtkWidget *w, *activeOnly, *t; guint row = 0; t = hig_workarea_create(); hig_workarea_add_section_title(t, &row, _("Updates")); activeOnly = w = trgp_check_new(dlg, _("Update active torrents only"), TRG_PREFS_KEY_UPDATE_ACTIVE_ONLY, TRG_PREFS_PROFILE, NULL); hig_workarea_add_wide_control(t, &row, w); priv->fullUpdateCheck = trgp_check_new(dlg, _ ("Full update every (?) updates"), TRG_PREFS_ACTIVEONLY_FULLSYNC_ENABLED, TRG_PREFS_PROFILE, GTK_TOGGLE_BUTTON(activeOnly)); w = trgp_spin_new(dlg, TRG_PREFS_ACTIVEONLY_FULLSYNC_EVERY, 2, INT_MAX, 1, TRG_PREFS_PROFILE, GTK_TOGGLE_BUTTON(priv->fullUpdateCheck)); g_signal_connect(activeOnly, "toggled", G_CALLBACK(trgp_double_special_dependent), w); hig_workarea_add_row_w(t, &row, priv->fullUpdateCheck, w, NULL); w = trgp_spin_new(dlg, TRG_PREFS_KEY_UPDATE_INTERVAL, 1, INT_MAX, 1, TRG_PREFS_PROFILE, NULL); hig_workarea_add_row(t, &row, _("Update interval:"), w, NULL); w = trgp_spin_new(dlg, TRG_PREFS_KEY_MINUPDATE_INTERVAL, 1, INT_MAX, 1, TRG_PREFS_PROFILE, NULL); hig_workarea_add_row(t, &row, _("Minimised update interval:"), w, NULL); w = trgp_spin_new(dlg, TRG_PREFS_KEY_SESSION_UPDATE_INTERVAL, 1, INT_MAX, 1, TRG_PREFS_PROFILE, NULL); hig_workarea_add_row(t, &row, _("Session update interval:"), w, NULL); hig_workarea_add_section_title(t, &row, _("Torrents")); w = trgp_check_new(dlg, _("Start paused"), TRG_PREFS_KEY_START_PAUSED, TRG_PREFS_GLOBAL, NULL); hig_workarea_add_wide_control(t, &row, w); w = trgp_check_new(dlg, _("Options dialog on add"), TRG_PREFS_KEY_ADD_OPTIONS_DIALOG, TRG_PREFS_GLOBAL, NULL); hig_workarea_add_wide_control(t, &row, w); w = trgp_check_new(dlg, _("Delete local .torrent file after adding"), TRG_PREFS_KEY_DELETE_LOCAL_TORRENT, TRG_PREFS_GLOBAL, NULL); hig_workarea_add_wide_control(t, &row, w); return t; } static void profile_changed_cb(GtkWidget * w, gpointer data) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(data); GtkTreeModel *model = gtk_combo_box_get_model(GTK_COMBO_BOX(w)); gint n_children = gtk_tree_model_iter_n_children(model, NULL); GtkTreeIter iter; JsonObject *profile; trg_pref_widget_save_all(TRG_PREFERENCES_DIALOG(data)); if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(w), &iter)) { gtk_tree_model_get(model, &iter, 0, &profile, -1); trg_prefs_set_profile(priv->prefs, profile); trg_pref_widget_refresh_all(TRG_PREFERENCES_DIALOG(data)); gtk_widget_set_sensitive(priv->profileDelButton, n_children > 1); } else { gtk_widget_set_sensitive(priv->profileDelButton, FALSE); gtk_combo_box_set_active(GTK_COMBO_BOX(w), 0); } } static void trg_prefs_profile_combo_populate(TrgPreferencesDialog * dialog, GtkComboBox * combo, TrgPrefs * prefs) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dialog); gint profile_id = trg_prefs_get_int(prefs, TRG_PREFS_KEY_PROFILE_ID, TRG_PREFS_GLOBAL); GtkListStore *store = GTK_LIST_STORE(gtk_combo_box_get_model(combo)); GList *profiles = json_array_get_elements(trg_prefs_get_profiles(prefs)); GList *li; int i = 0; for (li = profiles; li; li = g_list_next(li)) { JsonObject *profile = json_node_get_object((JsonNode *) li->data); const gchar *name_value; GtkTreeIter iter; if (json_object_has_member(profile, TRG_PREFS_KEY_PROFILE_NAME)) { name_value = json_object_get_string_member(profile, TRG_PREFS_KEY_PROFILE_NAME); } else { name_value = _(TRG_PROFILE_NAME_DEFAULT); } gtk_list_store_insert_with_values(store, &iter, INT_MAX, 0, profile, 1, name_value, -1); if (i == profile_id) gtk_combo_box_set_active_iter(combo, &iter); i++; } gtk_widget_set_sensitive(priv->profileDelButton, g_list_length(profiles) > 1); g_list_free(profiles); } static GtkWidget *trg_prefs_profile_combo_new(TrgClient * tc) { GtkWidget *w; GtkCellRenderer *r; GtkListStore *store = gtk_list_store_new(2, G_TYPE_POINTER, G_TYPE_STRING); w = gtk_combo_box_new_with_model(GTK_TREE_MODEL(store)); r = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(w), r, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(w), r, "text", 1); return w; } static void name_changed_cb(GtkWidget * w, gpointer data) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(data); GtkTreeIter iter; GtkTreeModel *model; GtkComboBox *combo; combo = GTK_COMBO_BOX(priv->profileComboBox); model = gtk_combo_box_get_model(combo); if (gtk_combo_box_get_active_iter(combo, &iter)) { gtk_list_store_set(GTK_LIST_STORE(model), &iter, 1, gtk_entry_get_text(GTK_ENTRY(w)), -1); } } static void del_profile_cb(GtkWidget * w, gpointer data) { GtkWidget *win = gtk_widget_get_toplevel(w); TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(win); TrgPrefs *prefs = priv->prefs; GtkComboBox *combo = GTK_COMBO_BOX(data); GtkTreeModel *profileModel = gtk_combo_box_get_model(combo); GtkTreeIter iter; JsonObject *profile; if (gtk_combo_box_get_active_iter(combo, &iter)) { gtk_tree_model_get(profileModel, &iter, 0, &profile, -1); trg_prefs_del_profile(prefs, profile); trg_prefs_set_profile(prefs, NULL); gtk_list_store_remove(GTK_LIST_STORE(profileModel), &iter); gtk_combo_box_set_active(combo, 0); } } static void add_profile_cb(GtkWidget * w, gpointer data) { GtkWidget *win = gtk_widget_get_toplevel(w); TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(win); GtkComboBox *combo = GTK_COMBO_BOX(data); GtkTreeModel *profileModel = gtk_combo_box_get_model(combo); GtkTreeIter iter; JsonObject *profile = trg_prefs_new_profile(priv->prefs); gtk_list_store_insert_with_values(GTK_LIST_STORE(profileModel), &iter, INT_MAX, 0, profile, 1, _(TRG_PROFILE_NAME_DEFAULT), -1); gtk_combo_box_set_active_iter(combo, &iter); } static GtkWidget *trg_prefs_openExecPage(TrgPreferencesDialog * dlg) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); GtkWidget *t; TrgPersistentTreeView *ptv; GtkListStore *model; trg_pref_widget_desc *wd; guint row = 0; t = hig_workarea_create(); hig_workarea_add_section_title(t, &row, _("Commands")); model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING); ptv = trg_persistent_tree_view_new(priv->prefs, model, TRG_PREFS_KEY_EXEC_COMMANDS, TRG_PREFS_CONNECTION); trg_persistent_tree_view_set_add_select(ptv, trg_persistent_tree_view_add_column (ptv, 0, TRG_PREFS_SUBKEY_LABEL, _("Label"))); trg_persistent_tree_view_add_column(ptv, 1, TRG_PREFS_KEY_EXEC_COMMANDS_SUBKEY_CMD, _("Command")); wd = trg_persistent_tree_view_get_widget_desc(ptv); trg_pref_widget_refresh(dlg, wd); priv->widgets = g_list_append(priv->widgets, wd); hig_workarea_add_wide_tall_control(t, &row, GTK_WIDGET(ptv)); return t; } #ifdef HAVE_RSS static GtkWidget *trg_prefs_rss_page(TrgPreferencesDialog * dlg) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); GtkWidget *t; guint row = 0; TrgPersistentTreeView *ptv; trg_pref_widget_desc *wd; GtkListStore *model; t = hig_workarea_create(); hig_workarea_add_section_title(t, &row, _("RSS Feeds")); model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING); ptv = trg_persistent_tree_view_new(priv->prefs, model, TRG_PREFS_KEY_RSS, TRG_PREFS_GLOBAL); trg_persistent_tree_view_set_add_select(ptv, trg_persistent_tree_view_add_column (ptv, 0, TRG_PREFS_RSS_SUBKEY_ID, _("Name"))); trg_persistent_tree_view_add_column(ptv, 1, TRG_PREFS_RSS_SUBKEY_URL, _("URL")); wd = trg_persistent_tree_view_get_widget_desc(ptv); trg_pref_widget_refresh(dlg, wd); priv->widgets = g_list_append(priv->widgets, wd); hig_workarea_add_wide_tall_control(t, &row, GTK_WIDGET(ptv)); return t; } #endif static GtkWidget *trg_prefs_dirsPage(TrgPreferencesDialog * dlg) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); GtkWidget *t; TrgPersistentTreeView *ptv; GtkListStore *model; trg_pref_widget_desc *wd; guint row = 0; t = hig_workarea_create(); hig_workarea_add_section_title(t, &row, _("Remote Download Directories")); model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING); ptv = trg_persistent_tree_view_new(priv->prefs, model, TRG_PREFS_KEY_DESTINATIONS, TRG_PREFS_CONNECTION); trg_persistent_tree_view_set_add_select(ptv, trg_persistent_tree_view_add_column (ptv, 0, TRG_PREFS_SUBKEY_LABEL, _("Label"))); trg_persistent_tree_view_add_column(ptv, 1, TRG_PREFS_KEY_DESTINATIONS_SUBKEY_DIR, _("Directory")); wd = trg_persistent_tree_view_get_widget_desc(ptv); trg_pref_widget_refresh(dlg, wd); priv->widgets = g_list_append(priv->widgets, wd); hig_workarea_add_wide_tall_control(t, &row, GTK_WIDGET(ptv)); return t; } static GtkWidget *trg_prefs_viewPage(TrgPreferencesDialog * dlg) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); GtkWidget *w, *dep, *t, *tray; guint row = 0; gboolean _is_unity = is_unity(); gchar *tray_label; t = hig_workarea_create(); hig_workarea_add_section_title(t, &row, _("View")); dep = w = trgp_check_new(dlg, _("State selector"), TRG_PREFS_KEY_SHOW_STATE_SELECTOR, TRG_PREFS_GLOBAL, NULL); g_signal_connect(G_OBJECT(w), "toggled", G_CALLBACK(view_states_toggled_cb), priv->win); hig_workarea_add_wide_control(t, &row, w); w = trgp_check_new(dlg, _("Directory filters"), TRG_PREFS_KEY_FILTER_DIRS, TRG_PREFS_GLOBAL, GTK_TOGGLE_BUTTON(dep)); g_signal_connect(G_OBJECT(w), "toggled", G_CALLBACK(menu_bar_toggle_filter_dirs), priv->win); hig_workarea_add_wide_control(t, &row, w); w = trgp_check_new(dlg, _("Tracker filters"), TRG_PREFS_KEY_FILTER_TRACKERS, TRG_PREFS_GLOBAL, GTK_TOGGLE_BUTTON(dep)); g_signal_connect(G_OBJECT(w), "toggled", G_CALLBACK(toggle_filter_trackers), priv->win); hig_workarea_add_wide_control(t, &row, w); w = trgp_check_new(dlg, _("Directories first"), TRG_PREFS_KEY_DIRECTORIES_FIRST, TRG_PREFS_GLOBAL, GTK_TOGGLE_BUTTON(dep)); g_signal_connect(G_OBJECT(w), "toggled", G_CALLBACK(toggle_directories_first), priv->win); hig_workarea_add_wide_control(t, &row, w); w = trgp_check_new(dlg, _("Torrent Details"), TRG_PREFS_KEY_SHOW_NOTEBOOK, TRG_PREFS_GLOBAL, NULL); g_signal_connect(G_OBJECT(w), "toggled", G_CALLBACK(notebook_toggled_cb), priv->win); hig_workarea_add_wide_control(t, &row, w); #if TRG_WITH_GRAPH w = trgp_check_new(dlg, _("Show graph"), TRG_PREFS_KEY_SHOW_GRAPH, TRG_PREFS_GLOBAL, GTK_TOGGLE_BUTTON(w)); g_signal_connect(G_OBJECT(w), "toggled", G_CALLBACK(toggle_graph), priv->win); hig_workarea_add_wide_control(t, &row, w); #endif hig_workarea_add_section_title(t, &row, _("System Tray")); if (_is_unity) { tray_label = _("Show in system tray (needs whitelisting in unity)"); } else { tray_label = _("Show in system tray"); } tray = trgp_check_new(dlg, tray_label, TRG_PREFS_KEY_SYSTEM_TRAY, TRG_PREFS_GLOBAL, NULL); g_signal_connect(G_OBJECT(tray), "toggled", G_CALLBACK(toggle_tray_icon), priv->win); hig_workarea_add_wide_control(t, &row, tray); w = trgp_check_new(dlg, _("Minimise to system tray"), TRG_PREFS_KEY_SYSTEM_TRAY_MINIMISE, TRG_PREFS_GLOBAL, NULL); gtk_widget_set_sensitive(w, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(tray))); g_signal_connect(G_OBJECT(tray), "toggled", G_CALLBACK(toggle_active_arg_is_sensitive), w); hig_workarea_add_wide_control(t, &row, w); #ifdef HAVE_LIBNOTIFY hig_workarea_add_section_title(t, &row, _("Notifications")); w = trgp_check_new(dlg, _("Torrent added notifications"), TRG_PREFS_KEY_ADD_NOTIFY, TRG_PREFS_GLOBAL, NULL); hig_workarea_add_wide_control(t, &row, w); w = trgp_check_new(dlg, _("Torrent complete notifications"), TRG_PREFS_KEY_COMPLETE_NOTIFY, TRG_PREFS_GLOBAL, NULL); hig_workarea_add_wide_control(t, &row, w); #endif return t; } static GtkWidget *trg_prefs_serverPage(TrgPreferencesDialog * dlg) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg); TrgPrefs *prefs = priv->prefs; GtkWidget *w, *t, *frame, *frameHbox, *profileLabel; GtkWidget *profileButtonsHbox; guint row = 0; t = hig_workarea_create(); /* Profile */ priv->profileNameEntry = trgp_entry_new(dlg, TRG_PREFS_KEY_PROFILE_NAME, TRG_PREFS_PROFILE); priv->profileComboBox = trg_prefs_profile_combo_new(priv->client); profileLabel = gtk_label_new(_("Profile: ")); profileButtonsHbox = trg_hbox_new(FALSE, 0); w = gtk_button_new_from_stock(GTK_STOCK_NEW); g_signal_connect(w, "clicked", G_CALLBACK(add_profile_cb), priv->profileComboBox); gtk_box_pack_start(GTK_BOX(profileButtonsHbox), w, FALSE, FALSE, 4); priv->profileDelButton = gtk_button_new_from_stock(GTK_STOCK_DELETE); g_signal_connect(priv->profileDelButton, "clicked", G_CALLBACK(del_profile_cb), priv->profileComboBox); gtk_widget_set_sensitive(priv->profileDelButton, FALSE); gtk_box_pack_start(GTK_BOX(profileButtonsHbox), priv->profileDelButton, FALSE, FALSE, 4); trg_prefs_profile_combo_populate(dlg, GTK_COMBO_BOX(priv->profileComboBox), prefs); g_signal_connect(G_OBJECT(priv->profileComboBox), "changed", G_CALLBACK(profile_changed_cb), dlg); /* Name */ g_signal_connect(priv->profileNameEntry, "changed", G_CALLBACK(name_changed_cb), dlg); hig_workarea_add_row(t, &row, _("Name:"), priv->profileNameEntry, NULL); hig_workarea_add_wide_control(t, &row, profileButtonsHbox); hig_workarea_add_section_title(t, &row, _("Connection")); w = trgp_entry_new(dlg, TRG_PREFS_KEY_HOSTNAME, TRG_PREFS_PROFILE); hig_workarea_add_row(t, &row, _("Host:"), w, NULL); w = trgp_spin_new(dlg, TRG_PREFS_KEY_PORT, 1, 65535, 1, TRG_PREFS_PROFILE, NULL); hig_workarea_add_row(t, &row, _("Port:"), w, NULL); w = trgp_entry_new(dlg, TRG_PREFS_KEY_RPC_URL_PATH, TRG_PREFS_PROFILE); hig_workarea_add_row(t, &row, _("RPC URL Path:"), w, NULL); w = trgp_entry_new(dlg, TRG_PREFS_KEY_USERNAME, TRG_PREFS_PROFILE); hig_workarea_add_row(t, &row, _("Username:"), w, NULL); w = trgp_entry_new(dlg, TRG_PREFS_KEY_PASSWORD, TRG_PREFS_PROFILE); gtk_entry_set_visibility(GTK_ENTRY(w), FALSE); hig_workarea_add_row(t, &row, _("Password:"), w, NULL); w = trgp_check_new(dlg, _("Automatically connect"), TRG_PREFS_KEY_AUTO_CONNECT, TRG_PREFS_PROFILE, NULL); hig_workarea_add_wide_control(t, &row, w); #ifndef CURL_NO_SSL w = trgp_check_new(dlg, _("SSL"), TRG_PREFS_KEY_SSL, TRG_PREFS_PROFILE, NULL); hig_workarea_add_wide_control(t, &row, w); w = trgp_check_new(dlg, _("Validate SSL Certificate"), TRG_PREFS_KEY_SSL_VALIDATE, TRG_PREFS_PROFILE, GTK_TOGGLE_BUTTON(w)); hig_workarea_add_wide_control(t, &row, w); #endif w = trgp_spin_new(dlg, TRG_PREFS_KEY_TIMEOUT, 1, 3600, 1, TRG_PREFS_PROFILE, NULL); hig_workarea_add_row(t, &row, _("Timeout:"), w, NULL); w = trgp_spin_new(dlg, TRG_PREFS_KEY_RETRIES, 0, 3600, 1, TRG_PREFS_PROFILE, NULL); hig_workarea_add_row(t, &row, _("Retries:"), w, NULL); frame = gtk_frame_new(NULL); frameHbox = trg_hbox_new(FALSE, 2); gtk_box_pack_start(GTK_BOX(frameHbox), profileLabel, FALSE, FALSE, 2); gtk_box_pack_start(GTK_BOX(frameHbox), priv->profileComboBox, FALSE, FALSE, 4); gtk_frame_set_label_widget(GTK_FRAME(frame), frameHbox); gtk_container_set_border_width(GTK_CONTAINER(frame), 5); gtk_container_add(GTK_CONTAINER(frame), t); return frame; } static GObject *trg_preferences_dialog_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *object; TrgPreferencesDialogPrivate *priv; GtkWidget *notebook, *contentvbox; object = G_OBJECT_CLASS (trg_preferences_dialog_parent_class)->constructor(type, n_construct_properties, construct_params); priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(object); contentvbox = gtk_dialog_get_content_area(GTK_DIALOG(object)); gtk_window_set_transient_for(GTK_WINDOW(object), GTK_WINDOW(priv->win)); gtk_window_set_destroy_with_parent(GTK_WINDOW(object), TRUE); gtk_dialog_add_button(GTK_DIALOG(object), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); gtk_dialog_add_button(GTK_DIALOG(object), GTK_STOCK_OK, GTK_RESPONSE_OK); gtk_dialog_set_default_response(GTK_DIALOG(object), GTK_RESPONSE_OK); gtk_window_set_title(GTK_WINDOW(object), _("Local Preferences")); gtk_container_set_border_width(GTK_CONTAINER(object), GUI_PAD); g_signal_connect(G_OBJECT(object), "response", G_CALLBACK(trg_preferences_response_cb), NULL); notebook = priv->notebook = gtk_notebook_new(); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), trg_prefs_serverPage(TRG_PREFERENCES_DIALOG (object)), gtk_label_new(_("Connection"))); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), trg_prefs_generalPage(TRG_PREFERENCES_DIALOG (object)), gtk_label_new(_("General"))); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), trg_prefs_viewPage(TRG_PREFERENCES_DIALOG (object)), gtk_label_new(_("View"))); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), trg_prefs_openExecPage(TRG_PREFERENCES_DIALOG (object)), gtk_label_new(_("Actions"))); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), trg_prefs_dirsPage(TRG_PREFERENCES_DIALOG (object)), gtk_label_new(_("Directories"))); #ifdef HAVE_RSS gtk_notebook_append_page(GTK_NOTEBOOK(notebook), trg_prefs_rss_page(TRG_PREFERENCES_DIALOG (object)), gtk_label_new(_("RSS Feeds"))); #endif gtk_container_set_border_width(GTK_CONTAINER(notebook), GUI_PAD); gtk_box_pack_start(GTK_BOX(contentvbox), notebook, TRUE, TRUE, 0); return object; } void trg_preferences_dialog_set_page(TrgPreferencesDialog *pref_dlg, guint page) { TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(pref_dlg); gtk_notebook_set_current_page(GTK_NOTEBOOK(priv->notebook), page); } static void trg_preferences_dialog_init(TrgPreferencesDialog * pref_dlg) { } static void trg_preferences_dialog_class_init(TrgPreferencesDialogClass * class) { GObjectClass *g_object_class = (GObjectClass *) class; g_object_class->constructor = trg_preferences_dialog_constructor; g_object_class->set_property = trg_preferences_dialog_set_property; g_object_class->get_property = trg_preferences_dialog_get_property; g_object_class_install_property(g_object_class, PROP_TRG_CLIENT, g_param_spec_pointer("trg-client", "TClient", "Client", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(g_object_class, PROP_MAIN_WINDOW, g_param_spec_object("main-window", "Main Window", "Main Window", TRG_TYPE_MAIN_WINDOW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_type_class_add_private(g_object_class, sizeof(TrgPreferencesDialogPrivate)); } GtkWidget *trg_preferences_dialog_get_instance(TrgMainWindow * win, TrgClient * client) { if (!instance) instance = g_object_new(TRG_TYPE_PREFERENCES_DIALOG, "main-window", win, "trg-client", client, NULL); return GTK_WIDGET(instance); } transmission-remote-gtk-1.4.1/src/trg-preferences-dialog.h000066400000000000000000000053021341276053300236160ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_PREFERENCES_WINDOW_H_ #define TRG_PREFERENCES_WINDOW_H_ #include #include #include #include "trg-main-window.h" G_BEGIN_DECLS typedef struct _TrgPreferencesDialog TrgPreferencesDialog; typedef struct _TrgPreferencesDialogClass TrgPreferencesDialogClass; typedef struct _TrgPreferencesDialogPrivate TrgPreferencesDialogPrivate; #define TRG_TYPE_PREFERENCES_DIALOG (trg_preferences_dialog_get_type ()) #define TRG_PREFERENCES_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TRG_TYPE_PREFERENCES_DIALOG, TrgPreferencesDialog)) #define TRG_PREFERENCES_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TRG_TYPE_PREFERENCES_DIALOG, TrgPreferencesDialogClass)) #define TRG_IS_PREFERENCES_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TRG_TYPE_PREFERENCES_DIALOG)) #define TRG_IS_PREFERENCES_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TRG_TYPE_PREFERENCES_DIALOG)) #define TRG_PREFERENCES_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TRG_TYPE_PREFERENCES_DIALOG, TrgPreferencesDialogClass)) typedef struct { GtkWidget *widget; int flags; gchar *key; void (*saveFunc) (TrgPrefs *, void *); void (*refreshFunc) (TrgPrefs *, void *); } trg_pref_widget_desc; struct _TrgPreferencesDialog { GtkDialog dialog; TrgPreferencesDialogPrivate *priv; }; struct _TrgPreferencesDialogClass { GtkDialogClass parent_class; }; GType trg_preferences_dialog_get_type(void); GtkWidget *trg_preferences_dialog_get_instance(TrgMainWindow * win, TrgClient * client); trg_pref_widget_desc *trg_pref_widget_desc_new(GtkWidget * w, gchar * key, int flags); void trg_preferences_dialog_set_page(TrgPreferencesDialog *pref_dlg, guint page); G_END_DECLS #endif /* TRG_PREFERENCES_WINDOW_H_ */ transmission-remote-gtk-1.4.1/src/trg-prefs.c000066400000000000000000000424051341276053300211770ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include "util.h" #include "torrent.h" #include "trg-client.h" #include "trg-prefs.h" /* I replaced GConf with this custom configuration backend for a few reasons. * 1) Better windows support. No dependency on DBus. * 2) We're including a JSON parser/writer anyway. * 3) The GConf API is pretty verbose sometimes, working with lists is awkward. * 4) Easily switch between profiles, and scope config to either profiles or global. * 5) Transparently use configurables from the current connection, not current profile. */ G_DEFINE_TYPE(TrgPrefs, trg_prefs, G_TYPE_OBJECT) struct _TrgPrefsPrivate { JsonObject *defaultsObj; JsonNode *user; JsonObject *userObj; JsonObject *connectionObj; JsonObject *profile; gchar *file; }; enum { PREF_CHANGE, PREF_PROFILE_CHANGE, PREFS_SIGNAL_COUNT }; static guint signals[PREFS_SIGNAL_COUNT] = { 0 }; void trg_prefs_profile_change_emit_signal(TrgPrefs * p) { g_signal_emit(p, signals[PREF_PROFILE_CHANGE], 0); } void trg_prefs_changed_emit_signal(TrgPrefs * p, const gchar * key) { g_signal_emit(p, signals[PREF_CHANGE], 0, key); } static void trg_prefs_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } static void trg_prefs_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } static void trg_prefs_dispose(GObject * object) { G_OBJECT_CLASS(trg_prefs_parent_class)->dispose(object); } static void trg_prefs_create_defaults(TrgPrefs * p) { TrgPrefsPrivate *priv = p->priv; priv->defaultsObj = json_object_new(); trg_prefs_add_default_string(p, TRG_PREFS_KEY_PROFILE_NAME, _(TRG_PROFILE_NAME_DEFAULT)); trg_prefs_add_default_string(p, TRG_PREFS_KEY_RPC_URL_PATH, "/transmission/rpc"); trg_prefs_add_default_int(p, TRG_PREFS_KEY_PORT, 9091); trg_prefs_add_default_int(p, TRG_PREFS_KEY_UPDATE_INTERVAL, TRG_INTERVAL_DEFAULT); trg_prefs_add_default_int(p, TRG_PREFS_KEY_SESSION_UPDATE_INTERVAL, TRG_SESSION_INTERVAL_DEFAULT); trg_prefs_add_default_int(p, TRG_PREFS_KEY_MINUPDATE_INTERVAL, TRG_INTERVAL_DEFAULT); trg_prefs_add_default_int(p, TRG_PREFS_ACTIVEONLY_FULLSYNC_EVERY, 2); trg_prefs_add_default_int(p, TRG_PREFS_KEY_STATES_PANED_POS, 120); trg_prefs_add_default_int(p, TRG_PREFS_KEY_TIMEOUT, 40); trg_prefs_add_default_int(p, TRG_PREFS_KEY_RETRIES, 3); trg_prefs_add_default_bool_true(p, TRG_PREFS_KEY_FILTER_DIRS); trg_prefs_add_default_bool_true(p, TRG_PREFS_KEY_FILTER_TRACKERS); trg_prefs_add_default_bool_true(p, TRG_PREFS_KEY_DIRECTORIES_FIRST); trg_prefs_add_default_bool_true(p, TRG_PREFS_KEY_SHOW_GRAPH); trg_prefs_add_default_bool_true(p, TRG_PREFS_KEY_ADD_OPTIONS_DIALOG); trg_prefs_add_default_bool_true(p, TRG_PREFS_KEY_SHOW_STATE_SELECTOR); //trg_prefs_add_default_bool_true(p, TRG_PREFS_KEY_SHOW_NOTEBOOK); } static GObject *trg_prefs_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *object = G_OBJECT_CLASS (trg_prefs_parent_class)->constructor(type, n_construct_properties, construct_params); TrgPrefs *prefs = TRG_PREFS(object); TrgPrefsPrivate *priv = prefs->priv; trg_prefs_create_defaults(prefs); priv->file = g_build_filename(g_get_user_config_dir(), g_get_application_name(), TRG_PREFS_FILENAME, NULL); return object; } static void trg_prefs_class_init(TrgPrefsClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(TrgPrefsPrivate)); object_class->get_property = trg_prefs_get_property; object_class->set_property = trg_prefs_set_property; object_class->dispose = trg_prefs_dispose; object_class->constructor = trg_prefs_constructor; signals[PREF_CHANGE] = g_signal_new("pref-changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET(TrgPrefsClass, pref_changed), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[PREF_PROFILE_CHANGE] = g_signal_new("pref-profile-changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET(TrgPrefsClass, pref_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } static void trg_prefs_init(TrgPrefs * self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE(self, TRG_TYPE_PREFS, TrgPrefsPrivate); } TrgPrefs *trg_prefs_new(void) { return g_object_new(TRG_TYPE_PREFS, NULL); } static JsonObject *trg_prefs_new_profile_object(void) { return json_object_new(); } void trg_prefs_add_default_int(TrgPrefs * p, const gchar * key, int value) { TrgPrefsPrivate *priv = p->priv; json_object_set_int_member(priv->defaultsObj, key, value); } void trg_prefs_add_default_string(TrgPrefs * p, const gchar * key, gchar * value) { TrgPrefsPrivate *priv = p->priv; json_object_set_string_member(priv->defaultsObj, key, value); } void trg_prefs_add_default_double(TrgPrefs * p, const gchar * key, double value) { TrgPrefsPrivate *priv = p->priv; json_object_set_double_member(priv->defaultsObj, key, value); } /* Not much point adding a default of FALSE, as that's the fallback */ void trg_prefs_add_default_bool_true(TrgPrefs * p, const gchar * key) { TrgPrefsPrivate *priv = p->priv; json_object_set_boolean_member(priv->defaultsObj, key, TRUE); } gint trg_prefs_get_profile_id(TrgPrefs * p) { TrgPrefsPrivate *priv = p->priv; return (gint) json_object_get_int_member(priv->userObj, TRG_PREFS_KEY_PROFILE_ID); } static JsonNode *trg_prefs_get_value_inner(JsonObject * obj, const gchar * key, int type, int flags) { if (json_object_has_member(obj, key)) { if ((flags & TRG_PREFS_REPLACENODE)) json_object_remove_member(obj, key); else return json_object_get_member(obj, key); } if ((flags & TRG_PREFS_NEWNODE) || (flags & TRG_PREFS_REPLACENODE)) { JsonNode *newNode = json_node_new(type); json_object_set_member(obj, key, newNode); return newNode; } return NULL; } JsonNode *trg_prefs_get_value(TrgPrefs * p, const gchar * key, int type, int flags) { TrgPrefsPrivate *priv = p->priv; JsonNode *res; if (priv->profile && (flags & TRG_PREFS_PROFILE)) { if ((res = trg_prefs_get_value_inner(priv->profile, key, type, flags))) return res; } else if (priv->connectionObj && (flags & TRG_PREFS_CONNECTION)) { if ((res = trg_prefs_get_value_inner(priv->connectionObj, key, type, flags))) return res; } else { if ((res = trg_prefs_get_value_inner(priv->userObj, key, type, flags))) return res; } if (priv->defaultsObj && json_object_has_member(priv->defaultsObj, key)) return json_object_get_member(priv->defaultsObj, key); return NULL; } void trg_prefs_set_connection(TrgPrefs * p, JsonObject * profile) { TrgPrefsPrivate *priv = p->priv; if (priv->connectionObj) json_object_unref(priv->connectionObj); if (profile) json_object_ref(profile); priv->connectionObj = profile; } gchar *trg_prefs_get_string(TrgPrefs * p, const gchar * key, int flags) { JsonNode *node = trg_prefs_get_value(p, key, JSON_NODE_VALUE, flags); if (node) return g_strdup(json_node_get_string(node)); else return NULL; } JsonArray *trg_prefs_get_array(TrgPrefs * p, const gchar * key, int flags) { JsonNode *node = trg_prefs_get_value(p, key, JSON_NODE_ARRAY, flags); if (node) return json_node_get_array(node); else return NULL; } gint64 trg_prefs_get_int(TrgPrefs * p, const gchar * key, int flags) { JsonNode *node = trg_prefs_get_value(p, key, JSON_NODE_VALUE, flags); if (node) return json_node_get_int(node); else return 0; } gdouble trg_prefs_get_double(TrgPrefs * p, const gchar * key, int flags) { JsonNode *node = trg_prefs_get_value(p, key, JSON_NODE_VALUE, flags); if (node) return json_node_get_double(node); else return 0.0; } gboolean trg_prefs_get_bool(TrgPrefs * p, const gchar * key, int flags) { JsonNode *node = trg_prefs_get_value(p, key, JSON_NODE_VALUE, flags); if (node) return json_node_get_boolean(node); else return FALSE; } void trg_prefs_set_int(TrgPrefs * p, const gchar * key, int value, int flags) { JsonNode *node = trg_prefs_get_value(p, key, JSON_NODE_VALUE, flags | TRG_PREFS_NEWNODE); json_node_set_int(node, (gint64) value); trg_prefs_changed_emit_signal(p, key); } void trg_prefs_set_string(TrgPrefs * p, const gchar * key, const gchar * value, int flags) { JsonNode *node = trg_prefs_get_value(p, key, JSON_NODE_VALUE, flags | TRG_PREFS_NEWNODE); json_node_set_string(node, value); trg_prefs_changed_emit_signal(p, key); } void trg_prefs_set_profile(TrgPrefs * p, JsonObject * profile) { TrgPrefsPrivate *priv = p->priv; GList *profiles = json_array_get_elements(trg_prefs_get_profiles(p)); gint i = 0; GList *li; priv->profile = profile; for (li = profiles; li; li = g_list_next(li)) { if (json_node_get_object((JsonNode *) li->data) == profile) { trg_prefs_set_int(p, TRG_PREFS_KEY_PROFILE_ID, i, TRG_PREFS_GLOBAL); break; } i++; } g_list_free(profiles); trg_prefs_changed_emit_signal(p, NULL); trg_prefs_profile_change_emit_signal(p); } JsonObject *trg_prefs_new_profile(TrgPrefs * p) { JsonArray *profiles = trg_prefs_get_profiles(p); JsonObject *newp = trg_prefs_new_profile_object(); json_array_add_object_element(profiles, newp); return newp; } void trg_prefs_del_profile(TrgPrefs * p, JsonObject * profile) { JsonArray *profiles = trg_prefs_get_profiles(p); GList *profilesList = json_array_get_elements(profiles); GList *li; JsonNode *node; int i = 0; for (li = profilesList; li; li = g_list_next(li)) { node = (JsonNode *) li->data; if (profile == json_node_get_object(node)) { json_array_remove_element(profiles, i); break; } i++; } g_list_free(profilesList); trg_prefs_profile_change_emit_signal(p); } JsonObject *trg_prefs_get_profile(TrgPrefs * p) { TrgPrefsPrivate *priv = p->priv; return priv->profile; } JsonObject *trg_prefs_get_connection(TrgPrefs * p) { TrgPrefsPrivate *priv = p->priv; return priv->connectionObj; } JsonArray *trg_prefs_get_profiles(TrgPrefs * p) { TrgPrefsPrivate *priv = p->priv; return json_object_get_array_member(priv->userObj, TRG_PREFS_KEY_PROFILES); } JsonArray *trg_prefs_get_rss(TrgPrefs *p) { TrgPrefsPrivate *priv = p->priv; return json_object_get_array_member(priv->userObj, TRG_PREFS_KEY_RSS); } void trg_prefs_set_double(TrgPrefs * p, const gchar * key, gdouble value, int flags) { JsonNode *node = trg_prefs_get_value(p, key, JSON_NODE_VALUE, flags | TRG_PREFS_NEWNODE); json_node_set_double(node, value); trg_prefs_changed_emit_signal(p, key); } void trg_prefs_set_bool(TrgPrefs * p, const gchar * key, gboolean value, int flags) { JsonNode *node = trg_prefs_get_value(p, key, JSON_NODE_VALUE, flags | TRG_PREFS_NEWNODE); json_node_set_boolean(node, value); trg_prefs_changed_emit_signal(p, key); } gboolean trg_prefs_save(TrgPrefs * p) { TrgPrefsPrivate *priv = p->priv; JsonGenerator *gen = json_generator_new(); gchar *dirName; gboolean success = TRUE; gboolean isNew = TRUE; dirName = g_path_get_dirname(priv->file); if (!g_file_test(dirName, G_FILE_TEST_IS_DIR)) { success = g_mkdir_with_parents(dirName, TRG_PREFS_DEFAULT_DIR_MODE) == 0; } else if (g_file_test(priv->file, G_FILE_TEST_IS_REGULAR)) { isNew = FALSE; } g_free(dirName); if (!success) { g_error ("Problem creating parent directory (permissions?) for: %s\n", priv->file); return success; } g_object_set(G_OBJECT(gen), "pretty", TRUE, NULL); json_generator_set_root(gen, priv->user); success = json_generator_to_file(gen, priv->file, NULL); if (!success) g_error("Problem writing configuration file (permissions?) to: %s", priv->file); else if (isNew) g_chmod(priv->file, 384); g_object_unref(gen); return success; } JsonObject *trg_prefs_get_root(TrgPrefs * p) { TrgPrefsPrivate *priv = p->priv; return priv->userObj; } static void trg_prefs_empty_init(TrgPrefs * p) { TrgPrefsPrivate *priv = p->priv; JsonArray *profiles = json_array_new(); priv->user = json_node_new(JSON_NODE_OBJECT); priv->userObj = json_object_new(); json_node_take_object(priv->user, priv->userObj); priv->profile = trg_prefs_new_profile_object(); json_array_add_object_element(profiles, priv->profile); json_object_set_array_member(priv->userObj, TRG_PREFS_KEY_PROFILES, profiles); json_object_set_int_member(priv->userObj, TRG_PREFS_KEY_PROFILE_ID, 0); } void trg_prefs_load(TrgPrefs * p) { TrgPrefsPrivate *priv = p->priv; JsonParser *parser = json_parser_new(); JsonNode *root; guint n_profiles; JsonArray *profiles; gboolean parsed = json_parser_load_from_file(parser, priv->file, NULL); if (!parsed) { trg_prefs_empty_init(p); g_object_unref(parser); return; } root = json_parser_get_root(parser); if (root) { priv->user = json_node_copy(root); priv->userObj = json_node_get_object(priv->user); } g_object_unref(parser); if (!root) { trg_prefs_empty_init(p); return; } if (!json_object_has_member(priv->userObj, TRG_PREFS_KEY_PROFILES)) { profiles = json_array_new(); json_object_set_array_member(priv->userObj, TRG_PREFS_KEY_PROFILES, profiles); } else { profiles = json_object_get_array_member(priv->userObj, TRG_PREFS_KEY_PROFILES); } n_profiles = json_array_get_length(profiles); if (n_profiles < 1) { priv->profile = trg_prefs_new_profile_object(); json_array_add_object_element(profiles, priv->profile); trg_prefs_set_int(p, TRG_PREFS_KEY_PROFILE_ID, 0, TRG_PREFS_GLOBAL); } else { gint profile_id = trg_prefs_get_int(p, TRG_PREFS_KEY_PROFILE_ID, TRG_PREFS_GLOBAL); if (profile_id >= n_profiles) trg_prefs_set_int(p, TRG_PREFS_KEY_PROFILE_ID, profile_id = 0, TRG_PREFS_GLOBAL); priv->profile = json_array_get_object_element(profiles, profile_id); } } guint trg_prefs_get_add_flags(TrgPrefs * p) { guint flags = 0x00; if (trg_prefs_get_bool (p, TRG_PREFS_KEY_START_PAUSED, TRG_PREFS_GLOBAL)) flags |= TORRENT_ADD_FLAG_PAUSED; if (trg_prefs_get_bool (p, TRG_PREFS_KEY_DELETE_LOCAL_TORRENT, TRG_PREFS_GLOBAL)) flags |= TORRENT_ADD_FLAG_DELETE; return flags; } transmission-remote-gtk-1.4.1/src/trg-prefs.h000066400000000000000000000166161341276053300212110ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _TRG_PREFS_H_ #define _TRG_PREFS_H_ #include #include #define TRG_PREFS_FILENAME "config.json" #define TRG_PREFS_DEFAULT_DIR_MODE 448 #define TRG_PORT_DEFAULT 9091 #define TRG_INTERVAL_DEFAULT 3 #define TRG_SESSION_INTERVAL_DEFAULT 60 #define TRG_PROFILE_NAME_DEFAULT "Default" #define TRG_PREFS_KEY_RPC_URL_PATH "rpc-url-path" #define TRG_PREFS_KEY_PROFILE_ID "profile-id" #define TRG_PREFS_KEY_PROFILES "profiles" #define TRG_PREFS_KEY_RSS "rss" #define TRG_PREFS_KEY_PROFILE_NAME "profile-name" #define TRG_PREFS_KEY_HOSTNAME "hostname" #define TRG_PREFS_KEY_PORT "port" #define TRG_PREFS_KEY_MINUPDATE_INTERVAL "min-update-interval" #define TRG_PREFS_KEY_USERNAME "username" #define TRG_PREFS_KEY_PASSWORD "password" #define TRG_PREFS_KEY_AUTO_CONNECT "auto-connect" #define TRG_PREFS_KEY_SSL "ssl" #define TRG_PREFS_KEY_SSL_VALIDATE "ssl-validate" #define TRG_PREFS_KEY_TIMEOUT "timeout" #define TRG_PREFS_KEY_RETRIES "retries" #define TRG_PREFS_KEY_UPDATE_INTERVAL "update-interval" #define TRG_PREFS_KEY_SESSION_UPDATE_INTERVAL "session-update-interval" #define TRG_PREFS_KEY_COMPLETE_NOTIFY "complete-notify" #define TRG_PREFS_KEY_ADD_NOTIFY "add-notify" #define TRG_PREFS_KEY_WINDOW_WIDTH "window-width" #define TRG_PREFS_KEY_WINDOW_HEIGHT "window-height" #define TRG_PREFS_KEY_GRAPH_SPAN "graph-span" #define TRG_PREFS_KEY_SYSTEM_TRAY "system-tray" #define TRG_PREFS_KEY_SHOW_GRAPH "show-graph" #define TRG_PREFS_KEY_SYSTEM_TRAY_MINIMISE "system-tray-minimise" #define TRG_PREFS_KEY_FILTER_TRACKERS "filter-trackers" #define TRG_PREFS_KEY_DIRECTORIES_FIRST "directories-first" #define TRG_PREFS_KEY_FILTER_DIRS "filter-dirs" #define TRG_PREFS_KEY_SHOW_STATE_SELECTOR "show-state-selector" #define TRG_PREFS_KEY_SHOW_NOTEBOOK "show-notebook" #define TRG_PREFS_KEY_LAST_TORRENT_DIR "last-torrent-dir" #define TRG_PREFS_KEY_ADD_OPTIONS_DIALOG "add-options-dialog" #define TRG_PREFS_KEY_START_PAUSED "start-paused" #define TRG_PREFS_KEY_UPDATE_ACTIVE_ONLY "update-active-only" #define TRG_PREFS_KEY_DELETE_LOCAL_TORRENT "delete-local-torrent" #define TRG_PREFS_STATE_SELECTOR_LAST "state-selector-last" #define TRG_PREFS_ACTIVEONLY_FULLSYNC_ENABLED "activeonly-fullsync-enabled" #define TRG_PREFS_ACTIVEONLY_FULLSYNC_EVERY "activeonly-fullsync-every" #define TRG_PREFS_KEY_STYLE "style" #define TRG_PREFS_KEY_TREE_VIEWS "tree-views" #define TRG_PREFS_KEY_TV_SORT_TYPE "sort-type" #define TRG_PREFS_KEY_TV_SORT_COL "sort-col" #define TRG_PREFS_KEY_TV_COLUMNS "columns" #define TRG_PREFS_KEY_TV_WIDTHS "widths" #define TRG_PREFS_KEY_NOTEBOOK_PANED_POS "notebook-paned-pos" #define TRG_PREFS_KEY_STATES_PANED_POS "states-paned-pos" #define TRG_PREFS_SUBKEY_LABEL "label" #define TRG_PREFS_KEY_EXEC_COMMANDS "exec-commands" #define TRG_PREFS_KEY_EXEC_COMMANDS_SUBKEY_CMD "cmd" #define TRG_PREFS_KEY_DESTINATIONS "destinations" #define TRG_PREFS_KEY_RSS "rss" #define TRG_PREFS_RSS_SUBKEY_ID "id" #define TRG_PREFS_RSS_SUBKEY_URL "url" #define TRG_PREFS_KEY_LAST_MOVE_DESTINATION "last-move-destination" #define TRG_PREFS_KEY_LAST_ADD_DESTINATION "last-add-destination" #define TRG_PREFS_KEY_DESTINATIONS_SUBKEY_DIR "dir" #define TRG_PREFS_NOFLAGS (1 << 0) /* 0x00 */ #define TRG_PREFS_GLOBAL (1 << 1) /* 0x01 */ #define TRG_PREFS_PROFILE (1 << 2) /* 0x02 */ #define TRG_PREFS_CONNECTION (1 << 3) /* 0x04 */ #define TRG_PREFS_NEWNODE (1 << 4) /* 0x08 */ #define TRG_PREFS_REPLACENODE (1 << 5) /* 0x16 */ enum { TRG_STYLE_TR = 0, TRG_STYLE_CLASSIC, TRG_STYLE_TR_COMPACT }; typedef struct _TrgPrefsPrivate TrgPrefsPrivate; G_BEGIN_DECLS #define TRG_TYPE_PREFS trg_prefs_get_type() #define TRG_PREFS(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_PREFS, TrgPrefs)) #define TRG_PREFS_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_PREFS, TrgPrefsClass)) #define TRG_IS_PREFS(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_PREFS)) #define TRG_IS_PREFS_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_PREFS)) #define TRG_PREFS_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_PREFS, TrgPrefsClass)) typedef struct { GObject parent; TrgPrefsPrivate *priv; } TrgPrefs; typedef struct { GObjectClass parent_class; void (*pref_changed) (TrgPrefs * tc, const gchar * key, gpointer data); } TrgPrefsClass; GType trg_prefs_get_type(void); TrgPrefs *trg_prefs_new(void); void trg_prefs_add_default_int(TrgPrefs * p, const gchar * key, int value); void trg_prefs_add_default_string(TrgPrefs * p, const gchar * key, gchar * value); void trg_prefs_add_default_double(TrgPrefs * p, const gchar * key, double value); void trg_prefs_add_default_bool_true(TrgPrefs * p, const gchar * key); JsonNode *trg_prefs_get_value(TrgPrefs * p, const gchar * key, int type, int flags); gchar *trg_prefs_get_string(TrgPrefs * p, const gchar * key, int flags); gint64 trg_prefs_get_int(TrgPrefs * p, const gchar * key, int flags); gdouble trg_prefs_get_double(TrgPrefs * p, const gchar * key, int flags); gboolean trg_prefs_get_bool(TrgPrefs * p, const gchar * key, int flags); JsonObject *trg_prefs_get_profile(TrgPrefs * p); JsonObject *trg_prefs_get_connection(TrgPrefs * p); JsonArray *trg_prefs_get_profiles(TrgPrefs * p); JsonArray *trg_prefs_get_rss(TrgPrefs *p); void trg_prefs_set_connection(TrgPrefs * p, JsonObject * profile); gint trg_prefs_get_profile_id(TrgPrefs * p); void trg_prefs_del_profile(TrgPrefs * p, JsonObject * profile); void trg_prefs_set_profile(TrgPrefs * p, JsonObject * profile); JsonObject *trg_prefs_new_profile(TrgPrefs * p); JsonObject *trg_get_current_profile(TrgPrefs * p); JsonObject *trg_prefs_get_root(TrgPrefs * p); JsonArray *trg_prefs_get_array(TrgPrefs * p, const gchar * key, int flags); void trg_prefs_set_int(TrgPrefs * p, const gchar * key, int value, int flags); void trg_prefs_set_string(TrgPrefs * p, const gchar * key, const gchar * value, int flags); void trg_prefs_set_double(TrgPrefs * p, const gchar * key, double value, int flags); void trg_prefs_set_bool(TrgPrefs * p, const gchar * key, gboolean value, int flags); gboolean trg_prefs_save(TrgPrefs * p); void trg_prefs_load(TrgPrefs * p); void trg_prefs_changed_emit_signal(TrgPrefs * p, const gchar * key); void trg_prefs_profile_change_emit_signal(TrgPrefs * p); guint trg_prefs_get_add_flags(TrgPrefs * p); G_END_DECLS #endif /* _TRG_PREFS_H_ */ transmission-remote-gtk-1.4.1/src/trg-remote-prefs-dialog.c000066400000000000000000001010031341276053300237130ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #ifdef ENABLE_NL_LANGINFO #include #endif #include "trg-main-window.h" #include "trg-remote-prefs-dialog.h" #include "hig.h" #include "util.h" #include "requests.h" #include "json.h" #include "trg-json-widgets.h" #include "session-get.h" /* Using the widget creation functions in trg-json-widgets.c, load remote * preferences from the latest session object held by TrgClient. * If the user clicks OK, use trg-json-widgets to build up a request object * and send that in a session-set request. * * The on_session_set callback should cause that session object to be refreshed * as soon as the set is complete. */ G_DEFINE_TYPE(TrgRemotePrefsDialog, trg_remote_prefs_dialog, GTK_TYPE_DIALOG) #define TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_REMOTE_PREFS_DIALOG, TrgRemotePrefsDialogPrivate)) enum { PROP_0, PROP_PARENT, PROP_CLIENT }; typedef struct _TrgRemotePrefsDialogPrivate TrgRemotePrefsDialogPrivate; struct _TrgRemotePrefsDialogPrivate { TrgClient *client; TrgMainWindow *parent; GList *widgets; GtkWidget *encryption_combo; GtkWidget *port_test_label, *port_test_button; GtkWidget *blocklist_update_button, *blocklist_check; GtkWidget *alt_check, *alt_time_check; }; static GObject *instance = NULL; static void update_session(GtkDialog * dlg) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(dlg); JsonNode *request = session_set(); JsonObject *args = node_get_arguments(request); gchar *encryption; /* Connection */ switch (gtk_combo_box_get_active (GTK_COMBO_BOX(priv->encryption_combo))) { case 0: encryption = "required"; break; case 2: encryption = "tolerated"; break; default: encryption = "preferred"; break; } json_object_set_string_member(args, SGET_ENCRYPTION, encryption); trg_json_widgets_save(priv->widgets, args); dispatch_async(priv->client, request, on_session_set, priv->parent); } static void trg_remote_prefs_response_cb(GtkDialog * dlg, gint res_id, gpointer data G_GNUC_UNUSED) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(dlg); if (res_id == GTK_RESPONSE_OK) update_session(dlg); trg_json_widget_desc_list_free(priv->widgets); gtk_widget_destroy(GTK_WIDGET(dlg)); instance = NULL; } static void trg_remote_prefs_dialog_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(object); switch (property_id) { case PROP_PARENT: g_value_set_object(value, priv->parent); break; case PROP_CLIENT: g_value_set_pointer(value, priv->client); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_remote_prefs_dialog_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(object); switch (property_id) { case PROP_PARENT: priv->parent = g_value_get_object(value); break; case PROP_CLIENT: priv->client = g_value_get_pointer(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_remote_prefs_double_special_dependent(GtkWidget * widget, gpointer data) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(gtk_widget_get_toplevel (GTK_WIDGET(widget))); gtk_widget_set_sensitive(GTK_WIDGET(data), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (priv-> alt_time_check)) || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (priv-> alt_check))); } static void trg_rprefs_time_widget_savefunc(GtkWidget * w, JsonObject * obj, gchar * key) { GtkWidget *hourSpin = g_object_get_data(G_OBJECT(w), "hours-spin"); GtkWidget *minutesSpin = g_object_get_data(G_OBJECT(w), "mins-spin"); gint hoursValue = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(hourSpin)); gint minutesValue = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(minutesSpin)); json_object_set_int_member(obj, key, (gint64) ((hoursValue * 60) + minutesValue)); } static gboolean on_output(GtkSpinButton * spin, gpointer data) { GtkAdjustment *adj; gchar *text; int value; adj = gtk_spin_button_get_adjustment(spin); value = (int) gtk_adjustment_get_value(adj); text = g_strdup_printf("%02d", value); gtk_entry_set_text(GTK_ENTRY(spin), text); g_free(text); return TRUE; } static GtkWidget *trg_rprefs_timer_widget_spin_new(gint max, GtkWidget * alt_time_check) { GtkWidget *w = gtk_spin_button_new_with_range(0, max, 1); gtk_widget_set_sensitive(w, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (alt_time_check))); g_signal_connect(G_OBJECT(alt_time_check), "toggled", G_CALLBACK(toggle_active_arg_is_sensitive), w); g_signal_connect(G_OBJECT(w), "output", G_CALLBACK(on_output), NULL); return w; } static GtkWidget *trg_rprefs_time_widget_new(GList ** wl, JsonObject * obj, const gchar * key, GtkWidget * alt_time_check) { GtkWidget *hbox = trg_hbox_new(FALSE, 0); GtkWidget *colonLabel = gtk_label_new(":"); GtkWidget *hourSpin = trg_rprefs_timer_widget_spin_new(23, alt_time_check); GtkWidget *minutesSpin = trg_rprefs_timer_widget_spin_new(69, alt_time_check); gint64 value = json_object_get_int_member(obj, key); trg_json_widget_desc *wd = g_new0(trg_json_widget_desc, 1); wd->key = g_strdup(key); wd->widget = hbox; wd->saveFunc = trg_rprefs_time_widget_savefunc; g_object_set_data(G_OBJECT(hbox), "hours-spin", hourSpin); g_object_set_data(G_OBJECT(hbox), "mins-spin", minutesSpin); gtk_spin_button_set_value(GTK_SPIN_BUTTON(hourSpin), floor((gdouble) value / 60.0)); gtk_spin_button_set_value(GTK_SPIN_BUTTON(minutesSpin), (gdouble) (value % 60)); gtk_box_pack_start(GTK_BOX(hbox), hourSpin, TRUE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), colonLabel, TRUE, FALSE, 2); gtk_box_pack_start(GTK_BOX(hbox), minutesSpin, TRUE, FALSE, 0); *wl = g_list_append(*wl, wd); return hbox; } static GtkWidget *trg_rprefs_time_begin_end_new(GList ** wl, JsonObject * obj, GtkWidget * alt_time_check) { GtkWidget *hbox = trg_hbox_new(FALSE, 0); GtkWidget *begin = trg_rprefs_time_widget_new(wl, obj, SGET_ALT_SPEED_TIME_BEGIN, alt_time_check); GtkWidget *end = trg_rprefs_time_widget_new(wl, obj, SGET_ALT_SPEED_TIME_END, alt_time_check); gtk_box_pack_start(GTK_BOX(hbox), begin, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new("-"), FALSE, FALSE, 10); gtk_box_pack_start(GTK_BOX(hbox), end, FALSE, FALSE, 0); return hbox; } static GtkWidget *trg_rprefs_alt_speed_spin_new(GList ** wl, JsonObject * obj, const gchar * key, GtkWidget * alt_check, GtkWidget * alt_time_check) { GtkWidget *w = trg_json_widget_spin_int_new(wl, obj, key, NULL, 0, INT_MAX, 5); gtk_widget_set_sensitive(w, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (alt_check)) || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (alt_time_check))); g_signal_connect(G_OBJECT(alt_time_check), "toggled", G_CALLBACK(trg_remote_prefs_double_special_dependent), w); g_signal_connect(G_OBJECT(alt_check), "toggled", G_CALLBACK(trg_remote_prefs_double_special_dependent), w); 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) { gchar *abdays_fallback[] = {_("Sun"), _("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat")}; #ifdef ENABLE_NL_LANGINFO nl_item abdays[] = {ABDAY_1, ABDAY_2, ABDAY_3, ABDAY_4, ABDAY_5, ABDAY_6, ABDAY_7}; #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 gchar *utf8 = g_convert_with_fallback(nl_langinfo(abdays[i]), -1, "utf-8", nl_langinfo(CODESET), NULL, NULL, NULL, NULL); GtkWidget *w = gtk_check_button_new_with_label (utf8 ? utf8 : abdays_fallback[i]); g_free(utf8); #else GtkWidget *w = gtk_check_button_new_with_label (abdays_fallback[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) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(win); GtkWidget *w, *tb, *t; guint row = 0; t = hig_workarea_create(); hig_workarea_add_section_title(t, &row, _("Bandwidth limits")); tb = trg_json_widget_check_new(&priv->widgets, json, SGET_SPEED_LIMIT_DOWN_ENABLED, _("Down Limit (KiB/s)"), NULL); w = trg_json_widget_spin_int_new(&priv->widgets, json, SGET_SPEED_LIMIT_DOWN, tb, 0, INT_MAX, 5); hig_workarea_add_row_w(t, &row, tb, w, NULL); tb = trg_json_widget_check_new(&priv->widgets, json, SGET_SPEED_LIMIT_UP_ENABLED, _("Up Limit (KiB/s)"), NULL); w = trg_json_widget_spin_int_new(&priv->widgets, json, SGET_SPEED_LIMIT_UP, tb, 0, INT_MAX, 5); hig_workarea_add_row_w(t, &row, tb, w, NULL); hig_workarea_add_section_title(t, &row, _("Alternate limits")); w = priv->alt_check = trg_json_widget_check_new(&priv->widgets, json, SGET_ALT_SPEED_ENABLED, _ ("Alternate speed limits active"), NULL); hig_workarea_add_wide_control(t, &row, w); tb = priv->alt_time_check = trg_json_widget_check_new(&priv->widgets, json, SGET_ALT_SPEED_TIME_ENABLED, _("Alternate time range"), NULL); 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); hig_workarea_add_row(t, &row, _("Alternate down limit (KiB/s)"), w, w); w = trg_rprefs_alt_speed_spin_new(&priv->widgets, json, SGET_ALT_SPEED_UP, priv->alt_check, tb); hig_workarea_add_row(t, &row, _("Alternate up limit (KiB/s)"), w, w); return t; } static GtkWidget *trg_rprefs_limitsPage(TrgRemotePrefsDialog * win, JsonObject * json) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(win); GtkWidget *w, *tb, *t; guint row = 0; t = hig_workarea_create(); hig_workarea_add_section_title(t, &row, _("Seeding")); tb = trg_json_widget_check_new(&priv->widgets, json, SGET_SEED_RATIO_LIMITED, _("Seed ratio limit"), NULL); w = trg_json_widget_spin_double_new(&priv->widgets, json, SGET_SEED_RATIO_LIMIT, tb, 0, INT_MAX, 0.1); hig_workarea_add_row_w(t, &row, tb, w, NULL); if (json_object_has_member(json, SGET_DOWNLOAD_QUEUE_ENABLED)) { hig_workarea_add_section_title(t, &row, _("Queues")); tb = trg_json_widget_check_new(&priv->widgets, json, SGET_DOWNLOAD_QUEUE_ENABLED, _("Download queue size"), NULL); w = trg_json_widget_spin_int_new(&priv->widgets, json, SGET_DOWNLOAD_QUEUE_SIZE, tb, 0, INT_MAX, 1); hig_workarea_add_row_w(t, &row, tb, w, NULL); tb = trg_json_widget_check_new(&priv->widgets, json, SGET_SEED_QUEUE_ENABLED, _("Seed queue size"), NULL); w = trg_json_widget_spin_int_new(&priv->widgets, json, SGET_SEED_QUEUE_SIZE, tb, 0, INT_MAX, 1); hig_workarea_add_row_w(t, &row, tb, w, NULL); tb = trg_json_widget_check_new(&priv->widgets, json, SGET_QUEUE_STALLED_ENABLED, _("Ignore stalled (minutes)"), NULL); w = trg_json_widget_spin_int_new(&priv->widgets, json, SGET_QUEUE_STALLED_MINUTES, tb, 0, INT_MAX, 1); hig_workarea_add_row_w(t, &row, tb, w, NULL); } hig_workarea_add_section_title(t, &row, _("Peers")); w = trg_json_widget_spin_int_new(&priv->widgets, json, SGET_PEER_LIMIT_GLOBAL, NULL, 0, INT_MAX, 5); hig_workarea_add_row(t, &row, _("Global peer limit"), w, w); w = trg_json_widget_spin_int_new(&priv->widgets, json, SGET_PEER_LIMIT_PER_TORRENT, NULL, 0, INT_MAX, 5); hig_workarea_add_row(t, &row, _("Per torrent peer limit"), w, w); return t; } static gboolean on_port_tested(gpointer data) { trg_response *response = (trg_response *) data; if (TRG_IS_REMOTE_PREFS_DIALOG(response->cb_data)) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(response->cb_data); gtk_button_set_label(GTK_BUTTON(priv->port_test_button), _("Retest")); gtk_widget_set_sensitive(priv->port_test_button, TRUE); if (response->status == CURLE_OK) { gboolean isOpen = json_object_get_boolean_member(get_arguments (response->obj), "port-is-open"); if (isOpen) gtk_label_set_markup(GTK_LABEL(priv->port_test_label), _ ("Port is open")); else gtk_label_set_markup(GTK_LABEL(priv->port_test_label), _ ("Port is closed")); } else { trg_error_dialog(GTK_WINDOW(response->cb_data), response); } } trg_response_free(response); return FALSE; } static void port_test_cb(GtkButton * b, gpointer data) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(data); JsonNode *req = port_test(); gtk_label_set_text(GTK_LABEL(priv->port_test_label), _("Port test")); gtk_button_set_label(b, _("Testing...")); gtk_widget_set_sensitive(GTK_WIDGET(b), FALSE); dispatch_async(priv->client, req, on_port_tested, data); } static gboolean on_blocklist_updated(gpointer data) { trg_response *response = (trg_response *) data; if (TRG_IS_REMOTE_PREFS_DIALOG(response->cb_data)) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(response->cb_data); gtk_widget_set_sensitive(priv->blocklist_update_button, TRUE); gtk_button_set_label(GTK_BUTTON(priv->blocklist_update_button), _("Update")); if (response->status == CURLE_OK) { JsonObject *args = get_arguments(response->obj); gchar *labelText = g_strdup_printf(_("Blocklist (%" G_GINT64_FORMAT " entries)"), json_object_get_int_member(args, SGET_BLOCKLIST_SIZE)); gtk_button_set_label(GTK_BUTTON(priv->blocklist_check), labelText); g_free(labelText); } else { trg_error_dialog(GTK_WINDOW(response->cb_data), response); } } trg_response_free(response); return FALSE; } static gboolean update_blocklist_cb(GtkButton * b, gpointer data) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(data); JsonNode *req = blocklist_update(); gtk_widget_set_sensitive(GTK_WIDGET(b), FALSE); gtk_button_set_label(b, _("Updating...")); dispatch_async(priv->client, req, on_blocklist_updated, data); return FALSE; } static GtkWidget *trg_rprefs_connPage(TrgRemotePrefsDialog * win, JsonObject * s) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(win); GtkWidget *w, *tb, *t; const gchar *stringValue; guint row = 0; t = hig_workarea_create(); hig_workarea_add_section_title(t, &row, _("Connections")); w = trg_json_widget_spin_int_new(&priv->widgets, s, SGET_PEER_PORT, NULL, 0, 65535, 1); hig_workarea_add_row(t, &row, _("Peer port"), w, w); priv->port_test_label = gtk_label_new(_("Port test")); w = priv->port_test_button = gtk_button_new_with_label(_("Test")); g_signal_connect(w, "clicked", G_CALLBACK(port_test_cb), win); hig_workarea_add_row_w(t, &row, priv->port_test_label, w, NULL); w = priv->encryption_combo = gtr_combo_box_new_enum(_("Required"), 0, _("Preferred"), 1, _("Tolerated"), 2, NULL); stringValue = session_get_encryption(s); if (!g_strcmp0(stringValue, "required")) { gtk_combo_box_set_active(GTK_COMBO_BOX(w), 0); } else if (!g_strcmp0(stringValue, "tolerated")) { gtk_combo_box_set_active(GTK_COMBO_BOX(w), 2); } else { gtk_combo_box_set_active(GTK_COMBO_BOX(w), 1); } hig_workarea_add_row(t, &row, _("Encryption"), w, NULL); w = trg_json_widget_check_new(&priv->widgets, s, SGET_PEER_PORT_RANDOM_ON_START, _("Random peer port on start"), NULL); hig_workarea_add_wide_control(t, &row, w); w = trg_json_widget_check_new(&priv->widgets, s, SGET_PORT_FORWARDING_ENABLED, _("Peer port forwarding"), NULL); hig_workarea_add_wide_control(t, &row, w); hig_workarea_add_section_title(t, &row, _("Protocol")); w = trg_json_widget_check_new(&priv->widgets, s, SGET_PEX_ENABLED, _("Peer exchange (PEX)"), NULL); hig_workarea_add_wide_control(t, &row, w); w = trg_json_widget_check_new(&priv->widgets, s, SGET_DHT_ENABLED, _("Distributed Hash Table (DHT)"), NULL); hig_workarea_add_wide_control(t, &row, w); w = trg_json_widget_check_new(&priv->widgets, s, SGET_LPD_ENABLED, _("Local peer discovery"), NULL); hig_workarea_add_wide_control(t, &row, w); hig_workarea_add_section_title(t, &row, _("Blocklist")); stringValue = g_strdup_printf(_("Blocklist (%" G_GINT64_FORMAT " entries)"), session_get_blocklist_size(s)); tb = priv->blocklist_check = trg_json_widget_check_new(&priv->widgets, s, SGET_BLOCKLIST_ENABLED, stringValue, NULL); g_free((gchar *) stringValue); w = priv->blocklist_update_button = gtk_button_new_with_label(_("Update")); g_signal_connect(G_OBJECT(w), "clicked", G_CALLBACK(update_blocklist_cb), win); hig_workarea_add_row_w(t, &row, tb, w, NULL); stringValue = session_get_blocklist_url(s); if (stringValue) { w = trg_json_widget_entry_new(&priv->widgets, s, SGET_BLOCKLIST_URL, NULL); hig_workarea_add_row(t, &row, _("Blocklist URL:"), w, NULL); } return t; } static GtkWidget *trg_rprefs_generalPage(TrgRemotePrefsDialog * win, JsonObject * s) { TrgRemotePrefsDialogPrivate *priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(win); GtkWidget *w, *tb, *t; guint row = 0; gint64 cache_size_mb; t = hig_workarea_create(); hig_workarea_add_section_title(t, &row, _("Environment")); w = trg_json_widget_entry_new(&priv->widgets, s, SGET_DOWNLOAD_DIR, NULL); hig_workarea_add_row(t, &row, _("Download directory"), w, NULL); tb = trg_json_widget_check_new(&priv->widgets, s, SGET_INCOMPLETE_DIR_ENABLED, _("Incomplete download dir"), NULL); w = trg_json_widget_entry_new(&priv->widgets, s, SGET_INCOMPLETE_DIR, tb); hig_workarea_add_row_w(t, &row, tb, w, NULL); tb = trg_json_widget_check_new(&priv->widgets, s, SGET_SCRIPT_TORRENT_DONE_ENABLED, _("Torrent done script"), NULL); w = trg_json_widget_entry_new(&priv->widgets, s, SGET_SCRIPT_TORRENT_DONE_FILENAME, tb); hig_workarea_add_row_w(t, &row, tb, w, NULL); cache_size_mb = session_get_cache_size_mb(s); if (cache_size_mb >= 0) { w = trg_json_widget_spin_int_new(&priv->widgets, s, SGET_CACHE_SIZE_MB, NULL, 0, INT_MAX, 1); hig_workarea_add_row(t, &row, _("Cache size (MiB)"), w, w); } hig_workarea_add_section_title(t, &row, _("Behavior")); w = trg_json_widget_check_new(&priv->widgets, s, SGET_RENAME_PARTIAL_FILES, _("Rename partial files"), NULL); hig_workarea_add_wide_control(t, &row, w); w = trg_json_widget_check_new(&priv->widgets, s, SGET_TRASH_ORIGINAL_TORRENT_FILES, _ ("Trash original torrent files"), NULL); hig_workarea_add_wide_control(t, &row, w); w = trg_json_widget_check_new(&priv->widgets, s, SGET_START_ADDED_TORRENTS, _("Start added torrents"), NULL); hig_workarea_add_wide_control(t, &row, w); return t; } static GObject *trg_remote_prefs_dialog_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *object; TrgRemotePrefsDialogPrivate *priv; JsonObject *session; GtkWidget *notebook, *contentvbox; object = G_OBJECT_CLASS (trg_remote_prefs_dialog_parent_class)->constructor(type, n_construct_properties, construct_params); priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(object); session = trg_client_get_session(priv->client); contentvbox = gtk_dialog_get_content_area(GTK_DIALOG(object)); gtk_window_set_title(GTK_WINDOW(object), _("Remote Preferences")); gtk_window_set_transient_for(GTK_WINDOW(object), GTK_WINDOW(priv->parent)); gtk_window_set_destroy_with_parent(GTK_WINDOW(object), TRUE); gtk_dialog_add_button(GTK_DIALOG(object), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); gtk_dialog_add_button(GTK_DIALOG(object), GTK_STOCK_OK, GTK_RESPONSE_OK); gtk_container_set_border_width(GTK_CONTAINER(object), GUI_PAD); gtk_dialog_set_default_response(GTK_DIALOG(object), GTK_RESPONSE_OK); g_signal_connect(G_OBJECT(object), "response", G_CALLBACK(trg_remote_prefs_response_cb), NULL); notebook = gtk_notebook_new(); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), trg_rprefs_generalPage(TRG_REMOTE_PREFS_DIALOG (object), session), gtk_label_new(_("General"))); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), trg_rprefs_connPage(TRG_REMOTE_PREFS_DIALOG (object), session), gtk_label_new(_("Connections"))); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), trg_rprefs_bandwidthPage (TRG_REMOTE_PREFS_DIALOG(object), session), gtk_label_new(_("Bandwidth"))); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), trg_rprefs_limitsPage(TRG_REMOTE_PREFS_DIALOG (object), session), gtk_label_new(_("Limits"))); gtk_container_set_border_width(GTK_CONTAINER(notebook), GUI_PAD); gtk_box_pack_start(GTK_BOX(contentvbox), notebook, TRUE, TRUE, 0); return object; } static void trg_remote_prefs_dialog_class_init(TrgRemotePrefsDialogClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(TrgRemotePrefsDialogPrivate)); object_class->constructor = trg_remote_prefs_dialog_constructor; object_class->get_property = trg_remote_prefs_dialog_get_property; object_class->set_property = trg_remote_prefs_dialog_set_property; g_object_class_install_property(object_class, PROP_CLIENT, g_param_spec_pointer("trg-client", "TClient", "Client", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_PARENT, g_param_spec_object("parent-window", "Parent window", "Parent window", TRG_TYPE_MAIN_WINDOW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } static void trg_remote_prefs_dialog_init(TrgRemotePrefsDialog * self G_GNUC_UNUSED) { } TrgRemotePrefsDialog *trg_remote_prefs_dialog_get_instance(TrgMainWindow * parent, TrgClient * client) { if (instance == NULL) { instance = g_object_new(TRG_TYPE_REMOTE_PREFS_DIALOG, "parent-window", parent, "trg-client", client, NULL); } return TRG_REMOTE_PREFS_DIALOG(instance); } transmission-remote-gtk-1.4.1/src/trg-remote-prefs-dialog.h000066400000000000000000000043211341276053300237250ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_REMOTE_PREFS_DIALOG_H_ #define TRG_REMOTE_PREFS_DIALOG_H_ #include #include #include "trg-main-window.h" G_BEGIN_DECLS #define TRG_TYPE_REMOTE_PREFS_DIALOG trg_remote_prefs_dialog_get_type() #define TRG_REMOTE_PREFS_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_REMOTE_PREFS_DIALOG, TrgRemotePrefsDialog)) #define TRG_REMOTE_PREFS_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_REMOTE_PREFS_DIALOG, TrgRemotePrefsDialogClass)) #define TRG_IS_REMOTE_PREFS_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_REMOTE_PREFS_DIALOG)) #define TRG_IS_REMOTE_PREFS_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_REMOTE_PREFS_DIALOG)) #define TRG_REMOTE_PREFS_DIALOG_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_REMOTE_PREFS_DIALOG, TrgRemotePrefsDialogClass)) typedef struct { GtkDialog parent; } TrgRemotePrefsDialog; typedef struct { GtkDialogClass parent_class; } TrgRemotePrefsDialogClass; GType trg_remote_prefs_dialog_get_type(void); TrgRemotePrefsDialog *trg_remote_prefs_dialog_get_instance(TrgMainWindow * parent, TrgClient * client); G_END_DECLS #endif /* TRG_REMOTE_PREFS_DIALOG_H_ */ transmission-remote-gtk-1.4.1/src/trg-rss-cell-renderer.c000066400000000000000000000371761341276053300234210ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_RSS #include #include #include #include "icons.h" #include "hig.h" #include "util.h" #include "trg-rss-cell-renderer.h" enum { PROP_TITLE = 1, PROP_FEED, PROP_PUBLISHED, PROP_UPLOADED }; #define SMALL_SCALE 0.9 #define COMPACT_ICON_SIZE GTK_ICON_SIZE_MENU #define FULL_ICON_SIZE GTK_ICON_SIZE_DND #define FOREGROUND_COLOR_KEY "foreground-rgba" typedef GdkRGBA GtrColor; typedef cairo_t GtrDrawable; typedef GtkRequisition GtrRequisition; struct TrgRssCellRendererPrivate { GtkCellRenderer *text_renderer; GtkCellRenderer *icon_renderer; GString *gstr1; GString *gstr2; gchar *title; gchar *published; gchar *feed; gboolean uploaded; }; static void trg_rss_cell_renderer_render(GtkCellRenderer * cell, GtrDrawable * window, GtkWidget * widget, const GdkRectangle * background_area, const GdkRectangle * cell_area, GtkCellRendererState flags); static void gtr_cell_renderer_render(GtkCellRenderer * renderer, GtrDrawable * drawable, GtkWidget * widget, const GdkRectangle * area, GtkCellRendererState flags) { gtk_cell_renderer_render(renderer, drawable, widget, area, area, flags); } static void trg_rss_cell_renderer_set_property(GObject * object, guint property_id, const GValue * v, GParamSpec * pspec) { TrgRssCellRenderer *self = TRG_RSS_CELL_RENDERER(object); struct TrgRssCellRendererPrivate *p = self->priv; switch (property_id) { case PROP_TITLE: g_free(p->title); p->title = g_value_dup_string(v); break; case PROP_PUBLISHED: g_free(p->published); p->published = g_value_dup_string(v); break; case PROP_FEED: g_free(p->feed); p->feed = g_value_dup_string(v); break; case PROP_UPLOADED: p->uploaded = g_value_get_boolean(v); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_rss_cell_renderer_get_property(GObject * object, guint property_id, GValue * v, GParamSpec * pspec) { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } G_DEFINE_TYPE(TrgRssCellRenderer, trg_rss_cell_renderer, GTK_TYPE_CELL_RENDERER) static void trg_rss_cell_renderer_dispose(GObject * o) { TrgRssCellRenderer *r = TRG_RSS_CELL_RENDERER(o); if (r && r->priv) { struct TrgRssCellRendererPrivate *priv = r->priv; g_string_free(priv->gstr1, TRUE); g_free(priv->feed); g_free(priv->published); g_free(priv->title); g_object_unref(G_OBJECT(priv->text_renderer)); g_object_unref(G_OBJECT(priv->icon_renderer)); r->priv = NULL; } G_OBJECT_CLASS(trg_rss_cell_renderer_parent_class)->dispose(o); } static GdkPixbuf *get_icon(TrgRssCellRenderer * r, GtkIconSize icon_size, GtkWidget * for_widget) { const char *mime_type = "file"; return gtr_get_mime_type_icon(mime_type, icon_size, for_widget); } static void trg_rss_cell_renderer_get_size(GtkCellRenderer * cell, GtkWidget * widget, const GdkRectangle * cell_area, gint * x_offset, gint * y_offset, gint * width, gint * height) { TrgRssCellRenderer *self = TRG_RSS_CELL_RENDERER(cell); if (self) { struct TrgRssCellRendererPrivate *p = self->priv; int xpad, ypad; int h, w; GtkRequisition icon_size; GtkRequisition name_size; GtkRequisition stat_size; GtkRequisition prog_size; GdkPixbuf *icon; icon = get_icon(self, FULL_ICON_SIZE, widget); gtk_cell_renderer_get_padding(cell, &xpad, &ypad); /* get the idealized cell dimensions */ g_object_set(p->icon_renderer, "pixbuf", icon, NULL); gtk_cell_renderer_get_preferred_size(p->icon_renderer, widget, NULL, &icon_size); g_object_set(p->text_renderer, "text", p->title, "weight", PANGO_WEIGHT_BOLD, "scale", 1.0, "ellipsize", PANGO_ELLIPSIZE_NONE, NULL); gtk_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &name_size); g_object_set(p->text_renderer, "text", p->feed, "weight", PANGO_WEIGHT_NORMAL, "scale", SMALL_SCALE, NULL); gtk_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &prog_size); g_object_set(p->text_renderer, "text", p->published, NULL); gtk_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &stat_size); /** *** LAYOUT **/ if (width != NULL) *width = w = xpad * 2 + icon_size.width + GUI_PAD + MAX3(name_size.width, prog_size.width, stat_size.width); if (height != NULL) *height = h = ypad * 2 + name_size.height + prog_size.height + GUI_PAD_SMALL + stat_size.height; /* cleanup */ g_object_unref(icon); if (x_offset) *x_offset = cell_area ? cell_area->x : 0; if (y_offset) { int xpad, ypad; gtk_cell_renderer_get_padding(cell, &xpad, &ypad); *y_offset = cell_area ? (int) ((cell_area->height - (ypad * 2 + h)) / 2.0) : 0; } } } static void trg_rss_cell_renderer_class_init(TrgRssCellRendererClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(klass); g_type_class_add_private(klass, sizeof(struct TrgRssCellRendererPrivate)); cell_class->render = trg_rss_cell_renderer_render; cell_class->get_size = trg_rss_cell_renderer_get_size; gobject_class->set_property = trg_rss_cell_renderer_set_property; gobject_class->get_property = trg_rss_cell_renderer_get_property; gobject_class->dispose = trg_rss_cell_renderer_dispose; g_object_class_install_property(gobject_class, PROP_TITLE, g_param_spec_string("title", "title", "Title", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(gobject_class, PROP_PUBLISHED, g_param_spec_string("published", "published", "Published", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(gobject_class, PROP_FEED, g_param_spec_string("feed", "feed", "Feed", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(gobject_class, PROP_UPLOADED, g_param_spec_boolean("uploaded", "uploaded", "Uploaded", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); /*g_object_class_install_property(gobject_class, P_BAR_HEIGHT, g_param_spec_int("bar-height", NULL, "Bar Height", 1, INT_MAX, DEFAULT_BAR_HEIGHT, G_PARAM_READWRITE));*/ } static void trg_rss_cell_renderer_init(TrgRssCellRenderer * self) { struct TrgRssCellRendererPrivate *p; p = self->priv = G_TYPE_INSTANCE_GET_PRIVATE(self, TRG_RSS_CELL_RENDERER_TYPE, struct TrgRssCellRendererPrivate); p->gstr1 = g_string_new(NULL); p->gstr2 = g_string_new(NULL); p->text_renderer = gtk_cell_renderer_text_new(); g_object_set(p->text_renderer, "xpad", 0, "ypad", 0, NULL); p->icon_renderer = gtk_cell_renderer_pixbuf_new(); g_object_ref_sink(p->text_renderer); g_object_ref_sink(p->icon_renderer); } GtkCellRenderer *trg_rss_cell_renderer_new(void) { return (GtkCellRenderer *) g_object_new(TRG_RSS_CELL_RENDERER_TYPE, NULL); } static void get_text_color(TrgRssCellRenderer * r, GtkWidget * widget, GtrColor * setme) { struct TrgRssCellRendererPrivate *p = r->priv; if (p->uploaded) gtk_style_context_get_color(gtk_widget_get_style_context(widget), GTK_STATE_FLAG_INSENSITIVE, setme); else gtk_style_context_get_color(gtk_widget_get_style_context(widget), GTK_STATE_FLAG_NORMAL, setme); } static void trg_rss_cell_renderer_render(GtkCellRenderer * cell, GtrDrawable * window, GtkWidget * widget, const GdkRectangle * background_area, const GdkRectangle * cell_area, GtkCellRendererState flags) { TrgRssCellRenderer *self = TRG_RSS_CELL_RENDERER(cell); int xpad, ypad; GtkRequisition size; GdkRectangle fill_area; GdkRectangle icon_area; GdkRectangle name_area; GdkRectangle stat_area; GdkRectangle prog_area; GdkRectangle prct_area; GdkPixbuf *icon; GtrColor text_color; struct TrgRssCellRendererPrivate *p; if (!self) return; p = self->priv; icon = get_icon(self, FULL_ICON_SIZE, widget); gtk_cell_renderer_get_padding(GTK_CELL_RENDERER(cell), &xpad, &ypad); get_text_color(self, widget, &text_color); /* get the idealized cell dimensions */ g_object_set(p->icon_renderer, "pixbuf", icon, NULL); gtk_cell_renderer_get_preferred_size(p->icon_renderer, widget, NULL, &size); icon_area.width = size.width; icon_area.height = size.height; g_object_set(p->text_renderer, "text", p->title, "weight", PANGO_WEIGHT_BOLD, "ellipsize", PANGO_ELLIPSIZE_NONE, "scale", 1.0, NULL); gtk_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &size); name_area.width = size.width; name_area.height = size.height; g_object_set(p->text_renderer, "text", p->feed, "weight", PANGO_WEIGHT_NORMAL, "scale", SMALL_SCALE, NULL); gtk_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &size); prog_area.width = size.width; prog_area.height = size.height; g_object_set(p->text_renderer, "text", p->published, NULL); gtk_cell_renderer_get_preferred_size(p->text_renderer, widget, NULL, &size); stat_area.width = size.width; stat_area.height = size.height; /** *** LAYOUT **/ fill_area = *background_area; fill_area.x += xpad; fill_area.y += ypad; fill_area.width -= xpad * 2; fill_area.height -= ypad * 2; /* icon */ icon_area.x = fill_area.x; icon_area.y = fill_area.y + (fill_area.height - icon_area.height) / 2; /* name */ name_area.x = icon_area.x + icon_area.width + GUI_PAD; name_area.y = fill_area.y; name_area.width = fill_area.width - GUI_PAD - icon_area.width - GUI_PAD_SMALL; /* prog */ prog_area.x = name_area.x; prog_area.y = name_area.y + name_area.height; prog_area.width = name_area.width; /* progressbar */ prct_area.x = prog_area.x; prct_area.y = prog_area.y + prog_area.height + GUI_PAD_SMALL; prct_area.width = prog_area.width; prct_area.height = 0; /* status */ stat_area.x = prct_area.x; stat_area.y = prct_area.y + prct_area.height + GUI_PAD_SMALL; stat_area.width = prct_area.width; /** *** RENDER **/ g_object_set(p->icon_renderer, "pixbuf", icon, "sensitive", TRUE, NULL); gtr_cell_renderer_render(p->icon_renderer, window, widget, &icon_area, flags); g_object_set(p->text_renderer, "text", p->title, "scale", 1.0, FOREGROUND_COLOR_KEY, &text_color, "ellipsize", PANGO_ELLIPSIZE_END, "weight", PANGO_WEIGHT_BOLD, NULL); gtr_cell_renderer_render(p->text_renderer, window, widget, &name_area, flags); g_object_set(p->text_renderer, "text", p->feed, "scale", SMALL_SCALE, "weight", PANGO_WEIGHT_NORMAL, NULL); gtr_cell_renderer_render(p->text_renderer, window, widget, &prog_area, flags); g_object_set(p->text_renderer, "text", p->published, FOREGROUND_COLOR_KEY, &text_color, NULL); gtr_cell_renderer_render(p->text_renderer, window, widget, &stat_area, flags); /* cleanup */ g_object_unref(icon); } #endif transmission-remote-gtk-1.4.1/src/trg-rss-cell-renderer.h000066400000000000000000000032131341276053300234070ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_RSS_CELL_RENDERER_H #define TRG_RSS_CELL_RENDERER_H #ifdef HAVE_RSS #include #define TRG_RSS_CELL_RENDERER_TYPE ( trg_rss_cell_renderer_get_type( ) ) #define TRG_RSS_CELL_RENDERER( o ) \ ( G_TYPE_CHECK_INSTANCE_CAST( ( o ), \ TRG_RSS_CELL_RENDERER_TYPE, \ TrgRssCellRenderer ) ) typedef struct TrgRssCellRenderer TrgRssCellRenderer; typedef struct TrgRssCellRendererClass TrgRssCellRendererClass; struct TrgRssCellRenderer { GtkCellRenderer parent; struct TrgRssCellRendererPrivate *priv; }; struct TrgRssCellRendererClass { GtkCellRendererClass parent; }; GType trg_rss_cell_renderer_get_type(void) G_GNUC_CONST; GtkCellRenderer *trg_rss_cell_renderer_new(void); #endif #endif /* TRG_RSS_CELL_RENDERER_H */ transmission-remote-gtk-1.4.1/src/trg-rss-model.c000066400000000000000000000215431341276053300217650ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_RSS #include #include #include #include "config.h" #include "torrent.h" #include "trg-client.h" #include "trg-model.h" #include "trg-rss-model.h" enum { PROP_0, PROP_CLIENT }; enum { SIGNAL_GET_ERROR, SIGNAL_PARSE_ERROR, SIGNAL_COUNT }; static guint signals[SIGNAL_COUNT] = { 0 }; G_DEFINE_TYPE(TrgRssModel, trg_rss_model, GTK_TYPE_LIST_STORE) #define TRG_RSS_MODEL_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_RSS_MODEL, TrgRssModelPrivate)) typedef struct _TrgRssModelPrivate TrgRssModelPrivate; struct _TrgRssModelPrivate { TrgClient *client; GHashTable *table; guint index; }; typedef struct { TrgRssModel *model; gchar *feed_id; gchar *feed_url; gchar *feed_cookie; GError *error; trg_response *response; } feed_update; static void feed_update_free(feed_update *update) { if (update->error) g_error_free(update->error); g_free(update->feed_id); g_free(update->feed_url); g_free(update->feed_cookie); g_free(update); } static gboolean on_rss_receive(gpointer data) { trg_response *response = (trg_response *) data; feed_update *update = (feed_update*) response->cb_data; TrgRssModel *model = update->model; TrgRssModelPrivate *priv = TRG_RSS_MODEL_GET_PRIVATE(model); if (response->status == CURLE_OK) { RssParser* parser = rss_parser_new(); GError *error = NULL; if (rss_parser_load_from_data(parser, response->raw, response->size, &error)) { RssDocument *doc = rss_parser_get_document(parser); GtkTreeIter iter; GList *list, *tmp; list = rss_document_get_items(doc); for (tmp = list; tmp != NULL; tmp = tmp->next) { RssItem *item = (RssItem*) tmp->data; const gchar *guid = rss_item_get_guid(item); if (g_hash_table_lookup(priv->table, guid) != (void*) 1) { gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, RSSCOL_ID, guid, RSSCOL_TITLE, rss_item_get_title(item), RSSCOL_LINK, rss_item_get_link(item), RSSCOL_FEED, update->feed_id, RSSCOL_COOKIE, update->feed_cookie, RSSCOL_PUBDATE, rss_item_get_pub_date(item), -1); g_hash_table_insert(priv->table, g_strdup(guid), (void*) 1); } } g_list_free(list); g_object_unref(doc); g_object_unref(parser); } else { rss_parse_error perror; perror.error = error; perror.feed_id = update->feed_id; g_signal_emit(model, signals[SIGNAL_PARSE_ERROR], 0, &perror); g_message("parse error: %s", error->message); g_error_free(error); } } else { rss_get_error get_error; get_error.error_code = response->status; get_error.feed_id = update->feed_id; g_signal_emit(model, signals[SIGNAL_GET_ERROR], 0, &get_error); } trg_response_free(response); feed_update_free(update); return FALSE; } void trg_rss_model_update(TrgRssModel * model) { TrgRssModelPrivate *priv = TRG_RSS_MODEL_GET_PRIVATE(model); TrgPrefs *prefs = trg_client_get_prefs(priv->client); JsonArray *feeds = trg_prefs_get_rss(prefs); GRegex *cookie_regex; GList *li; if (!feeds) return; cookie_regex = g_regex_new("(.*):COOKIE:(.*)", 0, 0, NULL); for (li = json_array_get_elements(feeds); li != NULL; li = g_list_next(li)) { JsonObject *feed = json_node_get_object((JsonNode *) li->data); const gchar *feed_url = json_object_get_string_member(feed, "url"); const gchar *id = json_object_get_string_member(feed, "id"); feed_update *update; GMatchInfo *match; if (!feed_url || !id) continue; update = g_new0(feed_update, 1); update->feed_id = g_strdup(id); update->model = model; if (g_regex_match (cookie_regex, feed_url, 0, &match)) { update->feed_url = g_match_info_fetch(match, 1); update->feed_cookie = g_match_info_fetch(match, 2); g_match_info_free(match); } else { update->feed_url = g_strdup(feed_url); } async_http_request(priv->client, update->feed_url, update->feed_cookie, on_rss_receive, update); } g_regex_unref(cookie_regex); /*trg_model_remove_removed(GTK_LIST_STORE(model), RSSCOL_UPDATESERIAL, updateSerial);*/ } static void trg_rss_model_set_property(GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec G_GNUC_UNUSED) { TrgRssModelPrivate *priv = TRG_RSS_MODEL_GET_PRIVATE(object); switch (prop_id) { case PROP_CLIENT: priv->client = g_value_get_pointer(value); break; } } static void trg_rss_model_get_property(GObject * object, guint prop_id, GValue * value, GParamSpec * pspec G_GNUC_UNUSED) { } static GObject *trg_rss_model_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *obj = G_OBJECT_CLASS (trg_rss_model_parent_class)->constructor(type, n_construct_properties, construct_params); TrgRssModelPrivate *priv = TRG_RSS_MODEL_GET_PRIVATE(obj); priv->table = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); return obj; } static void trg_rss_model_dispose(GObject * object) { TrgRssModelPrivate *priv = TRG_RSS_MODEL_GET_PRIVATE(object); g_hash_table_destroy(priv->table); G_OBJECT_CLASS(trg_rss_model_parent_class)->dispose(object); } static void trg_rss_model_class_init(TrgRssModelClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(TrgRssModelPrivate)); object_class->set_property = trg_rss_model_set_property; object_class->get_property = trg_rss_model_get_property; object_class->constructor = trg_rss_model_constructor; object_class->dispose = trg_rss_model_dispose; g_object_class_install_property(object_class, PROP_CLIENT, g_param_spec_pointer("client", "client", "client", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); signals[SIGNAL_GET_ERROR] = g_signal_new("get-error", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (TrgRssModelClass, get_error), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[SIGNAL_PARSE_ERROR] = g_signal_new("parse-error", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (TrgRssModelClass, parse_error), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); } static void trg_rss_model_init(TrgRssModel * self) { GType column_types[RSSCOL_COLUMNS]; column_types[RSSCOL_ID] = G_TYPE_STRING; column_types[RSSCOL_TITLE] = G_TYPE_STRING; column_types[RSSCOL_LINK] = G_TYPE_STRING; column_types[RSSCOL_COOKIE] = G_TYPE_STRING; column_types[RSSCOL_FEED] = G_TYPE_STRING; column_types[RSSCOL_PUBDATE] = G_TYPE_STRING; column_types[RSSCOL_UPLOADED] = G_TYPE_BOOLEAN; gtk_list_store_set_column_types(GTK_LIST_STORE(self), RSSCOL_COLUMNS, column_types); } TrgRssModel *trg_rss_model_new(TrgClient *client) { return g_object_new(TRG_TYPE_RSS_MODEL, "client", client, NULL); } #endif transmission-remote-gtk-1.4.1/src/trg-rss-model.h000066400000000000000000000045751341276053300220000ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_RSS_MODEL_H_ #define TRG_RSS_MODEL_H_ #ifdef HAVE_RSS #include #include #include "trg-client.h" #include "trg-model.h" G_BEGIN_DECLS #define TRG_TYPE_RSS_MODEL trg_rss_model_get_type() #define TRG_RSS_MODEL(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_RSS_MODEL, TrgRssModel)) #define TRG_RSS_MODEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_RSS_MODEL, TrgRssModelClass)) #define TRG_IS_RSS_MODEL(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_RSS_MODEL)) #define TRG_IS_RSS_MODEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_RSS_MODEL)) #define TRG_RSS_MODEL_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_RSS_MODEL, TrgRssModelClass)) typedef struct { GtkListStore parent; } TrgRssModel; typedef struct { gchar *feed_id; gint error_code; } rss_get_error; typedef struct { GError *error; gchar *feed_id; } rss_parse_error; typedef struct { GtkListStoreClass parent_class; void (*get_error) (TrgRssModel * model, rss_get_error *error); void (*parse_error) (TrgRssModel * model, rss_parse_error *error); } TrgRssModelClass; GType trg_rss_model_get_type(void); TrgRssModel *trg_rss_model_new(TrgClient *client); G_END_DECLS void trg_rss_model_update(TrgRssModel * model); enum { RSSCOL_ID, RSSCOL_TITLE, RSSCOL_LINK, RSSCOL_FEED, RSSCOL_COOKIE, RSSCOL_PUBDATE, RSSCOL_UPLOADED, RSSCOL_COLUMNS }; #endif #endif /* TRG_RSS_MODEL_H_ */ transmission-remote-gtk-1.4.1/src/trg-rss-window.c000066400000000000000000000323351341276053300221750ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_RSS #include #include #include #include "trg-rss-window.h" #include "trg-rss-model.h" #include "trg-rss-cell-renderer.h" #include "trg-torrent-add-dialog.h" #include "trg-preferences-dialog.h" #include "trg-client.h" #include "upload.h" #include "util.h" G_DEFINE_TYPE(TrgRssWindow, trg_rss_window, GTK_TYPE_WINDOW) #define TRG_RSS_WINDOW_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_RSS_WINDOW, TrgRssWindowPrivate)) enum { PROP_0, PROP_PARENT, PROP_CLIENT }; typedef struct _TrgRssWindowPrivate TrgRssWindowPrivate; struct _TrgRssWindowPrivate { TrgMainWindow *parent; TrgClient *client; GtkTreeView *tree_view; TrgRssModel *tree_model; }; static GObject *instance = NULL; static void trg_rss_window_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgRssWindowPrivate *priv = TRG_RSS_WINDOW_GET_PRIVATE(object); switch (property_id) { case PROP_CLIENT: g_value_set_pointer(value, priv->client); break; case PROP_PARENT: g_value_set_object(value, priv->parent); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_rss_window_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgRssWindowPrivate *priv = TRG_RSS_WINDOW_GET_PRIVATE(object); switch (property_id) { case PROP_PARENT: priv->parent = g_value_get_object(value); break; case PROP_CLIENT: priv->client = g_value_get_pointer(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static gboolean upload_complete_searchfunc(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { trg_upload *upload = (trg_upload*)data; gchar *item_guid = NULL; gboolean stop = FALSE; gtk_tree_model_get(model, iter, RSSCOL_ID, &item_guid, -1); if (!g_strcmp0(item_guid, upload->uid)) { gtk_list_store_set(GTK_LIST_STORE(model), iter, RSSCOL_UPLOADED, TRUE, -1); stop = TRUE; } g_free(item_guid); return stop; } static gboolean on_upload_complete(gpointer data) { trg_response *response = (trg_response*)data; trg_upload *upload = (trg_upload*)response->cb_data; TrgRssWindowPrivate *priv = TRG_RSS_WINDOW_GET_PRIVATE(upload->cb_data); if (response->status == CURLE_OK) gtk_tree_model_foreach(GTK_TREE_MODEL(priv->tree_model), upload_complete_searchfunc, upload); return FALSE; } static gboolean on_torrent_receive(gpointer data) { trg_response *response = (trg_response *) data; trg_upload *upload = (trg_upload*)response->cb_data; TrgRssWindowPrivate *priv = TRG_RSS_WINDOW_GET_PRIVATE(upload->cb_data); TrgClient *client = priv->client; TrgPrefs *prefs = trg_client_get_prefs(client); TrgMainWindow *main_win = priv->parent; upload->upload_response = response; if (response->status == CURLE_OK) { if (trg_prefs_get_bool(prefs, TRG_PREFS_KEY_ADD_OPTIONS_DIALOG, TRG_PREFS_GLOBAL)) { TrgTorrentAddDialog *dialog = trg_torrent_add_dialog_new_from_upload(main_win, client, upload); gtk_widget_show_all(GTK_WIDGET(dialog)); } else { trg_do_upload(upload); } } else { trg_error_dialog(GTK_WINDOW(main_win), response); trg_upload_free(upload); } return FALSE; } static void rss_item_activated(GtkTreeView * treeview, GtkTreePath * path, GtkTreeViewColumn * col G_GNUC_UNUSED, gpointer userdata) { TrgRssWindow *win = TRG_RSS_WINDOW(userdata); TrgRssWindowPrivate *priv = TRG_RSS_WINDOW_GET_PRIVATE(win); TrgClient *client = priv->client; TrgPrefs *prefs = trg_client_get_prefs(client); GtkTreeModel *model = gtk_tree_view_get_model(treeview); trg_upload *upload = g_new0(trg_upload, 1); GtkTreeIter iter; gchar *link, *uid, *cookie; //upload->upload_response = response; upload->main_window = priv->parent; upload->client = client; upload->extra_args = FALSE; upload->flags = trg_prefs_get_add_flags(prefs); upload->callback = on_upload_complete; upload->cb_data = win; gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, RSSCOL_LINK, &link, RSSCOL_ID, &uid, RSSCOL_COOKIE, &cookie, -1); upload->uid = uid; async_http_request(priv->client, link, cookie, on_torrent_receive, upload); g_free(cookie); g_free(link); } static void trg_rss_on_get_error(TrgRssModel *model, rss_get_error *error, gpointer data) { GtkWindow *win = GTK_WINDOW(data); gchar *msg; if (error->error_code <= -100) { msg = g_strdup_printf(_("Request failed with HTTP code %d"), -(error->error_code + 100)); } else { msg = g_strdup(curl_easy_strerror(error->error_code)); } GtkWidget *dialog = gtk_message_dialog_new(win, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", msg); g_free(msg); gtk_window_set_title(GTK_WINDOW(dialog), _("Error")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } static void trg_rss_on_parse_error(TrgRssModel *model, rss_parse_error *error, gpointer data) { GtkWindow *win = GTK_WINDOW(data); gchar *msg = g_strdup_printf(_("Error parsing RSS feed \"%s\": %s"), error->feed_id, error->error->message); GtkWidget *dialog = gtk_message_dialog_new(win, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", msg); g_free(msg); gtk_window_set_title(GTK_WINDOW(dialog), _("Error")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } static void on_configure(GtkWidget *widget, gpointer data) { TrgRssWindowPrivate *priv = TRG_RSS_WINDOW_GET_PRIVATE(data); GtkWidget *dlg = trg_preferences_dialog_get_instance(priv->parent, priv->client); gtk_widget_show_all(dlg); trg_preferences_dialog_set_page(TRG_PREFERENCES_DIALOG(dlg), 5); } static void on_refresh(GtkWidget *widget, gpointer data) { TrgRssWindowPrivate *priv = TRG_RSS_WINDOW_GET_PRIVATE(data); trg_rss_model_update(priv->tree_model); } static GObject *trg_rss_window_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *object; TrgRssWindowPrivate *priv; GtkWidget *vbox; GtkToolItem *item; GtkWidget *toolbar; object = G_OBJECT_CLASS (trg_rss_window_parent_class)->constructor(type, n_construct_properties, construct_params); priv = TRG_RSS_WINDOW_GET_PRIVATE(object); priv->tree_model = trg_rss_model_new(priv->client); g_signal_connect(priv->tree_model, "get-error", G_CALLBACK(trg_rss_on_get_error), object); g_signal_connect(priv->tree_model, "parse-error", G_CALLBACK(trg_rss_on_parse_error), object); trg_rss_model_update(priv->tree_model); priv->tree_view = GTK_TREE_VIEW(gtk_tree_view_new()); gtk_tree_view_set_headers_visible(priv->tree_view, FALSE); gtk_tree_view_set_model(priv->tree_view, GTK_TREE_MODEL(priv->tree_model)); gtk_tree_view_insert_column_with_attributes(priv->tree_view, -1, NULL, trg_rss_cell_renderer_new(), "title", RSSCOL_TITLE, "feed", RSSCOL_FEED, "published", RSSCOL_PUBDATE, "uploaded", RSSCOL_UPLOADED, NULL); g_signal_connect(priv->tree_view, "row-activated", G_CALLBACK(rss_item_activated), object); gtk_window_set_title(GTK_WINDOW(object), _("RSS Feeds")); toolbar = gtk_toolbar_new(); item = gtk_tool_button_new_from_stock(GTK_STOCK_REFRESH); gtk_widget_set_sensitive(GTK_WIDGET(item), TRUE); gtk_tool_item_set_tooltip_text(item, "Refresh"); g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(on_refresh), object); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, 0); item = gtk_tool_button_new_from_stock(GTK_STOCK_PREFERENCES); gtk_widget_set_sensitive(GTK_WIDGET(item), TRUE); gtk_tool_item_set_tooltip_text(item, "Configure Feeds"); g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(on_configure), object); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, 0); vbox = trg_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(toolbar), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), my_scrolledwin_new(GTK_WIDGET(priv->tree_view)), TRUE, TRUE, 0); gtk_container_add(GTK_CONTAINER(object), vbox); /*g_signal_connect(object, "response", G_CALLBACK(trg_rss_window_response_cb), NULL);*/ gtk_widget_set_size_request(GTK_WIDGET(object), 500, 300); return object; } static void trg_rss_window_dispose(GObject * object) { instance = NULL; G_OBJECT_CLASS(trg_rss_window_parent_class)->dispose(object); } static void trg_rss_window_class_init(TrgRssWindowClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(TrgRssWindowPrivate)); object_class->constructor = trg_rss_window_constructor; object_class->get_property = trg_rss_window_get_property; object_class->set_property = trg_rss_window_set_property; object_class->dispose = trg_rss_window_dispose; g_object_class_install_property(object_class, PROP_CLIENT, g_param_spec_pointer("trg-client", "TClient", "Client", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_PARENT, g_param_spec_object("parent-window", "Parent window", "Parent window", TRG_TYPE_MAIN_WINDOW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } static void trg_rss_window_init(TrgRssWindow * self G_GNUC_UNUSED) { } TrgRssWindow *trg_rss_window_get_instance(TrgMainWindow *parent, TrgClient *client) { if (instance == NULL) { instance = g_object_new(TRG_TYPE_RSS_WINDOW, "parent-window", parent, "trg-client", client, NULL); } return TRG_RSS_WINDOW(instance); } #endif transmission-remote-gtk-1.4.1/src/trg-rss-window.h000066400000000000000000000035571341276053300222060ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_RSS_WINDOW_H_ #define TRG_RSS_WINDOW_H_ #ifdef HAVE_RSS #include #include #include "trg-main-window.h" G_BEGIN_DECLS #define TRG_TYPE_RSS_WINDOW trg_rss_window_get_type() #define TRG_RSS_WINDOW(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_RSS_WINDOW, TrgRssWindow)) #define TRG_RSS_WINDOW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_RSS_WINDOW, TrgRssWindowClass)) #define TRG_IS_RSS_WINDOW(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_RSS_WINDOW)) #define TRG_IS_RSS_WINDOW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_RSS_WINDOW)) #define TRG_RSS_WINDOW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_RSS_WINDOW, TrgRssWindowClass)) typedef struct { GtkWindow parent; } TrgRssWindow; typedef struct { GtkWindowClass parent_class; } TrgRssWindowClass; GType trg_rss_window_get_type(void); TrgRssWindow *trg_rss_window_get_instance(TrgMainWindow *parent, TrgClient *client); G_END_DECLS #endif #endif /* TRG_RSS_WINDOW_H_ */ transmission-remote-gtk-1.4.1/src/trg-sortable-filtered-model.c000066400000000000000000000215201341276053300245600ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "trg-sortable-filtered-model.h" /* This class extends GtkTreeModelFilter, so it can implement the * GtkTreeSortable interface. All of the sortable functions are passed on to * a child GtkTreeModelSort. Also proxy the sort-column-changed signal * so that a TreeViewColumn can track changes for indicators. */ static void trg_sortable_filtered_model_tree_sortable_init(GtkTreeSortableIface * iface); /* TreeSortable interface */ static GtkTreeSortable * trg_sortable_filtered_model_get_real_sortable(GtkTreeSortable * sortable); static gboolean trg_sortable_filtered_model_sort_get_sort_column_id(GtkTreeSortable * sortable, gint * sort_column_id, GtkSortType * order); static void trg_sortable_filtered_model_sort_set_sort_column_id(GtkTreeSortable * sortable, gint sort_column_id, GtkSortType order); static void trg_sortable_filtered_model_sort_set_sort_func(GtkTreeSortable * sortable, gint sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy); static void trg_sortable_filtered_model_sort_set_default_sort_func(GtkTreeSortable * sortable, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy); static gboolean trg_sortable_filtered_model_sort_has_default_sort_func(GtkTreeSortable * sortable); static void trg_sortable_filtered_model_sort_column_changed(GtkTreeSortable * realSortable, GtkTreeSortable * fakeSortable); G_DEFINE_TYPE_WITH_CODE(TrgSortableFilteredModel, trg_sortable_filtered_model, GTK_TYPE_TREE_MODEL_FILTER, G_IMPLEMENT_INTERFACE(GTK_TYPE_TREE_SORTABLE, trg_sortable_filtered_model_tree_sortable_init)) static void trg_sortable_filtered_model_class_init(TrgSortableFilteredModelClass * klass) { } static void trg_sortable_filtered_model_init(TrgSortableFilteredModel * self) { } static void trg_sortable_filtered_model_tree_sortable_init(GtkTreeSortableIface * iface) { iface->get_sort_column_id = trg_sortable_filtered_model_sort_get_sort_column_id; iface->set_sort_column_id = trg_sortable_filtered_model_sort_set_sort_column_id; iface->set_sort_func = trg_sortable_filtered_model_sort_set_sort_func; iface->set_default_sort_func = trg_sortable_filtered_model_sort_set_default_sort_func; iface->has_default_sort_func = trg_sortable_filtered_model_sort_has_default_sort_func; } static void trg_sortable_filtered_model_sort_column_changed(GtkTreeSortable * realSortable G_GNUC_UNUSED, GtkTreeSortable * fakeSortable) { g_signal_emit_by_name(fakeSortable, "sort-column-changed"); } GtkTreeModel *trg_sortable_filtered_model_new(GtkTreeSortable * child_model, GtkTreePath * root) { GObject *obj = g_object_new(TRG_TYPE_SORTABLE_FILTERED_MODEL, "child-model", GTK_TREE_MODEL(child_model), "virtual-root", root, NULL); g_signal_connect(child_model, "sort-column-changed", G_CALLBACK (trg_sortable_filtered_model_sort_column_changed), obj); return GTK_TREE_MODEL(obj); } static GtkTreeSortable * trg_sortable_filtered_model_get_real_sortable(GtkTreeSortable * sortable) { return GTK_TREE_SORTABLE(gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER(sortable))); } static gboolean trg_sortable_filtered_model_sort_get_sort_column_id(GtkTreeSortable * sortable, gint * sort_column_id, GtkSortType * order) { GtkTreeSortable *realSortable = trg_sortable_filtered_model_get_real_sortable(sortable); return gtk_tree_sortable_get_sort_column_id(realSortable, sort_column_id, order); } static void trg_sortable_filtered_model_sort_set_sort_column_id(GtkTreeSortable * sortable, gint sort_column_id, GtkSortType order) { GtkTreeSortable *realSortable = trg_sortable_filtered_model_get_real_sortable(sortable); gtk_tree_sortable_set_sort_column_id(realSortable, sort_column_id, order); } static void trg_sortable_filtered_model_sort_set_sort_func(GtkTreeSortable * sortable, gint sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy) { GtkTreeSortable *realSortable = trg_sortable_filtered_model_get_real_sortable(sortable); gtk_tree_sortable_set_sort_func(realSortable, sort_column_id, func, data, destroy); } static void trg_sortable_filtered_model_sort_set_default_sort_func(GtkTreeSortable * sortable, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy) { GtkTreeSortable *realSortable = trg_sortable_filtered_model_get_real_sortable(sortable); gtk_tree_sortable_set_default_sort_func(realSortable, func, data, destroy); } static gboolean trg_sortable_filtered_model_sort_has_default_sort_func(GtkTreeSortable * sortable) { GtkTreeSortable *realSortable = trg_sortable_filtered_model_get_real_sortable(sortable); return gtk_tree_sortable_has_default_sort_func(realSortable); } transmission-remote-gtk-1.4.1/src/trg-sortable-filtered-model.h000066400000000000000000000042701341276053300245700ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _TRG_SORTABLE_FILTERED_MODEL #define _TRG_SORTABLE_FILTERED_MODEL #include #include G_BEGIN_DECLS #define TRG_TYPE_SORTABLE_FILTERED_MODEL trg_sortable_filtered_model_get_type() #define TRG_SORTABLE_FILTERED_MODEL(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_SORTABLE_FILTERED_MODEL, TrgSortableFilteredModel)) #define TRG_SORTABLE_FILTERED_MODEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_SORTABLE_FILTERED_MODEL, TrgSortableFilteredModelClass)) #define TRG_IS_SORTABLE_FILTERED_MODEL(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_SORTABLE_FILTERED_MODEL)) #define TRG_IS_SORTABLE_FILTERED_MODEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_SORTABLE_FILTERED_MODEL)) #define TRG_SORTABLE_FILTERED_MODEL_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_SORTABLE_FILTERED_MODEL, TrgSortableFilteredModelClass)) typedef struct { GtkTreeModelFilter parent; } TrgSortableFilteredModel; typedef struct { GtkTreeModelFilterClass parent_class; } TrgSortableFilteredModelClass; GType trg_sortable_filtered_model_get_type(void); GtkTreeModel *trg_sortable_filtered_model_new(GtkTreeSortable * child_model, GtkTreePath * root); G_END_DECLS #endif /* _TRG_SORTABLE_FILTERED_MODEL */ transmission-remote-gtk-1.4.1/src/trg-state-selector.c000066400000000000000000000754771341276053300230350ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "torrent.h" #include "trg-cell-renderer-counter.h" #include "trg-state-selector.h" #include "trg-torrent-model.h" #include "util.h" #include "trg-prefs.h" #include "trg-client.h" enum { SELECTOR_STATE_CHANGED, SELECTOR_SIGNAL_COUNT }; enum { PROP_0, PROP_CLIENT }; static guint signals[SELECTOR_SIGNAL_COUNT] = { 0 }; G_DEFINE_TYPE(TrgStateSelector, trg_state_selector, GTK_TYPE_TREE_VIEW) #define TRG_STATE_SELECTOR_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_STATE_SELECTOR, TrgStateSelectorPrivate)) typedef struct _TrgStateSelectorPrivate TrgStateSelectorPrivate; struct _TrgStateSelectorPrivate { guint flag; gboolean showDirs; gboolean showTrackers; gboolean dirsFirst; TrgClient *client; TrgPrefs *prefs; GHashTable *trackers; GHashTable *directories; GRegex *urlHostRegex; gint n_categories; GtkListStore *store; GtkTreeRowReference *error_rr; GtkTreeRowReference *all_rr; GtkTreeRowReference *paused_rr; GtkTreeRowReference *down_rr; GtkTreeRowReference *seeding_rr; GtkTreeRowReference *complete_rr; GtkTreeRowReference *incomplete_rr; GtkTreeRowReference *checking_rr; GtkTreeRowReference *active_rr; GtkTreeRowReference *seed_wait_rr; GtkTreeRowReference *down_wait_rr; }; GRegex *trg_state_selector_get_url_host_regex(TrgStateSelector * s) { TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(s); return priv->urlHostRegex; } guint32 trg_state_selector_get_flag(TrgStateSelector * s) { TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(s); return priv->flag; } static void state_selection_changed(GtkTreeSelection * selection, gpointer data) { TrgStateSelectorPrivate *priv; GtkTreeIter iter; GtkTreeModel *stateModel; guint index = 0; priv = TRG_STATE_SELECTOR_GET_PRIVATE(data); if (gtk_tree_selection_get_selected(selection, &stateModel, &iter)) gtk_tree_model_get(stateModel, &iter, STATE_SELECTOR_BIT, &priv->flag, STATE_SELECTOR_INDEX, &index, -1); else priv->flag = 0; trg_prefs_set_int(priv->prefs, TRG_PREFS_STATE_SELECTOR_LAST, index, TRG_PREFS_GLOBAL); g_signal_emit(TRG_STATE_SELECTOR(data), signals[SELECTOR_STATE_CHANGED], 0, priv->flag); } static GtkTreeRowReference *quick_tree_ref_new(GtkTreeModel * model, GtkTreeIter * iter) { GtkTreePath *path = gtk_tree_model_get_path(model, iter); GtkTreeRowReference *rr = gtk_tree_row_reference_new(model, path); gtk_tree_path_free(path); return rr; } struct cruft_remove_args { GHashTable *table; gint64 serial; }; static gboolean trg_state_selector_remove_cruft(gpointer key, gpointer value, gpointer data) { struct cruft_remove_args *args = (struct cruft_remove_args *) data; GtkTreeRowReference *rr = (GtkTreeRowReference *) value; GtkTreeModel *model = gtk_tree_row_reference_get_model(rr); GtkTreePath *path = gtk_tree_row_reference_get_path(rr); gboolean remove; GtkTreeIter iter; gint64 currentSerial; gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, STATE_SELECTOR_SERIAL, ¤tSerial, -1); remove = (args->serial != currentSerial); gtk_tree_path_free(path); return remove; } gchar *trg_state_selector_get_selected_text(TrgStateSelector * s) { GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(s)); GtkTreeModel *model; GtkTreeIter iter; gchar *name = NULL; if (gtk_tree_selection_get_selected(sel, &model, &iter)) gtk_tree_model_get(model, &iter, STATE_SELECTOR_NAME, &name, -1); return name; } static void trg_state_selector_update_dynamic_filter(GtkTreeModel * model, GtkTreeRowReference * rr, gint64 serial) { GtkTreeIter iter; GtkTreePath *path = gtk_tree_row_reference_get_path(rr); gint64 oldSerial; GValue gvalue = G_VALUE_INIT; gint oldCount; gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, STATE_SELECTOR_SERIAL, &oldSerial, STATE_SELECTOR_COUNT, &oldCount, -1); if (oldSerial != serial) { g_value_init(&gvalue, G_TYPE_INT); g_value_set_int(&gvalue, 1); gtk_list_store_set_value(GTK_LIST_STORE(model), &iter, STATE_SELECTOR_COUNT, &gvalue); memset(&gvalue, 0, sizeof(GValue)); g_value_init(&gvalue, G_TYPE_INT64); g_value_set_int64(&gvalue, serial); gtk_list_store_set_value(GTK_LIST_STORE(model), &iter, STATE_SELECTOR_SERIAL, &gvalue); } else { g_value_init(&gvalue, G_TYPE_INT); g_value_set_int(&gvalue, ++oldCount); gtk_list_store_set_value(GTK_LIST_STORE(model), &iter, STATE_SELECTOR_COUNT, &gvalue); } gtk_tree_path_free(path); } static void refresh_statelist_cb(GtkWidget * w, gpointer data) { TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(data); trg_client_inc_serial(priv->client); trg_state_selector_update(TRG_STATE_SELECTOR(data), TORRENT_UPDATE_ADDREMOVE); } static void view_popup_menu(GtkWidget * treeview, GdkEventButton * event, gpointer data G_GNUC_UNUSED) { GtkWidget *menu, *item; menu = gtk_menu_new(); item = gtk_image_menu_item_new_with_label(GTK_STOCK_REFRESH); gtk_image_menu_item_set_use_stock(GTK_IMAGE_MENU_ITEM(item), TRUE); gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM (item), TRUE); g_signal_connect(item, "activate", G_CALLBACK(refresh_statelist_cb), treeview); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, (event != NULL) ? event->button : 0, gdk_event_get_time((GdkEvent *) event)); } static gboolean view_onPopupMenu(GtkWidget * treeview, gpointer userdata) { view_popup_menu(treeview, NULL, userdata); return TRUE; } static gboolean view_onButtonPressed(GtkWidget * treeview, GdkEventButton * event, gpointer userdata) { if (event->type == GDK_BUTTON_PRESS && event->button == 3) { view_popup_menu(treeview, event, userdata); return TRUE; } return FALSE; } struct state_find_pos { int offset; int range; int pos; const gchar *name; }; static gboolean trg_state_selector_find_pos_foreach(GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data) { struct state_find_pos *args = (struct state_find_pos *) data; gchar *name; gboolean res; if (args->pos < args->offset) { args->pos++; return FALSE; } else if (args->range >= 0 && args->pos > args->offset + args->range - 1) { return TRUE; } gtk_tree_model_get(model, iter, STATE_SELECTOR_NAME, &name, -1); res = g_strcmp0(name, args->name) >= 0; g_free(name); if (!res) args->pos++; return res; } static void trg_state_selector_insert(TrgStateSelector * s, int offset, gint range, const gchar * name, GtkTreeIter * iter) { GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(s)); struct state_find_pos args; args.offset = offset; args.pos = 0; args.range = range; args.name = name; gtk_tree_model_foreach(model, trg_state_selector_find_pos_foreach, &args); gtk_list_store_insert(GTK_LIST_STORE(model), iter, args.pos); } void trg_state_selector_update(TrgStateSelector * s, guint whatsChanged) { TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(s); GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(s)); TrgClient *client = priv->client; gint64 updateSerial = trg_client_get_serial(client); GList *torrentItemRefs; GtkTreeIter torrentIter, iter; GList *trackersList, *trackerItem, *li; GtkTreeRowReference *rr; GtkTreePath *path; GtkTreeModel *torrentModel; gpointer result; struct cruft_remove_args cruft; if (!trg_client_is_connected(client)) return; torrentItemRefs = g_hash_table_get_values(trg_client_get_torrent_table(client)); for (li = torrentItemRefs; li; li = g_list_next(li)) { JsonObject *t = NULL; rr = (GtkTreeRowReference *) li->data; path = gtk_tree_row_reference_get_path(rr); torrentModel = gtk_tree_row_reference_get_model(rr); if (path) { if (gtk_tree_model_get_iter(torrentModel, &torrentIter, path)) { gtk_tree_model_get(torrentModel, &torrentIter, TORRENT_COLUMN_JSON, &t, -1); } gtk_tree_path_free(path); } if (!t) continue; if (priv->showTrackers && (whatsChanged & TORRENT_UPDATE_ADDREMOVE)) { trackersList = json_array_get_elements(torrent_get_tracker_stats(t)); for (trackerItem = trackersList; trackerItem; trackerItem = g_list_next(trackerItem)) { JsonObject *tracker = json_node_get_object((JsonNode *) trackerItem->data); const gchar *announceUrl = tracker_stats_get_announce(tracker); gchar *announceHost = trg_gregex_get_first(priv->urlHostRegex, announceUrl); if (!announceHost) continue; result = g_hash_table_lookup(priv->trackers, announceHost); if (result) { trg_state_selector_update_dynamic_filter(model, (GtkTreeRowReference *) result, updateSerial); g_free(announceHost); } else { if (priv->dirsFirst){ trg_state_selector_insert(s, priv->n_categories + g_hash_table_size(priv->directories), -1, announceHost, &iter); } else { trg_state_selector_insert(s, priv->n_categories, g_hash_table_size(priv->trackers), announceHost, &iter); } gtk_list_store_set(GTK_LIST_STORE(model), &iter, STATE_SELECTOR_ICON, GTK_STOCK_NETWORK, STATE_SELECTOR_NAME, announceHost, STATE_SELECTOR_SERIAL, updateSerial, STATE_SELECTOR_COUNT, 1, STATE_SELECTOR_BIT, FILTER_FLAG_TRACKER, STATE_SELECTOR_INDEX, 0, -1); g_hash_table_insert(priv->trackers, announceHost, quick_tree_ref_new(model, &iter)); } } g_list_free(trackersList); } if (priv->showDirs && ((whatsChanged & TORRENT_UPDATE_ADDREMOVE) || (whatsChanged & TORRENT_UPDATE_PATH_CHANGE))) { gchar *dir; gtk_tree_model_get(torrentModel, &torrentIter, TORRENT_COLUMN_DOWNLOADDIR_SHORT, &dir, -1); result = g_hash_table_lookup(priv->directories, dir); if (result) { trg_state_selector_update_dynamic_filter(model, (GtkTreeRowReference *) result, updateSerial); } else { if (priv->dirsFirst){ trg_state_selector_insert(s, priv->n_categories, g_hash_table_size(priv->directories), dir, &iter); } else { trg_state_selector_insert(s, priv->n_categories + g_hash_table_size(priv->trackers), -1, dir, &iter); } gtk_list_store_set(GTK_LIST_STORE(model), &iter, STATE_SELECTOR_ICON, GTK_STOCK_DIRECTORY, STATE_SELECTOR_NAME, dir, STATE_SELECTOR_SERIAL, updateSerial, STATE_SELECTOR_BIT, FILTER_FLAG_DIR, STATE_SELECTOR_COUNT, 1, STATE_SELECTOR_INDEX, 0, -1); g_hash_table_insert(priv->directories, g_strdup(dir), quick_tree_ref_new(model, &iter)); } g_free(dir); } } g_list_free(torrentItemRefs); cruft.serial = trg_client_get_serial(client); if (priv->showTrackers && ((whatsChanged & TORRENT_UPDATE_ADDREMOVE))) { cruft.table = priv->trackers; g_hash_table_foreach_remove(priv->trackers, trg_state_selector_remove_cruft, &cruft); } if (priv->showDirs && ((whatsChanged & TORRENT_UPDATE_ADDREMOVE) || (whatsChanged & TORRENT_UPDATE_PATH_CHANGE))) { cruft.table = priv->directories; g_hash_table_foreach_remove(priv->directories, trg_state_selector_remove_cruft, &cruft); } } void trg_state_selector_set_show_dirs(TrgStateSelector * s, gboolean show) { TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(s); priv->showDirs = show; if (!show) g_hash_table_remove_all(priv->directories); else trg_state_selector_update(s, TORRENT_UPDATE_PATH_CHANGE); } static void on_torrents_state_change(TrgTorrentModel * model, guint whatsChanged, gpointer data) { TrgStateSelector *selector = TRG_STATE_SELECTOR(data); trg_state_selector_update(selector, whatsChanged); if ((whatsChanged & TORRENT_UPDATE_ADDREMOVE) || (whatsChanged & TORRENT_UPDATE_STATE_CHANGE)) trg_state_selector_stats_update(selector, trg_torrent_model_get_stats (model)); } void trg_state_selector_set_show_trackers(TrgStateSelector * s, gboolean show) { TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(s); priv->showTrackers = show; if (!show) g_hash_table_remove_all(priv->trackers); else trg_state_selector_update(s, TORRENT_UPDATE_ADDREMOVE); } void trg_state_selector_set_directories_first(TrgStateSelector * s, gboolean _dirsFirst){ TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(s); priv->dirsFirst = _dirsFirst; g_hash_table_remove_all(priv->directories); g_hash_table_remove_all(priv->trackers); trg_state_selector_update(s, TORRENT_UPDATE_ADDREMOVE); } static void trg_state_selector_add_state(TrgStateSelector * selector, GtkTreeIter * iter, gint pos, gchar * icon, gchar * name, guint32 flag, GtkTreeRowReference ** rr) { TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(selector); GtkListStore *model = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(selector))); if (pos < 0) gtk_list_store_append(priv->store, iter); else gtk_list_store_insert(priv->store, iter, pos); gtk_list_store_set(model, iter, STATE_SELECTOR_ICON, icon, STATE_SELECTOR_NAME, name, STATE_SELECTOR_BIT, flag, STATE_SELECTOR_INDEX, gtk_tree_model_iter_n_children(GTK_TREE_MODEL (model), NULL) - 1, -1); if (rr) *rr = quick_tree_ref_new(GTK_TREE_MODEL(model), iter); priv->n_categories++; } static void remove_row_ref_and_free(GtkTreeRowReference * rr) { GtkTreeModel *model = gtk_tree_row_reference_get_model(rr); GtkTreePath *path = gtk_tree_row_reference_get_path(rr); GtkTreeIter iter; gtk_tree_model_get_iter(model, &iter, path); gtk_list_store_remove(GTK_LIST_STORE(model), &iter); gtk_tree_path_free(path); gtk_tree_row_reference_free(rr); } static void trg_state_selector_update_stat(GtkTreeRowReference * rr, gint count) { if (rr) { GValue gvalue = G_VALUE_INIT; GtkTreeIter iter; GtkTreePath *path = gtk_tree_row_reference_get_path(rr); GtkTreeModel *model = gtk_tree_row_reference_get_model(rr); gtk_tree_model_get_iter(model, &iter, path); g_value_init(&gvalue, G_TYPE_INT); g_value_set_int(&gvalue, count); gtk_list_store_set_value(GTK_LIST_STORE(model), &iter, STATE_SELECTOR_COUNT, &gvalue); gtk_tree_path_free(path); } } void trg_state_selector_stats_update(TrgStateSelector * s, trg_torrent_model_update_stats * stats) { TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(s); GtkTreeIter iter; if (stats->error > 0 && !priv->error_rr) { trg_state_selector_add_state(s, &iter, priv->n_categories - 1, GTK_STOCK_DIALOG_WARNING, _("Error"), TORRENT_FLAG_ERROR, &priv->error_rr); } else if (stats->error < 1 && priv->error_rr) { remove_row_ref_and_free(priv->error_rr); priv->error_rr = NULL; priv->n_categories--; } trg_state_selector_update_stat(priv->all_rr, stats->count); trg_state_selector_update_stat(priv->down_rr, stats->down); trg_state_selector_update_stat(priv->seeding_rr, stats->seeding); trg_state_selector_update_stat(priv->error_rr, stats->error); trg_state_selector_update_stat(priv->paused_rr, stats->paused); trg_state_selector_update_stat(priv->complete_rr, stats->complete); trg_state_selector_update_stat(priv->incomplete_rr, stats->incomplete); trg_state_selector_update_stat(priv->active_rr, stats->active); trg_state_selector_update_stat(priv->checking_rr, stats->checking); trg_state_selector_update_stat(priv->down_wait_rr, stats->down_wait); trg_state_selector_update_stat(priv->seed_wait_rr, stats->seed_wait); } void trg_state_selector_disconnect(TrgStateSelector * s) { TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(s); if (priv->error_rr) { remove_row_ref_and_free(priv->error_rr); priv->error_rr = NULL; priv->n_categories--; } g_hash_table_remove_all(priv->trackers); g_hash_table_remove_all(priv->directories); trg_state_selector_update_stat(priv->all_rr, -1); trg_state_selector_update_stat(priv->down_rr, -1); trg_state_selector_update_stat(priv->seeding_rr, -1); trg_state_selector_update_stat(priv->error_rr, -1); trg_state_selector_update_stat(priv->paused_rr, -1); trg_state_selector_update_stat(priv->complete_rr, -1); trg_state_selector_update_stat(priv->incomplete_rr, -1); trg_state_selector_update_stat(priv->active_rr, -1); trg_state_selector_update_stat(priv->checking_rr, -1); } static void trg_state_selector_init(TrgStateSelector * self) { } TrgStateSelector *trg_state_selector_new(TrgClient * client, TrgTorrentModel * tmodel) { TrgStateSelector *selector = g_object_new(TRG_TYPE_STATE_SELECTOR, "client", client, NULL); g_signal_connect(tmodel, "torrents-state-change", G_CALLBACK(on_torrents_state_change), selector); return selector; } static GObject *trg_state_selector_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *object; TrgStateSelector *selector; TrgStateSelectorPrivate *priv; GtkListStore *store; GtkTreeViewColumn *column; GtkCellRenderer *renderer; GtkTreeIter iter; gint index; GtkTreeSelection *selection; object = G_OBJECT_CLASS (trg_state_selector_parent_class)->constructor(type, n_construct_properties, construct_params); selector = TRG_STATE_SELECTOR(object); priv = TRG_STATE_SELECTOR_GET_PRIVATE(object); priv->urlHostRegex = trg_uri_host_regex_new(); priv->trackers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) remove_row_ref_and_free); priv->directories = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) remove_row_ref_and_free); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(object), FALSE); column = gtk_tree_view_column_new(); renderer = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(column, renderer, FALSE); g_object_set(renderer, "stock-size", 4, NULL); gtk_tree_view_column_set_attributes(column, renderer, "stock-id", STATE_SELECTOR_ICON, NULL); renderer = trg_cell_renderer_counter_new(); gtk_tree_view_column_pack_start(column, renderer, TRUE); gtk_tree_view_column_set_attributes(column, renderer, "state-label", STATE_SELECTOR_NAME, "state-count", STATE_SELECTOR_COUNT, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(object), column); store = priv->store = gtk_list_store_new(STATE_SELECTOR_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_UINT, G_TYPE_INT64, G_TYPE_UINT); gtk_tree_view_set_model(GTK_TREE_VIEW(object), GTK_TREE_MODEL(store)); trg_state_selector_add_state(selector, &iter, -1, GTK_STOCK_ABOUT, _("All"), 0, &priv->all_rr); trg_state_selector_add_state(selector, &iter, -1, GTK_STOCK_GO_DOWN, _("Downloading"), TORRENT_FLAG_DOWNLOADING, &priv->down_rr); trg_state_selector_add_state(selector, &iter, -1, GTK_STOCK_MEDIA_REWIND, _("Queue Down"), TORRENT_FLAG_DOWNLOADING_WAIT, &priv->down_wait_rr); trg_state_selector_add_state(selector, &iter, -1, GTK_STOCK_GO_UP, _("Seeding"), TORRENT_FLAG_SEEDING, &priv->seeding_rr); trg_state_selector_add_state(selector, &iter, -1, GTK_STOCK_MEDIA_FORWARD, _("Queue Up"), TORRENT_FLAG_SEEDING_WAIT, &priv->seed_wait_rr); trg_state_selector_add_state(selector, &iter, -1, GTK_STOCK_MEDIA_PAUSE, _("Paused"), TORRENT_FLAG_PAUSED, &priv->paused_rr); trg_state_selector_add_state(selector, &iter, -1, GTK_STOCK_APPLY, _("Complete"), TORRENT_FLAG_COMPLETE, &priv->complete_rr); trg_state_selector_add_state(selector, &iter, -1, GTK_STOCK_SELECT_ALL, _("Incomplete"), TORRENT_FLAG_INCOMPLETE, &priv->incomplete_rr); trg_state_selector_add_state(selector, &iter, -1, GTK_STOCK_NETWORK, _("Active"), TORRENT_FLAG_ACTIVE, &priv->active_rr); trg_state_selector_add_state(selector, &iter, -1, GTK_STOCK_REFRESH, _("Checking"), TORRENT_FLAG_CHECKING_ANY, &priv->checking_rr); trg_state_selector_add_state(selector, &iter, -1, NULL, NULL, 0, NULL); gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(object), TRUE); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(object)); g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(state_selection_changed), object); g_signal_connect(object, "button-press-event", G_CALLBACK(view_onButtonPressed), NULL); g_signal_connect(object, "popup-menu", G_CALLBACK(view_onPopupMenu), NULL); gtk_tree_view_set_search_column(GTK_TREE_VIEW(object), STATE_SELECTOR_NAME); index = trg_prefs_get_int(priv->prefs, TRG_PREFS_STATE_SELECTOR_LAST, TRG_PREFS_GLOBAL); if (index > 0 && gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &iter, NULL, index)) { GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(object)); gtk_tree_selection_select_iter(selection, &iter); } priv->showDirs = trg_prefs_get_bool(priv->prefs, TRG_PREFS_KEY_FILTER_DIRS, TRG_PREFS_GLOBAL); priv->showTrackers = trg_prefs_get_bool(priv->prefs, TRG_PREFS_KEY_FILTER_TRACKERS, TRG_PREFS_GLOBAL); priv->dirsFirst = trg_prefs_get_bool(priv->prefs, TRG_PREFS_KEY_DIRECTORIES_FIRST, TRG_PREFS_GLOBAL); return object; } void trg_state_selector_set_queues_enabled(TrgStateSelector * s, gboolean enabled) { TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(s); GtkTreeIter iter; if (enabled) { trg_state_selector_add_state(s, &iter, 2, GTK_STOCK_MEDIA_REWIND, _("Queue Down"), TORRENT_FLAG_DOWNLOADING_WAIT, &priv->down_wait_rr); trg_state_selector_add_state(s, &iter, 4, GTK_STOCK_MEDIA_FORWARD, _("Queue Up"), TORRENT_FLAG_SEEDING_WAIT, &priv->seed_wait_rr); } else { remove_row_ref_and_free(priv->seed_wait_rr); remove_row_ref_and_free(priv->down_wait_rr); priv->down_wait_rr = NULL; priv->seed_wait_rr = NULL; priv->n_categories -= 2; } } static void trg_state_selector_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(object); switch (property_id) { case PROP_CLIENT: g_value_set_object(value, priv->client); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_state_selector_set_property(GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec G_GNUC_UNUSED) { TrgStateSelectorPrivate *priv = TRG_STATE_SELECTOR_GET_PRIVATE(object); switch (prop_id) { case PROP_CLIENT: priv->client = g_value_get_object(value); priv->prefs = trg_client_get_prefs(priv->client); break; } } static void trg_state_selector_class_init(TrgStateSelectorClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->constructor = trg_state_selector_constructor; object_class->set_property = trg_state_selector_set_property; object_class->get_property = trg_state_selector_get_property; signals[SELECTOR_STATE_CHANGED] = g_signal_new("torrent-state-changed", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (TrgStateSelectorClass, torrent_state_changed), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); g_object_class_install_property(object_class, PROP_CLIENT, g_param_spec_object("client", "Client", "Client", TRG_TYPE_CLIENT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_type_class_add_private(klass, sizeof(TrgStateSelectorPrivate)); } transmission-remote-gtk-1.4.1/src/trg-state-selector.h000066400000000000000000000063071341276053300230240ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_STATE_LIST_H_ #define TRG_STATE_LIST_H_ #include #include #include "trg-torrent-model.h" #include "trg-client.h" enum { STATE_SELECTOR_ICON, STATE_SELECTOR_NAME, STATE_SELECTOR_COUNT, STATE_SELECTOR_BIT, STATE_SELECTOR_SERIAL, STATE_SELECTOR_INDEX, STATE_SELECTOR_COLUMNS }; G_BEGIN_DECLS #define TRG_TYPE_STATE_SELECTOR trg_state_selector_get_type() #define TRG_STATE_SELECTOR(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_STATE_SELECTOR, TrgStateSelector)) #define TRG_STATE_SELECTOR_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_STATE_SELECTOR, TrgStateSelectorClass)) #define TRG_IS_STATE_SELECTOR(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_STATE_SELECTOR)) #define TRG_IS_STATE_SELECTOR_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_STATE_SELECTOR)) #define TRG_STATE_SELECTOR_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_STATE_SELECTOR, TrgStateSelectorClass)) typedef struct { GtkTreeView parent; } TrgStateSelector; typedef struct { GtkTreeViewClass parent_class; void (*torrent_state_changed) (TrgStateSelector * selector, guint flag, gpointer data); } TrgStateSelectorClass; GType trg_state_selector_get_type(void); TrgStateSelector *trg_state_selector_new(TrgClient * client, TrgTorrentModel * tmodel); G_END_DECLS guint32 trg_state_selector_get_flag(TrgStateSelector * s); void trg_state_selector_update(TrgStateSelector * s, guint whatsChanged); gchar *trg_state_selector_get_selected_text(TrgStateSelector * s); GRegex *trg_state_selector_get_url_host_regex(TrgStateSelector * s); void trg_state_selector_disconnect(TrgStateSelector * s); void trg_state_selector_set_show_trackers(TrgStateSelector * s, gboolean show); void trg_state_selector_set_directories_first(TrgStateSelector * s, gboolean _dirsFirst); void trg_state_selector_set_show_dirs(TrgStateSelector * s, gboolean show); void trg_state_selector_set_queues_enabled(TrgStateSelector * s, gboolean enabled); void trg_state_selector_stats_update(TrgStateSelector * s, trg_torrent_model_update_stats * stats); #endif /* TRG_STATE_LIST_H_ */ transmission-remote-gtk-1.4.1/src/trg-stats-dialog.c000066400000000000000000000322541341276053300224540ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "hig.h" #include "requests.h" #include "json.h" #include "util.h" #include "trg-client.h" #include "trg-stats-dialog.h" #include "trg-main-window.h" #include "trg-tree-view.h" enum { STATCOL_STAT, STATCOL_SESSION, STATCOL_CUMULAT, STATCOL_COLUMNS }; enum { PROP_0, PROP_PARENT, PROP_CLIENT }; #define STATS_UPDATE_INTERVAL 5 G_DEFINE_TYPE(TrgStatsDialog, trg_stats_dialog, GTK_TYPE_DIALOG) #define TRG_STATS_DIALOG_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_STATS_DIALOG, TrgStatsDialogPrivate)) typedef struct _TrgStatsDialogPrivate TrgStatsDialogPrivate; struct _TrgStatsDialogPrivate { TrgClient *client; TrgMainWindow *parent; GtkWidget *tv; GtkListStore *model; GtkTreeRowReference *rr_down, *rr_up, *rr_ratio, *rr_files_added, *rr_session_count, *rr_active, *rr_version; }; static GObject *instance = NULL; static gboolean trg_update_stats_timerfunc(gpointer data); static gboolean on_stats_reply(gpointer data); static void trg_stats_dialog_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } static void trg_stats_dialog_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgStatsDialogPrivate *priv = TRG_STATS_DIALOG_GET_PRIVATE(object); switch (property_id) { case PROP_CLIENT: priv->client = g_value_get_pointer(value); break; case PROP_PARENT: priv->parent = g_value_get_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_stats_response_cb(GtkDialog * dlg, gint res_id, gpointer data G_GNUC_UNUSED) { gtk_widget_destroy(GTK_WIDGET(dlg)); instance = NULL; } static GtkTreeRowReference *stats_dialog_add_statistic(GtkListStore * model, gchar * name) { GtkTreeIter iter; GtkTreePath *path; GtkTreeRowReference *rr; gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, STATCOL_STAT, name, -1); path = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &iter); rr = gtk_tree_row_reference_new(GTK_TREE_MODEL(model), path); gtk_tree_path_free(path); return rr; } static void update_statistic(GtkTreeRowReference * rr, gchar * session, gchar * cumulat) { GtkTreePath *path = gtk_tree_row_reference_get_path(rr); GtkTreeModel *model = gtk_tree_row_reference_get_model(rr); GtkTreeIter iter; gtk_tree_model_get_iter(model, &iter, path); gtk_list_store_set(GTK_LIST_STORE(model), &iter, STATCOL_SESSION, session, STATCOL_CUMULAT, cumulat, -1); gtk_tree_path_free(path); } static JsonObject *get_session_arg(JsonObject * args) { return json_object_get_object_member(args, "current-stats"); } static JsonObject *get_cumulat_arg(JsonObject * args) { return json_object_get_object_member(args, "cumulative-stats"); } static void update_int_stat(JsonObject * args, GtkTreeRowReference * rr, gchar * jsonKey) { gchar session_val[32]; gchar cumulat_val[32]; g_snprintf(session_val, sizeof(session_val), "%" G_GINT64_FORMAT, json_object_get_int_member(get_session_arg(args), jsonKey)); g_snprintf(cumulat_val, sizeof(cumulat_val), "%" G_GINT64_FORMAT, json_object_get_int_member(get_cumulat_arg(args), jsonKey)); update_statistic(rr, session_val, cumulat_val); } static void update_size_stat(JsonObject * args, GtkTreeRowReference * rr, gchar * jsonKey) { gchar session_val[32]; gchar cumulat_val[32]; trg_strlsize(cumulat_val, json_object_get_int_member(get_cumulat_arg(args), jsonKey)); trg_strlsize(session_val, json_object_get_int_member(get_session_arg(args), jsonKey)); update_statistic(rr, session_val, cumulat_val); } static void update_ratio_stat(JsonObject * args, GtkTreeRowReference * rr, gchar * jsonKeyA, gchar * jsonKeyB) { gchar session_val[32]; gchar cumulat_val[32]; trg_strlratio(session_val, json_object_get_double_member(get_session_arg(args), jsonKeyA) / json_object_get_double_member(get_session_arg(args), jsonKeyB) ); trg_strlratio(cumulat_val, json_object_get_double_member(get_cumulat_arg(args), jsonKeyA) / json_object_get_double_member(get_cumulat_arg(args), jsonKeyB) ); update_statistic(rr, session_val, cumulat_val); } static void update_time_stat(JsonObject * args, GtkTreeRowReference * rr, gchar * jsonKey) { gchar session_val[32]; gchar cumulat_val[32]; tr_strltime_long(session_val, json_object_get_int_member(get_session_arg(args), jsonKey), sizeof(session_val)); tr_strltime_long(cumulat_val, json_object_get_int_member(get_cumulat_arg(args), jsonKey), sizeof(cumulat_val)); update_statistic(rr, session_val, cumulat_val); } static gboolean on_stats_reply(gpointer data) { trg_response *response = (trg_response *) data; TrgStatsDialogPrivate *priv; JsonObject *args; char versionStr[32]; if (!TRG_IS_STATS_DIALOG(response->cb_data)) { trg_response_free(response); return FALSE; } priv = TRG_STATS_DIALOG_GET_PRIVATE(response->cb_data); if (response->status == CURLE_OK) { args = get_arguments(response->obj); g_snprintf(versionStr, sizeof(versionStr), "Transmission %s", trg_client_get_version_string(priv->client)); update_statistic(priv->rr_version, versionStr, ""); update_size_stat(args, priv->rr_up, "uploadedBytes"); update_size_stat(args, priv->rr_down, "downloadedBytes"); update_ratio_stat(args, priv->rr_ratio, "uploadedBytes", "downloadedBytes"); update_int_stat(args, priv->rr_files_added, "filesAdded"); update_int_stat(args, priv->rr_session_count, "sessionCount"); update_time_stat(args, priv->rr_active, "secondsActive"); if (trg_client_is_connected(priv->client)) g_timeout_add_seconds(STATS_UPDATE_INTERVAL, trg_update_stats_timerfunc, response->cb_data); } else { trg_error_dialog(GTK_WINDOW(data), response); } trg_response_free(response); return FALSE; } static gboolean trg_update_stats_timerfunc(gpointer data) { TrgStatsDialogPrivate *priv; if (TRG_IS_STATS_DIALOG(data)) { priv = TRG_STATS_DIALOG_GET_PRIVATE(data); if (trg_client_is_connected(priv->client)) dispatch_async(priv->client, session_stats(), on_stats_reply, data); } return FALSE; } static void trg_stats_add_column(GtkTreeView * tv, gint index, gchar * title, gint width) { GtkCellRenderer *renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes(title, renderer, "text", index, NULL); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width(column, width); gtk_tree_view_append_column(tv, column); } static GObject *trg_stats_dialog_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GtkWidget *tv; GObject *obj = G_OBJECT_CLASS (trg_stats_dialog_parent_class)->constructor(type, n_construct_properties, construct_params); TrgStatsDialogPrivate *priv = TRG_STATS_DIALOG_GET_PRIVATE(obj); gtk_window_set_title(GTK_WINDOW(obj), _("Statistics")); gtk_window_set_transient_for(GTK_WINDOW(obj), GTK_WINDOW(priv->parent)); gtk_window_set_destroy_with_parent(GTK_WINDOW(obj), TRUE); gtk_dialog_add_button(GTK_DIALOG(obj), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); gtk_container_set_border_width(GTK_CONTAINER(obj), GUI_PAD); gtk_dialog_set_default_response(GTK_DIALOG(obj), GTK_RESPONSE_CLOSE); g_signal_connect(G_OBJECT(obj), "response", G_CALLBACK(trg_stats_response_cb), NULL); priv->model = gtk_list_store_new(STATCOL_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); priv->rr_version = stats_dialog_add_statistic(priv->model, _("Version")); priv->rr_down = stats_dialog_add_statistic(priv->model, _("Download Total")); priv->rr_up = stats_dialog_add_statistic(priv->model, _("Upload Total")); priv->rr_ratio = stats_dialog_add_statistic(priv->model, _("Ratio")); priv->rr_files_added = stats_dialog_add_statistic(priv->model, _("Files Added")); priv->rr_session_count = stats_dialog_add_statistic(priv->model, _("Session Count")); priv->rr_active = stats_dialog_add_statistic(priv->model, _("Time Active")); tv = priv->tv = trg_tree_view_new(); gtk_widget_set_sensitive(tv, TRUE); trg_stats_add_column(GTK_TREE_VIEW(tv), STATCOL_STAT, _("Statistic"), 200); trg_stats_add_column(GTK_TREE_VIEW(tv), STATCOL_SESSION, _("Session"), 200); trg_stats_add_column(GTK_TREE_VIEW(tv), STATCOL_CUMULAT, _("Cumulative"), 200); gtk_tree_view_set_model(GTK_TREE_VIEW(tv), GTK_TREE_MODEL(priv->model)); gtk_container_set_border_width(GTK_CONTAINER(tv), GUI_PAD); gtk_box_pack_start(GTK_BOX(gtk_bin_get_child(GTK_BIN(obj))), tv, TRUE, TRUE, 0); dispatch_async(priv->client, session_stats(), on_stats_reply, obj); return obj; } static void trg_stats_dialog_class_init(TrgStatsDialogClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(TrgStatsDialogPrivate)); object_class->get_property = trg_stats_dialog_get_property; object_class->set_property = trg_stats_dialog_set_property; object_class->constructor = trg_stats_dialog_constructor; g_object_class_install_property(object_class, PROP_PARENT, g_param_spec_object ("parent-window", "Parent window", "Parent window", TRG_TYPE_MAIN_WINDOW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_CLIENT, g_param_spec_pointer ("trg-client", "TClient", "Client", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } static void trg_stats_dialog_init(TrgStatsDialog * self) { } TrgStatsDialog *trg_stats_dialog_get_instance(TrgMainWindow * parent, TrgClient * client) { if (instance == NULL) { instance = g_object_new(TRG_TYPE_STATS_DIALOG, "trg-client", client, "parent-window", parent, NULL); } return TRG_STATS_DIALOG(instance); } transmission-remote-gtk-1.4.1/src/trg-stats-dialog.h000066400000000000000000000037461341276053300224650ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_STATS_DIALOG_H_ #define TRG_STATS_DIALOG_H_ #include #include #include "trg-client.h" #include "trg-main-window.h" #include "trg-tree-view.h" G_BEGIN_DECLS #define TRG_TYPE_STATS_DIALOG trg_stats_dialog_get_type() #define TRG_STATS_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_STATS_DIALOG, TrgStatsDialog)) #define TRG_STATS_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_STATS_DIALOG, TrgStatsDialogClass)) #define TRG_IS_STATS_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_STATS_DIALOG)) #define TRG_IS_STATS_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_STATS_DIALOG)) #define TRG_STATS_DIALOG_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_STATS_DIALOG, TrgStatsDialogClass)) typedef struct { GtkDialog parent; } TrgStatsDialog; typedef struct { GtkDialogClass parent_class; } TrgStatsDialogClass; GType trg_stats_dialog_get_type(void); TrgStatsDialog *trg_stats_dialog_get_instance(TrgMainWindow * parent, TrgClient * client); G_END_DECLS #endif /* TRG_STATS_DIALOG_H_ */ transmission-remote-gtk-1.4.1/src/trg-status-bar.c000066400000000000000000000225731341276053300221510ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "trg-prefs.h" #include "trg-main-window.h" #include "trg-status-bar.h" #include "trg-torrent-model.h" #include "session-get.h" #include "requests.h" #include "json.h" #include "util.h" /* A subclass of GtkHBox which contains a status label on the left. * Free space indicator on left-right. * Speed (including limits if in use) label on right-right. * * Status and speed labels should be updated on every torrent-get using * trg_status_bar_update. Free space is updated with trg_status_bar_session_update. * * There's a signal in TrgClient for session updates, connected into the * main window, which calls this. Session updates happen every 10 torrent-get updates. */ G_DEFINE_TYPE(TrgStatusBar, trg_status_bar, GTK_TYPE_HBOX) #define TRG_STATUS_BAR_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_STATUS_BAR, TrgStatusBarPrivate)) typedef struct _TrgStatusBarPrivate TrgStatusBarPrivate; struct _TrgStatusBarPrivate { GtkWidget *speed_lbl; GtkWidget *turtleImage, *turtleEventBox; GtkWidget *free_lbl; GtkWidget *info_lbl; TrgClient *client; TrgMainWindow *win; }; static void trg_status_bar_class_init(TrgStatusBarClass * klass) { g_type_class_add_private(klass, sizeof(TrgStatusBarPrivate)); } void trg_status_bar_clear_indicators(TrgStatusBar * sb) { TrgStatusBarPrivate *priv = TRG_STATUS_BAR_GET_PRIVATE(sb); gtk_label_set_text(GTK_LABEL(priv->free_lbl), ""); gtk_label_set_text(GTK_LABEL(priv->speed_lbl), ""); } void trg_status_bar_reset(TrgStatusBar * sb) { TrgStatusBarPrivate *priv = TRG_STATUS_BAR_GET_PRIVATE(sb); trg_status_bar_clear_indicators(sb); gtk_label_set_text(GTK_LABEL(priv->info_lbl), _("Disconnected")); gtk_widget_set_visible(priv->turtleEventBox, FALSE); } static void turtle_toggle(GtkWidget * w, GdkEventButton * event, gpointer data) { TrgStatusBarPrivate *priv = TRG_STATUS_BAR_GET_PRIVATE(data); JsonNode *req = session_set(); JsonObject *args = node_get_arguments(req); gchar *stockName; gboolean altSpeedOn; gtk_image_get_stock(GTK_IMAGE(priv->turtleImage), &stockName, NULL); altSpeedOn = g_strcmp0(stockName, "alt-speed-on") == 0; gtk_image_set_from_stock(GTK_IMAGE(priv->turtleImage), altSpeedOn ? "alt-speed-off" : "alt-speed-on", GTK_ICON_SIZE_SMALL_TOOLBAR); json_object_set_boolean_member(args, SGET_ALT_SPEED_ENABLED, !altSpeedOn); dispatch_async(priv->client, req, on_session_set, priv->win); } static void trg_status_bar_init(TrgStatusBar * self) { TrgStatusBarPrivate *priv = TRG_STATUS_BAR_GET_PRIVATE(self); gtk_container_set_border_width(GTK_CONTAINER(self), 2); priv->info_lbl = gtk_label_new(_("Disconnected")); gtk_box_pack_start(GTK_BOX(self), priv->info_lbl, FALSE, TRUE, 0); priv->turtleImage = gtk_image_new(); priv->turtleEventBox = gtk_event_box_new(); g_signal_connect(priv->turtleEventBox, "button-press-event", G_CALLBACK(turtle_toggle), self); gtk_widget_set_visible(priv->turtleEventBox, FALSE); gtk_container_add(GTK_CONTAINER(priv->turtleEventBox), priv->turtleImage); gtk_box_pack_end(GTK_BOX(self), priv->turtleEventBox, FALSE, TRUE, 5); priv->speed_lbl = gtk_label_new(NULL); gtk_box_pack_end(GTK_BOX(self), priv->speed_lbl, FALSE, TRUE, 10); priv->free_lbl = gtk_label_new(NULL); gtk_box_pack_end(GTK_BOX(self), priv->free_lbl, FALSE, TRUE, 30); } void trg_status_bar_push_connection_msg(TrgStatusBar * sb, const gchar * msg) { TrgStatusBarPrivate *priv = TRG_STATUS_BAR_GET_PRIVATE(sb); gtk_label_set_text(GTK_LABEL(priv->info_lbl), msg); } static void trg_status_bar_set_connected_label(TrgStatusBar * sb, JsonObject * session, TrgClient * client) { TrgPrefs *prefs = trg_client_get_prefs(client); gchar *profileName = trg_prefs_get_string(prefs, TRG_PREFS_KEY_PROFILE_NAME, TRG_PREFS_CONNECTION); gchar *statusMsg = g_strdup_printf(_("Connected: %s :: Transmission %s"), profileName, session_get_version_string(session)); trg_status_bar_push_connection_msg(sb, statusMsg); g_free(profileName); g_free(statusMsg); } void trg_status_bar_connect(TrgStatusBar * sb, JsonObject * session, TrgClient * client) { TrgStatusBarPrivate *priv = TRG_STATUS_BAR_GET_PRIVATE(sb); trg_status_bar_set_connected_label(sb, session, client); gtk_label_set_text(GTK_LABEL(priv->speed_lbl), _("Updating torrents...")); } void trg_status_bar_session_update(TrgStatusBar * sb, JsonObject * session) { TrgStatusBarPrivate *priv = TRG_STATUS_BAR_GET_PRIVATE(sb); gint64 free = session_get_download_dir_free_space(session); gboolean altSpeedEnabled = session_get_alt_speed_enabled(session); gchar freeSpace[64]; if (free >= 0) { gchar *freeSpaceString; trg_strlsize(freeSpace, free); freeSpaceString = g_strdup_printf(_("Free space: %s"), freeSpace); gtk_label_set_text(GTK_LABEL(priv->free_lbl), freeSpaceString); g_free(freeSpaceString); } else { gtk_label_set_text(GTK_LABEL(priv->free_lbl), ""); } gtk_image_set_from_stock(GTK_IMAGE(priv->turtleImage), altSpeedEnabled ? "alt-speed-on" : "alt-speed-off", GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_widget_set_tooltip_text(priv->turtleImage, altSpeedEnabled ? _("Disable alternate speed limits") : _("Enable alternate speed limits")); gtk_widget_set_visible(priv->turtleEventBox, TRUE); } void trg_status_bar_update_speed(TrgStatusBar * sb, trg_torrent_model_update_stats * stats, TrgClient * client) { TrgStatusBarPrivate *priv = TRG_STATUS_BAR_GET_PRIVATE(sb); JsonObject *session = trg_client_get_session(client); gboolean altLimits = session_get_speed_limit_alt_enabled(session); gchar *speedText; gint64 uplimitraw, downlimitraw; gchar downRateTotalString[32], upRateTotalString[32]; gchar uplimit[64], downlimit[64]; if (altLimits) { downlimitraw = session_get_alt_speed_limit_down(session); uplimitraw = session_get_alt_speed_limit_up(session); } else { if (session_get_speed_limit_down_enabled(session)) downlimitraw = session_get_speed_limit_down(session); else downlimitraw = -1; if (session_get_speed_limit_up_enabled(session)) uplimitraw = session_get_speed_limit_up(session); else uplimitraw = -1; } trg_strlspeed(downRateTotalString, stats->downRateTotal / disk_K); trg_strlspeed(upRateTotalString, stats->upRateTotal / disk_K); if (uplimitraw >= 0) { gchar uplimitstring[32]; trg_strlspeed(uplimitstring, uplimitraw); g_snprintf(uplimit, sizeof(uplimit), _(" (Limit: %s)"), uplimitstring); } if (downlimitraw >= 0) { gchar downlimitstring[32]; trg_strlspeed(downlimitstring, downlimitraw); g_snprintf(downlimit, sizeof(downlimit), _(" (Limit: %s)"), downlimitstring); } speedText = g_strdup_printf(_("Down: %s%s, Up: %s%s"), downRateTotalString, downlimitraw >= 0 ? downlimit : "", upRateTotalString, uplimitraw >= 0 ? uplimit : ""); gtk_label_set_text(GTK_LABEL(priv->speed_lbl), speedText); g_free(speedText); } void trg_status_bar_update(TrgStatusBar * sb, trg_torrent_model_update_stats * stats, TrgClient * client) { trg_status_bar_set_connected_label(sb, trg_client_get_session(client), client); trg_status_bar_update_speed(sb, stats, client); } const gchar *trg_status_bar_get_speed_text(TrgStatusBar * s) { TrgStatusBarPrivate *priv = TRG_STATUS_BAR_GET_PRIVATE(s); return gtk_label_get_text(GTK_LABEL(priv->speed_lbl)); } TrgStatusBar *trg_status_bar_new(TrgMainWindow * win, TrgClient * client) { TrgStatusBar *sb = g_object_new(TRG_TYPE_STATUS_BAR, NULL); TrgStatusBarPrivate *priv = TRG_STATUS_BAR_GET_PRIVATE(sb); priv->client = client; priv->win = win; return sb; } transmission-remote-gtk-1.4.1/src/trg-status-bar.h000066400000000000000000000052531341276053300221520ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_STATUS_BAR_H_ #define TRG_STATUS_BAR_H_ #include #include #include "trg-torrent-model.h" G_BEGIN_DECLS #define TRG_TYPE_STATUS_BAR trg_status_bar_get_type() #define TRG_STATUS_BAR(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_STATUS_BAR, TrgStatusBar)) #define TRG_STATUS_BAR_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_STATUS_BAR, TrgStatusBarClass)) #define TRG_IS_STATUS_BAR(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_STATUS_BAR)) #define TRG_IS_STATUS_BAR_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_STATUS_BAR)) #define TRG_STATUS_BAR_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_STATUS_BAR, TrgStatusBarClass)) typedef struct { GtkHBox parent; } TrgStatusBar; typedef struct { GtkHBoxClass parent_class; } TrgStatusBarClass; GType trg_status_bar_get_type(void); TrgStatusBar *trg_status_bar_new(TrgMainWindow * win, TrgClient * client); G_END_DECLS void trg_status_bar_update(TrgStatusBar * sb, trg_torrent_model_update_stats * stats, TrgClient * client); void trg_status_bar_session_update(TrgStatusBar * sb, JsonObject * session); void trg_status_bar_connect(TrgStatusBar * sb, JsonObject * session, TrgClient * client); void trg_status_bar_push_connection_msg(TrgStatusBar * sb, const gchar * msg); void trg_status_bar_reset(TrgStatusBar * sb); void trg_status_bar_clear_indicators(TrgStatusBar * sb); const gchar *trg_status_bar_get_speed_text(TrgStatusBar * s); void trg_status_bar_update_speed(TrgStatusBar * sb, trg_torrent_model_update_stats * stats, TrgClient * client); #endif /* TRG_STATUS_BAR_H_ */ transmission-remote-gtk-1.4.1/src/trg-toolbar.c000066400000000000000000000332431341276053300215220ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-prefs.h" #include "trg-main-window.h" #include "trg-toolbar.h" #include "trg-menu-bar.h" enum { PROP_0, PROP_CONNECT_BUTTON, PROP_DISCONNECT_BUTTON, PROP_ADD_BUTTON, PROP_ADD_URL_BUTTON, PROP_REMOVE_BUTTON, PROP_DELETE_BUTTON, PROP_RESUME_BUTTON, PROP_PAUSE_BUTTON, /*PROP_VERIFY_BUTTON, */ PROP_PROPS_BUTTON, PROP_REMOTE_PREFS_BUTTON, PROP_LOCAL_PREFS_BUTTON, PROP_PREFS, PROP_MAIN_WINDOW }; G_DEFINE_TYPE(TrgToolbar, trg_toolbar, GTK_TYPE_TOOLBAR) #define TRG_TOOLBAR_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_TOOLBAR, TrgToolbarPrivate)) typedef struct _TrgToolbarPrivate TrgToolbarPrivate; struct _TrgToolbarPrivate { GtkWidget *tb_connect; GtkWidget *tb_disconnect; GtkWidget *tb_add; GtkWidget *tb_remove; GtkWidget *tb_delete; GtkWidget *tb_resume; GtkWidget *tb_pause; GtkWidget *tb_props; GtkWidget *tb_remote_prefs; GtkWidget *tb_local_prefs; TrgPrefs *prefs; TrgMainWindow *main_window; }; static void trg_toolbar_set_property(GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec G_GNUC_UNUSED) { TrgToolbarPrivate *priv = TRG_TOOLBAR_GET_PRIVATE(object); switch (prop_id) { case PROP_PREFS: priv->prefs = g_value_get_pointer(value); break; case PROP_MAIN_WINDOW: priv->main_window = g_value_get_object(value); break; } } static void trg_toolbar_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgToolbarPrivate *priv = TRG_TOOLBAR_GET_PRIVATE(object); switch (property_id) { case PROP_CONNECT_BUTTON: g_value_set_object(value, priv->tb_connect); break; case PROP_DISCONNECT_BUTTON: g_value_set_object(value, priv->tb_disconnect); break; case PROP_ADD_BUTTON: g_value_set_object(value, priv->tb_add); break; case PROP_REMOVE_BUTTON: g_value_set_object(value, priv->tb_remove); break; case PROP_DELETE_BUTTON: g_value_set_object(value, priv->tb_delete); break; case PROP_RESUME_BUTTON: g_value_set_object(value, priv->tb_resume); break; case PROP_PAUSE_BUTTON: g_value_set_object(value, priv->tb_pause); break; case PROP_PROPS_BUTTON: g_value_set_object(value, priv->tb_props); break; case PROP_REMOTE_PREFS_BUTTON: g_value_set_object(value, priv->tb_remote_prefs); break; case PROP_LOCAL_PREFS_BUTTON: g_value_set_object(value, priv->tb_local_prefs); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_toolbar_install_widget_prop(GObjectClass * class, guint propId, const gchar * name, const gchar * nick) { g_object_class_install_property(class, propId, g_param_spec_object(name, nick, nick, GTK_TYPE_WIDGET, G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } static GtkWidget *trg_toolbar_item_new(TrgToolbar * toolbar, gchar * text, int *index, gchar * icon, gboolean sensitive) { GtkToolItem *w = gtk_tool_button_new_from_stock(icon); gtk_widget_set_sensitive(GTK_WIDGET(w), sensitive); gtk_tool_item_set_tooltip_text(w, text); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), w, (*index)++); return GTK_WIDGET(w); } static void trg_toolbar_refresh_menu(GtkWidget * w, gpointer data) { TrgToolbarPrivate *priv = TRG_TOOLBAR_GET_PRIVATE(data); GtkWidget *old = gtk_menu_tool_button_get_menu(GTK_MENU_TOOL_BUTTON (priv->tb_connect)); GtkWidget *new = trg_menu_bar_file_connect_menu_new(priv->main_window, priv->prefs); gtk_widget_destroy(old); gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(priv->tb_connect), new); gtk_widget_show_all(new); } static GObject *trg_toolbar_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *obj = G_OBJECT_CLASS(trg_toolbar_parent_class)->constructor(type, n_construct_properties, construct_params); TrgToolbarPrivate *priv = TRG_TOOLBAR_GET_PRIVATE(obj); GtkToolItem *separator; GtkWidget *menu; int position = 0; gtk_toolbar_set_icon_size(GTK_TOOLBAR(obj), GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_toolbar_set_style(GTK_TOOLBAR(obj), GTK_TOOLBAR_BOTH_HORIZ); priv->tb_connect = GTK_WIDGET(gtk_menu_tool_button_new_from_stock(GTK_STOCK_CONNECT)); gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(priv->tb_connect), _("Connect")); gtk_tool_item_set_is_important (GTK_TOOL_ITEM (priv->tb_connect), TRUE); menu = trg_menu_bar_file_connect_menu_new(priv->main_window, priv->prefs); gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(priv->tb_connect), menu); gtk_toolbar_insert(GTK_TOOLBAR(obj), GTK_TOOL_ITEM(priv->tb_connect), position++); gtk_widget_show_all(menu); priv->tb_disconnect = trg_toolbar_item_new(TRG_TOOLBAR(obj), _("Disconnect"), &position, GTK_STOCK_DISCONNECT, FALSE); priv->tb_add = trg_toolbar_item_new(TRG_TOOLBAR(obj), _("Add"), &position, GTK_STOCK_ADD, FALSE); separator = gtk_separator_tool_item_new(); gtk_toolbar_insert(GTK_TOOLBAR(obj), separator, position++); priv->tb_resume = trg_toolbar_item_new(TRG_TOOLBAR(obj), _("Resume"), &position, GTK_STOCK_MEDIA_PLAY, FALSE); priv->tb_pause = trg_toolbar_item_new(TRG_TOOLBAR(obj), _("Pause"), &position, GTK_STOCK_MEDIA_PAUSE, FALSE); priv->tb_props = trg_toolbar_item_new(TRG_TOOLBAR(obj), _("Properties"), &position, GTK_STOCK_PROPERTIES, FALSE); priv->tb_remove = trg_toolbar_item_new(TRG_TOOLBAR(obj), _("Remove"), &position, GTK_STOCK_REMOVE, FALSE); priv->tb_delete = trg_toolbar_item_new(TRG_TOOLBAR(obj), _("Remove and delete data"), &position, GTK_STOCK_DELETE, FALSE); separator = gtk_separator_tool_item_new(); gtk_toolbar_insert(GTK_TOOLBAR(obj), separator, position++); priv->tb_local_prefs = trg_toolbar_item_new(TRG_TOOLBAR(obj), _("Local Preferences"), &position, GTK_STOCK_PREFERENCES, TRUE); priv->tb_remote_prefs = trg_toolbar_item_new(TRG_TOOLBAR(obj), _("Remote Preferences"), &position, GTK_STOCK_NETWORK, FALSE); g_signal_connect(G_OBJECT(priv->prefs), "pref-profile-changed", G_CALLBACK(trg_toolbar_refresh_menu), obj); return obj; } static void trg_toolbar_class_init(TrgToolbarClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = trg_toolbar_get_property; object_class->set_property = trg_toolbar_set_property; object_class->constructor = trg_toolbar_constructor; g_object_class_install_property(object_class, PROP_PREFS, g_param_spec_pointer("prefs", "Prefs", "Prefs", G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_MAIN_WINDOW, g_param_spec_object("mainwindow", "mainwindow", "mainwindow", TRG_TYPE_MAIN_WINDOW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); trg_toolbar_install_widget_prop(object_class, PROP_CONNECT_BUTTON, "connect-button", "Connect Button"); trg_toolbar_install_widget_prop(object_class, PROP_DISCONNECT_BUTTON, "disconnect-button", "Disconnect Button"); trg_toolbar_install_widget_prop(object_class, PROP_ADD_BUTTON, "add-button", "Add Button"); trg_toolbar_install_widget_prop(object_class, PROP_ADD_URL_BUTTON, "add-url-button", "Add URL Button"); trg_toolbar_install_widget_prop(object_class, PROP_REMOVE_BUTTON, "remove-button", "Remove Button"); trg_toolbar_install_widget_prop(object_class, PROP_DELETE_BUTTON, "delete-button", "Delete Button"); trg_toolbar_install_widget_prop(object_class, PROP_RESUME_BUTTON, "resume-button", "Resume Button"); trg_toolbar_install_widget_prop(object_class, PROP_PAUSE_BUTTON, "pause-button", "Pause Button"); trg_toolbar_install_widget_prop(object_class, PROP_PROPS_BUTTON, "props-button", "Props Button"); trg_toolbar_install_widget_prop(object_class, PROP_REMOTE_PREFS_BUTTON, "remote-prefs-button", "Remote Prefs Button"); trg_toolbar_install_widget_prop(object_class, PROP_LOCAL_PREFS_BUTTON, "local-prefs-button", "Local Prefs Button"); g_type_class_add_private(klass, sizeof(TrgToolbarPrivate)); } void trg_toolbar_connected_change(TrgToolbar * tb, gboolean connected) { TrgToolbarPrivate *priv = TRG_TOOLBAR_GET_PRIVATE(tb); gtk_widget_set_sensitive(priv->tb_add, connected); gtk_widget_set_sensitive(priv->tb_disconnect, connected); gtk_widget_set_sensitive(priv->tb_remote_prefs, connected); } void trg_toolbar_torrent_actions_sensitive(TrgToolbar * tb, gboolean sensitive) { TrgToolbarPrivate *priv = TRG_TOOLBAR_GET_PRIVATE(tb); gtk_widget_set_sensitive(priv->tb_props, sensitive); gtk_widget_set_sensitive(priv->tb_remove, sensitive); gtk_widget_set_sensitive(priv->tb_delete, sensitive); gtk_widget_set_sensitive(priv->tb_resume, sensitive); gtk_widget_set_sensitive(priv->tb_pause, sensitive); } static void trg_toolbar_init(TrgToolbar * self) { } TrgToolbar *trg_toolbar_new(TrgMainWindow * win, TrgPrefs * prefs) { return g_object_new(TRG_TYPE_TOOLBAR, "prefs", prefs, "mainwindow", win, NULL); } transmission-remote-gtk-1.4.1/src/trg-toolbar.h000066400000000000000000000037601341276053300215300ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_TOOLBAR_H_ #define TRG_TOOLBAR_H_ #include #include #include "trg-prefs.h" #include "trg-main-window.h" G_BEGIN_DECLS #define TRG_TYPE_TOOLBAR trg_toolbar_get_type() #define TRG_TOOLBAR(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_TOOLBAR, TrgToolbar)) #define TRG_TOOLBAR_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_TOOLBAR, TrgToolbarClass)) #define TRG_IS_TOOLBAR(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_TOOLBAR)) #define TRG_IS_TOOLBAR_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_TOOLBAR)) #define TRG_TOOLBAR_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_TOOLBAR, TrgToolbarClass)) typedef struct { GtkToolbar parent; } TrgToolbar; typedef struct { GtkToolbarClass parent_class; } TrgToolbarClass; GType trg_toolbar_get_type(void); TrgToolbar *trg_toolbar_new(TrgMainWindow * win, TrgPrefs * prefs); G_END_DECLS void trg_toolbar_torrent_actions_sensitive(TrgToolbar * mb, gboolean sensitive); void trg_toolbar_connected_change(TrgToolbar * tb, gboolean connected); #endif /* TRG_TOOLBAR_H_ */ transmission-remote-gtk-1.4.1/src/trg-torrent-add-dialog.c000066400000000000000000001073461341276053300235460ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* Most of the UI code was taken from open-dialog.c and files-list.c * in Transmission, adapted to fit in with different torrent file parser * and JSON dispatch. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "hig.h" #include "util.h" #include "trg-client.h" #include "trg-main-window.h" #include "trg-file-parser.h" #include "trg-torrent-add-dialog.h" #include "trg-files-tree-view-common.h" #include "trg-files-model-common.h" #include "trg-cell-renderer-size.h" #include "trg-cell-renderer-priority.h" #include "trg-cell-renderer-file-icon.h" #include "trg-cell-renderer-wanted.h" #include "trg-destination-combo.h" #include "trg-prefs.h" #include "requests.h" #include "torrent.h" #include "json.h" #include "protocol-constants.h" #include "upload.h" enum { PROP_0, PROP_FILENAME, PROP_PARENT, PROP_CLIENT, PROP_UPLOAD }; enum { FC_INDEX, FC_LABEL, FC_SIZE, FC_PRIORITY, FC_ENABLED, N_FILE_COLS }; G_DEFINE_TYPE(TrgTorrentAddDialog, trg_torrent_add_dialog, GTK_TYPE_DIALOG) #define TRG_TORRENT_ADD_DIALOG_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_TORRENT_ADD_DIALOG, TrgTorrentAddDialogPrivate)) typedef struct _TrgTorrentAddDialogPrivate TrgTorrentAddDialogPrivate; struct _TrgTorrentAddDialogPrivate { TrgClient *client; TrgMainWindow *parent; GSList *filenames; trg_upload *upload; GtkWidget *source_chooser; GtkWidget *dest_combo; GtkWidget *priority_combo; GtkWidget *file_list; GtkTreeStore *store; GtkWidget *paused_check; GtkWidget *delete_check; guint n_files; }; #define MAGNET_MAX_LINK_WIDTH 75 static void trg_torrent_add_dialog_set_property(GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec G_GNUC_UNUSED) { TrgTorrentAddDialogPrivate *priv = TRG_TORRENT_ADD_DIALOG_GET_PRIVATE(object); switch (prop_id) { case PROP_FILENAME: priv->filenames = g_value_get_pointer(value); break; case PROP_PARENT: priv->parent = g_value_get_object(value); break; case PROP_UPLOAD: priv->upload = g_value_get_pointer(value); break; case PROP_CLIENT: priv->client = g_value_get_pointer(value); break; } } static void trg_torrent_add_dialog_get_property(GObject * object, guint prop_id, GValue * value, GParamSpec * pspec G_GNUC_UNUSED) { TrgTorrentAddDialogPrivate *priv = TRG_TORRENT_ADD_DIALOG_GET_PRIVATE(object); switch (prop_id) { case PROP_FILENAME: g_value_set_pointer(value, priv->filenames); break; case PROP_PARENT: g_value_set_object(value, priv->parent); break; } } static gboolean add_file_indexes_foreachfunc(GtkTreeModel * model, GtkTreePath * path G_GNUC_UNUSED, GtkTreeIter * iter, gpointer data) { trg_upload *upload = (trg_upload *) data; gint priority, index, wanted; gtk_tree_model_get(model, iter, FC_PRIORITY, &priority, FC_ENABLED, &wanted, FC_INDEX, &index, -1); if (gtk_tree_model_iter_has_child(model, iter) || index < 0) return FALSE; upload->file_wanted[index] = wanted; upload->file_priorities[index] = priority; return FALSE; } static void trg_torrent_add_response_cb(GtkDialog * dlg, gint res_id, gpointer data) { TrgTorrentAddDialogPrivate *priv = TRG_TORRENT_ADD_DIALOG_GET_PRIVATE(dlg); guint flags = 0x00; if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(priv->paused_check))) flags |= TORRENT_ADD_FLAG_PAUSED; if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(priv->delete_check))) flags |= TORRENT_ADD_FLAG_DELETE; if (res_id == GTK_RESPONSE_ACCEPT) { gint priority = gtk_combo_box_get_active(GTK_COMBO_BOX(priv->priority_combo)) - 1; gchar *dir = trg_destination_combo_get_dir(TRG_DESTINATION_COMBO (priv->dest_combo)); trg_upload *upload; if (priv->upload) { upload = priv->upload; } else { upload = g_new0(trg_upload, 1); upload->list = priv->filenames; } upload->main_window = priv->parent; upload->client = priv->client; upload->dir = dir; upload->priority = priority; upload->flags = flags; upload->extra_args = TRUE; upload->n_files = priv->n_files; upload->file_priorities = g_new0(gint, priv->n_files); upload->file_wanted = g_new0(gint, priv->n_files); gtk_tree_model_foreach(GTK_TREE_MODEL(priv->store), add_file_indexes_foreachfunc, upload); trg_do_upload(upload); trg_destination_combo_save_selection(TRG_DESTINATION_COMBO (priv->dest_combo)); } else { g_str_slist_free(priv->filenames); } gtk_widget_destroy(GTK_WIDGET(dlg)); } static void set_low(GtkWidget * w G_GNUC_UNUSED, gpointer data) { trg_files_tree_model_set_priority(GTK_TREE_VIEW(data), FC_PRIORITY, TR_PRI_LOW); } static void set_normal(GtkWidget * w G_GNUC_UNUSED, gpointer data) { trg_files_tree_model_set_priority(GTK_TREE_VIEW(data), FC_PRIORITY, TR_PRI_NORMAL); } static void set_high(GtkWidget * w G_GNUC_UNUSED, gpointer data) { trg_files_tree_model_set_priority(GTK_TREE_VIEW(data), FC_PRIORITY, TR_PRI_HIGH); } static void set_unwanted(GtkWidget * w G_GNUC_UNUSED, gpointer data) { trg_files_model_set_wanted(GTK_TREE_VIEW(data), FC_ENABLED, FALSE); } static void set_wanted(GtkWidget * w G_GNUC_UNUSED, gpointer data) { trg_files_model_set_wanted(GTK_TREE_VIEW(data), FC_ENABLED, TRUE); } static gboolean onViewButtonPressed(GtkWidget * w, GdkEventButton * event, gpointer gdata) { return trg_files_tree_view_onViewButtonPressed(w, event, FC_PRIORITY, FC_ENABLED, G_CALLBACK(set_low), G_CALLBACK(set_normal), G_CALLBACK(set_high), G_CALLBACK(set_wanted), G_CALLBACK (set_unwanted), gdata); } static GtkWidget *gtr_file_list_new(GtkTreeStore ** store) { int size; int width; GtkWidget *view; GtkWidget *scroll; GtkCellRenderer *rend; GtkTreeSelection *sel; GtkTreeViewColumn *col; GtkTreeView *tree_view; const char *title; PangoLayout *pango_layout; PangoContext *pango_context; PangoFontDescription *pango_font_description; /* create the view */ view = gtk_tree_view_new(); tree_view = GTK_TREE_VIEW(view); gtk_container_set_border_width(GTK_CONTAINER(view), GUI_PAD_BIG); g_signal_connect(view, "button-press-event", G_CALLBACK(onViewButtonPressed), view); pango_context = gtk_widget_create_pango_context(view); pango_font_description = pango_font_description_copy(pango_context_get_font_description (pango_context)); size = pango_font_description_get_size(pango_font_description); pango_font_description_set_size(pango_font_description, size * 0.8); g_object_unref(G_OBJECT(pango_context)); /* set up view */ sel = gtk_tree_view_get_selection(tree_view); gtk_tree_selection_set_mode(sel, GTK_SELECTION_MULTIPLE); gtk_tree_view_expand_all(tree_view); gtk_tree_view_set_search_column(tree_view, FC_LABEL); /* add file column */ col = GTK_TREE_VIEW_COLUMN(g_object_new(GTK_TYPE_TREE_VIEW_COLUMN, "expand", TRUE, "title", _("Name"), NULL)); gtk_tree_view_column_set_resizable(col, TRUE); rend = trg_cell_renderer_file_icon_new(); gtk_tree_view_column_pack_start(col, rend, FALSE); gtk_tree_view_column_set_attributes(col, rend, "file-name", FC_LABEL, "file-id", FC_INDEX, NULL); /* add text renderer */ rend = gtk_cell_renderer_text_new(); g_object_set(rend, "ellipsize", PANGO_ELLIPSIZE_END, "font-desc", pango_font_description, NULL); gtk_tree_view_column_pack_start(col, rend, TRUE); gtk_tree_view_column_set_attributes(col, rend, "text", FC_LABEL, NULL); gtk_tree_view_column_set_sort_column_id(col, FC_LABEL); gtk_tree_view_append_column(tree_view, col); /* add "size" column */ title = _("Size"); rend = trg_cell_renderer_size_new(); g_object_set(rend, "alignment", PANGO_ALIGN_RIGHT, "font-desc", pango_font_description, "xpad", GUI_PAD, "xalign", 1.0f, "yalign", 0.5f, NULL); col = gtk_tree_view_column_new_with_attributes(title, rend, NULL); gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_GROW_ONLY); gtk_tree_view_column_set_sort_column_id(col, FC_SIZE); gtk_tree_view_column_set_attributes(col, rend, "size-value", FC_SIZE, NULL); gtk_tree_view_append_column(tree_view, col); /* add "enabled" column */ title = _("Download"); pango_layout = gtk_widget_create_pango_layout(view, title); pango_layout_get_pixel_size(pango_layout, &width, NULL); width += 30; /* room for the sort indicator */ g_object_unref(G_OBJECT(pango_layout)); rend = trg_cell_renderer_wanted_new(); col = gtk_tree_view_column_new_with_attributes(title, rend, "wanted-value", FC_ENABLED, NULL); gtk_tree_view_column_set_fixed_width(col, width); gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_sort_column_id(col, FC_ENABLED); gtk_tree_view_append_column(tree_view, col); /* add priority column */ title = _("Priority"); pango_layout = gtk_widget_create_pango_layout(view, title); pango_layout_get_pixel_size(pango_layout, &width, NULL); width += 30; /* room for the sort indicator */ g_object_unref(G_OBJECT(pango_layout)); rend = trg_cell_renderer_priority_new(); col = gtk_tree_view_column_new_with_attributes(title, rend, "priority-value", FC_PRIORITY, NULL); gtk_tree_view_column_set_fixed_width(col, width); gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_sort_column_id(col, FC_PRIORITY); gtk_tree_view_append_column(tree_view, col); *store = gtk_tree_store_new(N_FILE_COLS, G_TYPE_INT, /* index */ G_TYPE_STRING, /* label */ G_TYPE_INT64, /* size */ G_TYPE_INT, /* priority */ G_TYPE_INT); /* dl enabled */ gtk_tree_view_set_model(tree_view, GTK_TREE_MODEL(*store)); g_object_unref(G_OBJECT(*store)); /* create the scrolled window and stick the view in it */ scroll = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scroll), GTK_SHADOW_IN); gtk_container_add(GTK_CONTAINER(scroll), view); gtk_widget_set_size_request(scroll, -1, 200); pango_font_description_free(pango_font_description); return scroll; } static GtkWidget *gtr_dialog_get_content_area(GtkDialog * dialog) { return gtk_dialog_get_content_area(dialog); } static void gtr_dialog_set_content(GtkDialog * dialog, GtkWidget * content) { GtkWidget *vbox = gtr_dialog_get_content_area(dialog); gtk_box_pack_start(GTK_BOX(vbox), content, TRUE, TRUE, 0); gtk_widget_show_all(content); } static GtkWidget *gtr_priority_combo_new(void) { return gtr_combo_box_new_enum(_("Low"), TR_PRI_LOW, _("Normal"), TR_PRI_NORMAL, _("High"), TR_PRI_HIGH, NULL); } static void addTorrentFilters(GtkFileChooser * chooser) { GtkFileFilter *filter; filter = gtk_file_filter_new(); gtk_file_filter_set_name(filter, _("Torrent files")); gtk_file_filter_add_pattern(filter, "*.torrent"); gtk_file_chooser_add_filter(chooser, filter); filter = gtk_file_filter_new(); gtk_file_filter_set_name(filter, _("All files")); gtk_file_filter_add_pattern(filter, "*"); gtk_file_chooser_add_filter(chooser, filter); } static void store_add_node(GtkTreeStore * store, GtkTreeIter * parent, trg_files_tree_node * node, guint *n_files) { GtkTreeIter child; GList *li; if (node->name) { gtk_tree_store_append(store, &child, parent); gtk_tree_store_set(store, &child, FC_LABEL, node->name, FC_ENABLED, 1, FC_INDEX, node->index, FC_PRIORITY, TR_PRI_NORMAL, FC_SIZE, node->length, -1); if (!node->children) *n_files = *n_files + 1; } for (li = node->children; li; li = g_list_next(li)) store_add_node(store, node->name ? &child : NULL, (trg_files_tree_node *) li->data, n_files); } static void torrent_not_parsed_warning(GtkWindow * parent) { GtkWidget *dialog = gtk_message_dialog_new(parent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, _ ("Unable to parse torrent file. File preferences unavailable, but you can still try uploading it.")); gtk_window_set_transient_for(GTK_WINDOW(dialog), parent); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } static void torrent_not_found_error(GtkWindow * parent, gchar * file) { GtkWidget *dialog = gtk_message_dialog_new(parent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _ ("Unable to open torrent file: %s"), file); gtk_window_set_transient_for(GTK_WINDOW(dialog), parent); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } static void trg_torrent_add_dialog_set_upload(TrgTorrentAddDialog *d, trg_upload *upload) { TrgTorrentAddDialogPrivate *priv = TRG_TORRENT_ADD_DIALOG_GET_PRIVATE(d); GtkButton *chooser = GTK_BUTTON(priv->source_chooser); trg_torrent_file *tor_data = NULL; if (upload->uid) gtk_button_set_label(chooser, upload->uid); tor_data = trg_parse_torrent_data(upload->upload_response->raw, upload->upload_response->size); if (!tor_data) { torrent_not_parsed_warning(GTK_WINDOW(priv->parent)); } else { store_add_node(priv->store, NULL, tor_data->top_node, &priv->n_files); trg_torrent_file_free(tor_data); } gtk_widget_set_sensitive(priv->file_list, tor_data != NULL); } static void trg_torrent_add_dialog_set_filenames(TrgTorrentAddDialog * d, GSList * filenames) { TrgTorrentAddDialogPrivate *priv = TRG_TORRENT_ADD_DIALOG_GET_PRIVATE(d); GtkButton *chooser = GTK_BUTTON(priv->source_chooser); gint nfiles = filenames ? g_slist_length(filenames) : 0; gtk_tree_store_clear(priv->store); if (priv->upload) { trg_upload_free(priv->upload); priv->upload = NULL; } if (nfiles == 1) { gchar *file_name = (gchar *) filenames->data; if (is_url(file_name) || is_magnet(file_name)) { if (strlen(file_name) > MAGNET_MAX_LINK_WIDTH) { gchar *file_name_trunc = g_strndup(file_name, MAGNET_MAX_LINK_WIDTH); gchar *file_name_trunc_fmt = g_strdup_printf("%s ...", file_name_trunc); gtk_button_set_label(chooser, file_name_trunc_fmt); g_free(file_name_trunc); g_free(file_name_trunc_fmt); } else { gtk_button_set_label(chooser, file_name); } gtk_widget_set_sensitive(priv->file_list, FALSE); gtk_widget_set_sensitive(priv->delete_check, FALSE); } else { gchar *file_name_base; trg_torrent_file *tor_data = NULL; file_name_base = g_path_get_basename(file_name); if (file_name_base) { gtk_button_set_label(chooser, file_name_base); g_free(file_name_base); } else { gtk_button_set_label(chooser, file_name); } if (g_file_test(file_name, G_FILE_TEST_IS_REGULAR)) { tor_data = trg_parse_torrent_file(file_name); if (!tor_data) { torrent_not_parsed_warning(GTK_WINDOW(priv->parent)); } else { store_add_node(priv->store, NULL, tor_data->top_node, &priv->n_files); trg_torrent_file_free(tor_data); } } else { torrent_not_found_error(GTK_WINDOW(priv->parent), file_name); } gtk_widget_set_sensitive(priv->file_list, tor_data != NULL); } } else { gtk_widget_set_sensitive(priv->file_list, FALSE); if (nfiles < 1) { gtk_button_set_label(chooser, _("(None)")); } else { gtk_button_set_label(chooser, _("(Multiple)")); } } priv->filenames = filenames; } static void trg_torrent_add_dialog_generic_save_dir(GtkFileChooser * c, TrgPrefs * prefs) { gchar *cwd = gtk_file_chooser_get_current_folder(c); if (cwd) { trg_prefs_set_string(prefs, TRG_PREFS_KEY_LAST_TORRENT_DIR, cwd, TRG_PREFS_GLOBAL); g_free(cwd); } } static GtkWidget *trg_torrent_add_dialog_generic(GtkWindow * parent, TrgPrefs * prefs) { GtkWidget *w = gtk_file_chooser_dialog_new(_("Add a Torrent"), parent, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_ADD, GTK_RESPONSE_ACCEPT, NULL); gchar *dir = trg_prefs_get_string(prefs, TRG_PREFS_KEY_LAST_TORRENT_DIR, TRG_PREFS_GLOBAL); if (dir) { gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(w), dir); g_free(dir); } addTorrentFilters(GTK_FILE_CHOOSER(w)); gtk_dialog_set_alternative_button_order(GTK_DIALOG(w), GTK_RESPONSE_ACCEPT, GTK_RESPONSE_CANCEL, -1); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(w), TRUE); return w; } static void trg_torrent_add_dialog_source_click_cb(GtkWidget * w, gpointer data) { TrgTorrentAddDialogPrivate *priv = TRG_TORRENT_ADD_DIALOG_GET_PRIVATE(data); GtkWidget *d = trg_torrent_add_dialog_generic(GTK_WINDOW(data), trg_client_get_prefs (priv->client)); if (gtk_dialog_run(GTK_DIALOG(d)) == GTK_RESPONSE_ACCEPT) { if (priv->filenames) g_str_slist_free(priv->filenames); priv->filenames = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(d)); trg_torrent_add_dialog_generic_save_dir(GTK_FILE_CHOOSER(d), trg_client_get_prefs (priv->client)); trg_torrent_add_dialog_set_filenames(TRG_TORRENT_ADD_DIALOG(data), priv->filenames); } gtk_widget_destroy(GTK_WIDGET(d)); } static gboolean apply_all_changed_foreachfunc(GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data) { GtkComboBox *combo = GTK_COMBO_BOX(data); GtkTreeModel *combo_model = gtk_combo_box_get_model(combo); GtkTreeIter selection_iter; if (gtk_combo_box_get_active_iter(combo, &selection_iter)) { gint column; gint value; GValue gvalue = { 0 }; g_value_init(&gvalue, G_TYPE_INT); gtk_tree_model_get(combo_model, &selection_iter, 2, &column, 3, &value, -1); g_value_set_int(&gvalue, value); gtk_tree_store_set_value(GTK_TREE_STORE(model), iter, column, &gvalue); } return FALSE; } static void trg_torrent_add_dialog_apply_all_changed_cb(GtkWidget * w, gpointer data) { TrgTorrentAddDialogPrivate *priv = TRG_TORRENT_ADD_DIALOG_GET_PRIVATE(data); GtkWidget *tv = gtk_bin_get_child(GTK_BIN(priv->file_list)); GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); gtk_tree_model_foreach(model, apply_all_changed_foreachfunc, w); gtk_combo_box_set_active(GTK_COMBO_BOX(w), -1); } static GtkWidget * trg_torrent_add_dialog_apply_all_combo_new(TrgTorrentAddDialog * dialog) { GtkListStore *model = gtk_list_store_new(4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INT); GtkWidget *combo = gtk_combo_box_new(); GtkTreeIter iter; GtkCellRenderer *renderer; gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 1, _("High Priority"), 2, FC_PRIORITY, 3, TR_PRI_HIGH, -1); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 1, _("Normal Priority"), 2, FC_PRIORITY, 3, TR_PRI_NORMAL, -1); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 1, _("Low Priority"), 2, FC_PRIORITY, 3, TR_PRI_LOW, -1); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, GTK_STOCK_APPLY, 1, _("Download"), 2, FC_ENABLED, 3, TRUE, -1); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, GTK_STOCK_CANCEL, 1, _("Skip"), 2, FC_ENABLED, 3, FALSE, -1); renderer = gtk_cell_renderer_pixbuf_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), renderer, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(combo), renderer, "stock-id", 0); renderer = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), renderer, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(combo), renderer, "text", 1); gtk_combo_box_set_model(GTK_COMBO_BOX(combo), GTK_TREE_MODEL(model)); g_signal_connect(combo, "changed", G_CALLBACK (trg_torrent_add_dialog_apply_all_changed_cb), dialog); return combo; } static GObject *trg_torrent_add_dialog_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *obj = G_OBJECT_CLASS (trg_torrent_add_dialog_parent_class)->constructor(type, n_construct_properties, construct_params); TrgTorrentAddDialogPrivate *priv = TRG_TORRENT_ADD_DIALOG_GET_PRIVATE(obj); TrgPrefs *prefs = trg_client_get_prefs(priv->client); GtkWidget *t, *applyall_combo; guint row = 0; /* window */ gtk_window_set_title(GTK_WINDOW(obj), _("Add Torrent")); gtk_window_set_transient_for(GTK_WINDOW(obj), GTK_WINDOW(priv->parent)); gtk_window_set_destroy_with_parent(GTK_WINDOW(obj), TRUE); /* buttons */ gtk_dialog_add_button(GTK_DIALOG(obj), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); gtk_dialog_add_button(GTK_DIALOG(obj), GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT); gtk_dialog_set_alternative_button_order(GTK_DIALOG(obj), GTK_RESPONSE_ACCEPT, GTK_RESPONSE_CANCEL, -1); gtk_dialog_set_default_response(GTK_DIALOG(obj), GTK_RESPONSE_ACCEPT); /* workspace */ t = hig_workarea_create(); //gtk_container_set_border_width(GTK_CONTAINER(t), GUI_PAD_BIG); priv->file_list = gtr_file_list_new(&priv->store); gtk_widget_set_sensitive(priv->file_list, FALSE); priv->paused_check = gtk_check_button_new_with_mnemonic(_("Start _paused")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->paused_check), trg_prefs_get_bool(prefs, TRG_PREFS_KEY_START_PAUSED, TRG_PREFS_GLOBAL)); priv->delete_check = gtk_check_button_new_with_mnemonic(_ ("Delete local .torrent file after adding")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->delete_check), trg_prefs_get_bool(prefs, TRG_PREFS_KEY_DELETE_LOCAL_TORRENT, TRG_PREFS_GLOBAL)); priv->priority_combo = gtr_priority_combo_new(); gtk_combo_box_set_active(GTK_COMBO_BOX(priv->priority_combo), 1); priv->source_chooser = gtk_button_new(); hig_workarea_add_row(t, &row, _("_Torrent file:"), priv->source_chooser, NULL); gtk_button_set_alignment(GTK_BUTTON(priv->source_chooser), 0.0f, 0.5f); if (priv->filenames) trg_torrent_add_dialog_set_filenames(TRG_TORRENT_ADD_DIALOG(obj), priv->filenames); else if (priv->upload) trg_torrent_add_dialog_set_upload(TRG_TORRENT_ADD_DIALOG(obj), priv->upload); g_signal_connect(priv->source_chooser, "clicked", G_CALLBACK(trg_torrent_add_dialog_source_click_cb), obj); priv->dest_combo = trg_destination_combo_new(priv->client, TRG_PREFS_KEY_LAST_ADD_DESTINATION); hig_workarea_add_row(t, &row, _("_Destination folder:"), priv->dest_combo, NULL); gtk_widget_set_size_request(priv->file_list, 466u, 300u); hig_workarea_add_wide_tall_control(t, &row, priv->file_list); applyall_combo = trg_torrent_add_dialog_apply_all_combo_new(TRG_TORRENT_ADD_DIALOG(obj)); hig_workarea_add_row(t, &row, _("Apply to all:"), applyall_combo, NULL); hig_workarea_add_row(t, &row, _("Torrent _priority:"), priv->priority_combo, NULL); hig_workarea_add_wide_control(t, &row, priv->paused_check); hig_workarea_add_wide_control(t, &row, priv->delete_check); gtr_dialog_set_content(GTK_DIALOG(obj), t); g_signal_connect(G_OBJECT(obj), "response", G_CALLBACK(trg_torrent_add_response_cb), priv->parent); return obj; } static void trg_torrent_add_dialog_class_init(TrgTorrentAddDialogClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(TrgTorrentAddDialogPrivate)); object_class->set_property = trg_torrent_add_dialog_set_property; object_class->get_property = trg_torrent_add_dialog_get_property; object_class->constructor = trg_torrent_add_dialog_constructor; g_object_class_install_property(object_class, PROP_FILENAME, g_param_spec_pointer("filenames", "filenames", "filenames", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_UPLOAD, g_param_spec_pointer("upload", "upload", "upload", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_CLIENT, g_param_spec_pointer("client", "client", "client", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_PARENT, g_param_spec_object("parent", "parent", "parent", TRG_TYPE_MAIN_WINDOW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } static void trg_torrent_add_dialog_init(TrgTorrentAddDialog * self) { } TrgTorrentAddDialog *trg_torrent_add_dialog_new_from_filenames(TrgMainWindow * parent, TrgClient * client, GSList * filenames) { return g_object_new(TRG_TYPE_TORRENT_ADD_DIALOG, "filenames", filenames, "parent", parent, "client", client, NULL); } TrgTorrentAddDialog *trg_torrent_add_dialog_new_from_upload(TrgMainWindow * parent, TrgClient * client, trg_upload *upload) { return g_object_new(TRG_TYPE_TORRENT_ADD_DIALOG, "upload", upload, "parent", parent, "client", client, NULL); } void trg_torrent_add_dialog(TrgMainWindow * win, TrgClient * client) { GtkWidget *w; GtkWidget *c; TrgPrefs *prefs = trg_client_get_prefs(client); w = trg_torrent_add_dialog_generic(GTK_WINDOW(win), prefs); c = gtk_check_button_new_with_mnemonic(_("Show _options dialog")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), trg_prefs_get_bool(prefs, TRG_PREFS_KEY_ADD_OPTIONS_DIALOG, TRG_PREFS_GLOBAL)); gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(w), c); if (gtk_dialog_run(GTK_DIALOG(w)) == GTK_RESPONSE_ACCEPT) { GtkFileChooser *chooser = GTK_FILE_CHOOSER(w); GtkToggleButton *tb = GTK_TOGGLE_BUTTON(gtk_file_chooser_get_extra_widget(chooser)); gboolean showOptions = gtk_toggle_button_get_active(tb); GSList *l = gtk_file_chooser_get_filenames(chooser); trg_torrent_add_dialog_generic_save_dir(GTK_FILE_CHOOSER(w), prefs); if (showOptions) { TrgTorrentAddDialog *dialog = trg_torrent_add_dialog_new_from_filenames(win, client, l); gtk_widget_show_all(GTK_WIDGET(dialog)); gtk_window_present(GTK_WINDOW(dialog)); } else { trg_upload *upload = g_new0(trg_upload, 1); upload->list = l; upload->main_window = win; upload->client = client; upload->extra_args = FALSE; upload->flags = trg_prefs_get_add_flags(prefs); trg_do_upload(upload); } } gtk_widget_destroy(GTK_WIDGET(w)); } transmission-remote-gtk-1.4.1/src/trg-torrent-add-dialog.h000066400000000000000000000047221341276053300235450ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_TORRENT_ADD_DIALOG_H_ #define TRG_TORRENT_ADD_DIALOG_H_ #include #include #include "trg-client.h" #include "upload.h" #include "trg-main-window.h" G_BEGIN_DECLS #define TRG_TYPE_TORRENT_ADD_DIALOG trg_torrent_add_dialog_get_type() #define TRG_TORRENT_ADD_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_TORRENT_ADD_DIALOG, TrgTorrentAddDialog)) #define TRG_TORRENT_ADD_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_TORRENT_ADD_DIALOG, TrgTorrentAddDialogClass)) #define TRG_IS_TORRENT_ADD_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_TORRENT_ADD_DIALOG)) #define TRG_IS_TORRENT_ADD_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_TORRENT_ADD_DIALOG)) #define TRG_TORRENT_ADD_DIALOG_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_TORRENT_ADD_DIALOG, TrgTorrentAddDialogClass)) typedef struct { GtkDialog parent; } TrgTorrentAddDialog; typedef struct { GtkDialogClass parent_class; } TrgTorrentAddDialogClass; GType trg_torrent_add_dialog_get_type(void); TrgTorrentAddDialog *trg_torrent_add_dialog_new_from_filenames(TrgMainWindow * parent, TrgClient * client, GSList * filenames); TrgTorrentAddDialog *trg_torrent_add_dialog_new_from_upload(TrgMainWindow * parent, TrgClient * client, trg_upload *upload); void trg_torrent_add_dialog(TrgMainWindow * win, TrgClient * client); G_END_DECLS #endif /* TRG_TORRENT_ADD_DIALOG_H_ */ transmission-remote-gtk-1.4.1/src/trg-torrent-add-url-dialog.c000066400000000000000000000136131341276053300243370ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "trg-client.h" #include "trg-main-window.h" #include "trg-torrent-add-url-dialog.h" #include "hig.h" #include "requests.h" G_DEFINE_TYPE(TrgTorrentAddUrlDialog, trg_torrent_add_url_dialog, GTK_TYPE_DIALOG) #define TRG_TORRENT_ADD_URL_DIALOG_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_TORRENT_ADD_URL_DIALOG, TrgTorrentAddUrlDialogPrivate)) typedef struct _TrgTorrentAddUrlDialogPrivate TrgTorrentAddUrlDialogPrivate; struct _TrgTorrentAddUrlDialogPrivate { TrgClient *client; TrgMainWindow *win; GtkWidget *urlEntry, *startCheck, *addButton; }; static void trg_torrent_add_url_dialog_class_init(TrgTorrentAddUrlDialogClass * klass) { g_type_class_add_private(klass, sizeof(TrgTorrentAddUrlDialogPrivate)); } static gboolean has_dht_support(TrgTorrentAddUrlDialog * dlg) { TrgTorrentAddUrlDialogPrivate *priv = TRG_TORRENT_ADD_URL_DIALOG_GET_PRIVATE(dlg); JsonObject *session = trg_client_get_session(priv->client); return session_get_dht_enabled(session); } static void show_dht_not_enabled_warning(TrgTorrentAddUrlDialog * dlg) { gchar *msg = _ ("You are trying to add a magnet torrent, but DHT is disabled. Distributed Hash Table (DHT) should be enabled in remote settings."); GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(dlg), GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "%s", msg); gtk_window_set_title(GTK_WINDOW(dialog), _("Error")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } static void trg_torrent_add_url_response_cb(TrgTorrentAddUrlDialog * dlg, gint res_id, gpointer data) { TrgTorrentAddUrlDialogPrivate *priv = TRG_TORRENT_ADD_URL_DIALOG_GET_PRIVATE(dlg); if (res_id == GTK_RESPONSE_ACCEPT) { JsonNode *request; const gchar *entryText = gtk_entry_get_text(GTK_ENTRY(priv->urlEntry)); if (g_str_has_prefix(entryText, "magnet:") && !has_dht_support(dlg)) show_dht_not_enabled_warning(dlg); request = torrent_add_url(entryText, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(priv->startCheck))); dispatch_async(priv->client, request, on_generic_interactive_action_response, data); } gtk_widget_destroy(GTK_WIDGET(dlg)); } static void url_entry_changed(GtkWidget * w, gpointer data) { TrgTorrentAddUrlDialogPrivate *priv = TRG_TORRENT_ADD_URL_DIALOG_GET_PRIVATE(data); gtk_widget_set_sensitive(priv->addButton, gtk_entry_get_text_length(GTK_ENTRY(w)) > 0); } static void trg_torrent_add_url_dialog_init(TrgTorrentAddUrlDialog * self) { TrgTorrentAddUrlDialogPrivate *priv = TRG_TORRENT_ADD_URL_DIALOG_GET_PRIVATE(self); GtkWidget *w, *t, *contentvbox; guint row = 0; contentvbox = gtk_dialog_get_content_area(GTK_DIALOG(self)); t = hig_workarea_create(); w = priv->urlEntry = gtk_entry_new(); g_signal_connect(w, "changed", G_CALLBACK(url_entry_changed), self); hig_workarea_add_row(t, &row, _("URL:"), w, NULL); priv->startCheck = hig_workarea_add_wide_checkbutton(t, &row, _("Start Paused"), FALSE); gtk_window_set_title(GTK_WINDOW(self), _("Add torrent from URL")); gtk_window_set_destroy_with_parent(GTK_WINDOW(self), TRUE); gtk_dialog_add_button(GTK_DIALOG(self), GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL); priv->addButton = gtk_dialog_add_button(GTK_DIALOG(self), GTK_STOCK_ADD, GTK_RESPONSE_ACCEPT); gtk_widget_set_sensitive(priv->addButton, FALSE); gtk_container_set_border_width(GTK_CONTAINER(self), GUI_PAD); gtk_dialog_set_default_response(GTK_DIALOG(self), GTK_RESPONSE_ACCEPT); gtk_dialog_set_alternative_button_order(GTK_DIALOG(self), GTK_RESPONSE_ACCEPT, GTK_RESPONSE_CANCEL, -1); gtk_container_set_border_width(GTK_CONTAINER(t), GUI_PAD); gtk_box_pack_start(GTK_BOX(contentvbox), t, TRUE, TRUE, 0); } TrgTorrentAddUrlDialog *trg_torrent_add_url_dialog_new(TrgMainWindow * win, TrgClient * client) { GObject *obj = g_object_new(TRG_TYPE_TORRENT_ADD_URL_DIALOG, NULL); TrgTorrentAddUrlDialogPrivate *priv = TRG_TORRENT_ADD_URL_DIALOG_GET_PRIVATE(obj); priv->client = client; priv->win = win; gtk_window_set_transient_for(GTK_WINDOW(obj), GTK_WINDOW(win)); g_signal_connect(G_OBJECT(obj), "response", G_CALLBACK(trg_torrent_add_url_response_cb), win); return TRG_TORRENT_ADD_URL_DIALOG(obj); } transmission-remote-gtk-1.4.1/src/trg-torrent-add-url-dialog.h000066400000000000000000000042421341276053300243420ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_TORRENT_ADD_URL_DIALOG_H_ #define TRG_TORRENT_ADD_URL_DIALOG_H_ #include #include #include "trg-client.h" #include "trg-main-window.h" G_BEGIN_DECLS #define TRG_TYPE_TORRENT_ADD_URL_DIALOG trg_torrent_add_url_dialog_get_type() #define TRG_TORRENT_ADD_URL_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_TORRENT_ADD_URL_DIALOG, TrgTorrentAddUrlDialog)) #define TRG_TORRENT_ADD_URL_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_TORRENT_ADD_URL_DIALOG, TrgTorrentAddUrlDialogClass)) #define TRG_IS_TORRENT_ADD_URL_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_TORRENT_ADD_URL_DIALOG)) #define TRG_IS_TORRENT_ADD_URL_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_TORRENT_ADD_URL_DIALOG)) #define TRG_TORRENT_ADD_URL_DIALOG_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_TORRENT_ADD_URL_DIALOG, TrgTorrentAddUrlDialogClass)) typedef struct { GtkDialog parent; } TrgTorrentAddUrlDialog; typedef struct { GtkDialogClass parent_class; } TrgTorrentAddUrlDialogClass; GType trg_torrent_add_url_dialog_get_type(void); TrgTorrentAddUrlDialog *trg_torrent_add_url_dialog_new(TrgMainWindow * win, TrgClient * client); G_END_DECLS #endif /* TRG_TORRENT_ADD_URL_DIALOG_H_ */ transmission-remote-gtk-1.4.1/src/trg-torrent-graph.c000066400000000000000000000452731341276053300226620ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* * This graph drawing code was taken from gnome-system-monitor (load-graph.cpp) * Converted the class from C++ to GObject, substituted out some STL (C++) * functions, and removed the unecessary parts for memory/cpu. * * Would be nice if it supported configurable timespans. This could possibly * be replaced with ubergraph, which is a graphing widget for GTK (C) also based * on this widget but with some improvements I didn't do. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "trg-torrent-graph.h" #if TRG_WITH_GRAPH #include #include #include #include #include #include "util.h" /* damn you freebsd */ #define log2(x) (log(x)/0.69314718055994530942) #define GRAPH_NUM_POINTS 62 #define GRAPH_MIN_HEIGHT 40 #define GRAPH_NUM_LINES 2 #define GRAPH_NUM_DATA_BLOCK_ELEMENTS GRAPH_NUM_POINTS * GRAPH_NUM_LINES #define GRAPH_OUT_COLOR "#2D7DB3" #define GRAPH_IN_COLOR "#844798" #define GRAPH_LINE_WIDTH 3 #define GRAPH_FRAME_WIDTH 4 G_DEFINE_TYPE(TrgTorrentGraph, trg_torrent_graph, GTK_TYPE_VBOX) #define TRG_TORRENT_GRAPH_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_TORRENT_GRAPH, TrgTorrentGraphPrivate)) typedef struct _TrgTorrentGraphPrivate TrgTorrentGraphPrivate; struct _TrgTorrentGraphPrivate { double fontsize; double rmargin; double indent; guint speed; guint draw_width, draw_height; guint render_counter; guint frames_per_unit; guint graph_dely; guint real_draw_height; double graph_delx; guint graph_buffer_offset; GdkColor colors[GRAPH_NUM_LINES]; float data_block[GRAPH_NUM_POINTS * GRAPH_NUM_LINES]; GList *points; GtkWidget *disp; GdkGC *gc; GdkDrawable *background; guint timer_index; gboolean draw; guint64 out, in; unsigned int max; unsigned values[GRAPH_NUM_POINTS]; size_t cur; GtkStyle *style; GtkWidget *label_in; GtkWidget *label_out; }; static int trg_torrent_graph_update(gpointer user_data); static void trg_torrent_graph_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { switch (property_id) { default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_torrent_graph_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { switch (property_id) { default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } void trg_torrent_graph_draw_background(TrgTorrentGraph * g) { TrgTorrentGraphPrivate *priv; GtkAllocation allocation; double dash[2] = { 1.0, 2.0 }; cairo_t *cr; guint i; unsigned num_bars; char *caption; cairo_text_extents_t extents; unsigned rate; unsigned total_seconds; priv = TRG_TORRENT_GRAPH_GET_PRIVATE(g); num_bars = trg_torrent_graph_get_num_bars(g); priv->graph_dely = (priv->draw_height - 15) / num_bars; /* round to int to avoid AA blur */ priv->real_draw_height = priv->graph_dely * num_bars; priv->graph_delx = (priv->draw_width - 2.0 - priv->rmargin - priv->indent) / (GRAPH_NUM_POINTS - 3); priv->graph_buffer_offset = (int) (1.5 * priv->graph_delx) + GRAPH_FRAME_WIDTH; gtk_widget_get_allocation(priv->disp, &allocation); priv->background = gdk_pixmap_new(GDK_DRAWABLE(gtk_widget_get_window(priv->disp)), allocation.width, allocation.height, -1); cr = gdk_cairo_create(priv->background); gdk_cairo_set_source_color(cr, &priv->style->bg[GTK_STATE_NORMAL]); cairo_paint(cr); cairo_translate(cr, GRAPH_FRAME_WIDTH, GRAPH_FRAME_WIDTH); cairo_set_source_rgb(cr, 1.0, 1.0, 1.0); cairo_rectangle(cr, priv->rmargin + priv->indent, 0, priv->draw_width - priv->rmargin - priv->indent, priv->real_draw_height); cairo_fill(cr); cairo_set_line_width(cr, 1.0); cairo_set_dash(cr, dash, 2, 0); cairo_set_font_size(cr, priv->fontsize); for (i = 0; i <= num_bars; ++i) { double y; gchar caption[32]; if (i == 0) y = 0.5 + priv->fontsize / 2.0; else if (i == num_bars) y = i * priv->graph_dely + 0.5; else y = i * priv->graph_dely + priv->fontsize / 2.0; gdk_cairo_set_source_color(cr, &priv->style->fg[GTK_STATE_NORMAL]); rate = priv->max - (i * priv->max / num_bars); trg_strlspeed(caption, (gint64) (rate / 1024)); cairo_text_extents(cr, caption, &extents); cairo_move_to(cr, priv->indent - extents.width + 20, y); cairo_show_text(cr, caption); } cairo_stroke(cr); cairo_set_dash(cr, dash, 2, 1.5); total_seconds = priv->speed * (GRAPH_NUM_POINTS - 2) / 1000; for (i = 0; i < 7; i++) { unsigned seconds; const char *format; double x = (i) * (priv->draw_width - priv->rmargin - priv->indent) / 6; cairo_set_source_rgba(cr, 0, 0, 0, 0.75); cairo_move_to(cr, (ceil(x) + 0.5) + priv->rmargin + priv->indent, 0.5); cairo_line_to(cr, (ceil(x) + 0.5) + priv->rmargin + priv->indent, priv->real_draw_height + 4.5); cairo_stroke(cr); seconds = total_seconds - i * total_seconds / 6; if (i == 0) format = "%u seconds"; else format = "%u"; caption = g_strdup_printf(format, seconds); cairo_text_extents(cr, caption, &extents); cairo_move_to(cr, ((ceil(x) + 0.5) + priv->rmargin + priv->indent) - (extents.width / 2), priv->draw_height); gdk_cairo_set_source_color(cr, &priv->style->fg[GTK_STATE_NORMAL]); cairo_show_text(cr, caption); g_free(caption); } cairo_stroke(cr); cairo_destroy(cr); } void trg_torrent_graph_set_nothing(TrgTorrentGraph * g) { TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(g); priv->in = priv->out = 0; } void trg_torrent_graph_set_speed(TrgTorrentGraph * g, trg_torrent_model_update_stats * stats) { TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(g); priv->in = (guint64) stats->downRateTotal; priv->out = (guint64) stats->upRateTotal; } static gboolean trg_torrent_graph_configure(GtkWidget * widget, GdkEventConfigure * event, gpointer data_ptr) { GtkAllocation allocation; TrgTorrentGraph *g = TRG_TORRENT_GRAPH(data_ptr); TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(data_ptr); gtk_widget_get_allocation(widget, &allocation); priv->draw_width = allocation.width - 2 * GRAPH_FRAME_WIDTH; priv->draw_height = allocation.height - 2 * GRAPH_FRAME_WIDTH; trg_torrent_graph_clear_background(g); if (priv->gc == NULL) priv->gc = gdk_gc_new(GDK_DRAWABLE(gtk_widget_get_window(widget))); trg_torrent_graph_draw(g); return TRUE; } static gboolean trg_torrent_graph_expose(GtkWidget * widget, GdkEventExpose * event, gpointer data_ptr) { TrgTorrentGraph *g = TRG_TORRENT_GRAPH(data_ptr); TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(data_ptr); GtkAllocation allocation; GdkWindow *window; cairo_t *cr; guint i, j; float *fp; gdouble sample_width, x_offset; if (priv->background == NULL) trg_torrent_graph_draw_background(g); window = gtk_widget_get_window(priv->disp); gtk_widget_get_allocation(priv->disp, &allocation); gdk_draw_drawable(window, priv->gc, priv->background, 0, 0, 0, 0, allocation.width, allocation.height); sample_width = (float) (priv->draw_width - priv->rmargin - priv->indent) / (float) GRAPH_NUM_POINTS; x_offset = priv->draw_width - priv->rmargin + (sample_width * 2); x_offset += priv->rmargin - ((sample_width / priv->frames_per_unit) * priv->render_counter); cr = gdk_cairo_create(window); cairo_set_line_width(cr, GRAPH_LINE_WIDTH); cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND); cairo_rectangle(cr, priv->rmargin + priv->indent + GRAPH_FRAME_WIDTH + 1, GRAPH_FRAME_WIDTH - 1, priv->draw_width - priv->rmargin - priv->indent - 1, priv->real_draw_height + GRAPH_FRAME_WIDTH - 1); cairo_clip(cr); for (j = 0; j < GRAPH_NUM_LINES; ++j) { GList *li = priv->points; fp = (float *) li->data; cairo_move_to(cr, x_offset, (1.0f - fp[j]) * priv->real_draw_height); gdk_cairo_set_source_color(cr, &(priv->colors[j])); i = 0; for (li = g_list_next(li); li != NULL; li = g_list_next(li)) { GList *lli = g_list_previous(li); float *lfp = (float *) lli->data; fp = (float *) li->data; i++; if (fp[j] == -1.0f) continue; cairo_curve_to(cr, x_offset - ((i - 0.5f) * priv->graph_delx), (1.0f - lfp[j]) * priv->real_draw_height + 3.5f, x_offset - ((i - 0.5f) * priv->graph_delx), (1.0f - fp[j]) * priv->real_draw_height + 3.5f, x_offset - (i * priv->graph_delx), (1.0f - fp[j]) * priv->real_draw_height + 3.5f); } cairo_stroke(cr); } cairo_destroy(cr); return TRUE; } void trg_torrent_graph_stop(TrgTorrentGraph * g) { TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(g); priv->draw = FALSE; } static void trg_torrent_graph_dispose(GObject * object) { TrgTorrentGraph *g = TRG_TORRENT_GRAPH(object); TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(g); trg_torrent_graph_stop(g); if (priv->timer_index) g_source_remove(priv->timer_index); trg_torrent_graph_clear_background(g); G_OBJECT_CLASS(trg_torrent_graph_parent_class)->dispose(object); } void trg_torrent_graph_start(TrgTorrentGraph * g) { TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(g); if (!priv->timer_index) { trg_torrent_graph_update(g); priv->timer_index = g_timeout_add(priv->speed / priv->frames_per_unit, trg_torrent_graph_update, g); } priv->draw = TRUE; } static unsigned get_max_value_element(TrgTorrentGraph * g) { TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(g); unsigned r = 0; int i; for (i = 0; i < GRAPH_NUM_POINTS; i++) if (priv->values[i] > r) r = priv->values[i]; return r; } static void trg_torrent_graph_update_net(TrgTorrentGraph * g) { TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(g); unsigned max, new_max, bak_max, pow2, base10, coef10, factor10, num_bars; float scale; char speed[32]; gchar *labelMarkup; GList *li; float *fp = (float *) (priv->points->data); GList *last = g_list_last(priv->points); float *lastData = last->data; priv->points = g_list_delete_link(priv->points, last); priv->points = g_list_prepend(priv->points, lastData); fp[0] = 1.0f * priv->out / priv->max; fp[1] = 1.0f * priv->in / priv->max; trg_strlspeed(speed, (gint64) (priv->out / disk_K)); labelMarkup = g_markup_printf_escaped("%s: %s", _("Total Uploading"), speed); gtk_label_set_markup(GTK_LABEL(priv->label_out), labelMarkup); g_free(labelMarkup); trg_strlspeed(speed, (gint64) (priv->in / 1024)); labelMarkup = g_markup_printf_escaped("%s: %s", _("Total Downloading"), speed); gtk_label_set_markup(GTK_LABEL(priv->label_in), labelMarkup); g_free(labelMarkup); max = MAX(priv->in, priv->out); priv->values[priv->cur] = max; priv->cur = (priv->cur + 1) % GRAPH_NUM_POINTS; if (max >= priv->max) new_max = max; else new_max = get_max_value_element(g); bak_max = new_max; new_max = 1.1 * new_max; new_max = MAX(new_max, 1024U); pow2 = floor(log2(new_max)); base10 = pow2 / 10; coef10 = ceil(new_max / (double) (1UL << (base10 * 10))); factor10 = pow(10.0, floor(log10(coef10))); coef10 = ceil(coef10 / (double) (factor10)) * factor10; num_bars = trg_torrent_graph_get_num_bars(g); if (coef10 % num_bars != 0) coef10 = coef10 + (num_bars - coef10 % num_bars); new_max = coef10 * (1UL << (base10 * 10)); if (bak_max > new_max) { new_max = bak_max; } if ((0.8 * priv->max) < new_max && new_max <= priv->max) return; scale = 1.0f * priv->max / new_max; for (li = priv->points; li != NULL; li = g_list_next(li)) { float *fp = (float *) li->data; if (fp[0] >= 0.0f) { fp[0] *= scale; fp[1] *= scale; } } priv->max = new_max; trg_torrent_graph_clear_background(g); } static GObject *trg_torrent_graph_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *object; TrgTorrentGraphPrivate *priv; GtkWidget *hbox; int i; object = G_OBJECT_CLASS (trg_torrent_graph_parent_class)->constructor(type, n_construct_properties, construct_params); priv = TRG_TORRENT_GRAPH_GET_PRIVATE(object); priv->draw_width = 0; priv->draw_height = 0; priv->render_counter = 0; priv->graph_dely = 0; priv->real_draw_height = 0; priv->graph_delx = 0.0; priv->graph_buffer_offset = 0; priv->disp = NULL; priv->gc = NULL; priv->background = NULL; priv->timer_index = 0; priv->draw = FALSE; priv->fontsize = 8.0; priv->frames_per_unit = 10; priv->rmargin = 3.5 * priv->fontsize; priv->indent = 24.0; priv->out = 0; priv->in = 0; priv->cur = 0; priv->speed = 1000; priv->max = 1024; hbox = gtk_hbox_new(FALSE, 0); priv->label_in = gtk_label_new(NULL); priv->label_out = gtk_label_new(NULL); gtk_box_pack_start(GTK_BOX(hbox), priv->label_in, FALSE, FALSE, 65); gtk_box_pack_start(GTK_BOX(hbox), priv->label_out, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(object), hbox, FALSE, FALSE, 2); gdk_color_parse(GRAPH_OUT_COLOR, &priv->colors[0]); gdk_color_parse(GRAPH_IN_COLOR, &priv->colors[1]); priv->timer_index = 0; priv->render_counter = (priv->frames_per_unit - 1); priv->draw = FALSE; gtk_box_set_homogeneous(GTK_BOX(object), FALSE); priv->disp = gtk_drawing_area_new(); g_signal_connect(G_OBJECT(priv->disp), "expose_event", G_CALLBACK(trg_torrent_graph_expose), object); g_signal_connect(G_OBJECT(priv->disp), "configure_event", G_CALLBACK(trg_torrent_graph_configure), object); gtk_widget_set_events(priv->disp, GDK_EXPOSURE_MASK); gtk_box_pack_start(GTK_BOX(object), priv->disp, TRUE, TRUE, 0); priv->points = NULL; for (i = 0; i < GRAPH_NUM_DATA_BLOCK_ELEMENTS; i++) { priv->data_block[i] = -1.0f; if (i % GRAPH_NUM_LINES == 0) priv->points = g_list_append(priv->points, &priv->data_block[i]); } return object; } static void trg_torrent_graph_class_init(TrgTorrentGraphClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(TrgTorrentGraphPrivate)); object_class->get_property = trg_torrent_graph_get_property; object_class->set_property = trg_torrent_graph_set_property; object_class->dispose = trg_torrent_graph_dispose; object_class->constructor = trg_torrent_graph_constructor; } static void trg_torrent_graph_init(TrgTorrentGraph * self) { } TrgTorrentGraph *trg_torrent_graph_new(GtkStyle * style) { GObject *obj = g_object_new(TRG_TYPE_TORRENT_GRAPH, NULL); TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(obj); priv->style = style; return TRG_TORRENT_GRAPH(obj); } void trg_torrent_graph_draw(TrgTorrentGraph * g) { TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(g); gtk_widget_queue_draw(priv->disp); } void trg_torrent_graph_clear_background(TrgTorrentGraph * g) { TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(g); if (priv->background) { g_object_unref(priv->background); priv->background = NULL; } } static gboolean trg_torrent_graph_update(gpointer user_data) { TrgTorrentGraph *g = TRG_TORRENT_GRAPH(user_data); TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(user_data); if (priv->render_counter == priv->frames_per_unit - 1) trg_torrent_graph_update_net(g); if (priv->draw) trg_torrent_graph_draw(g); priv->render_counter++; if (priv->render_counter >= priv->frames_per_unit) priv->render_counter = 0; return TRUE; } unsigned trg_torrent_graph_get_num_bars(TrgTorrentGraph * g) { TrgTorrentGraphPrivate *priv = TRG_TORRENT_GRAPH_GET_PRIVATE(g); unsigned n; switch ((int) (priv->draw_height / (priv->fontsize + 14))) { case 0: case 1: n = 1; break; case 2: case 3: n = 2; break; case 4: n = 4; break; default: n = 5; break; } return n; } #endif transmission-remote-gtk-1.4.1/src/trg-torrent-graph.h000066400000000000000000000032601341276053300226550ustar00rootroot00000000000000/* trg-torrent-graph.h */ #ifndef _TRG_TORRENT_GRAPH #define _TRG_TORRENT_GRAPH #include #define TRG_WITH_GRAPH !GTK_CHECK_VERSION( 3, 0, 0 ) #if TRG_WITH_GRAPH #include #include "trg-torrent-model.h" G_BEGIN_DECLS #define TRG_TYPE_TORRENT_GRAPH trg_torrent_graph_get_type() #define TRG_TORRENT_GRAPH(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_TORRENT_GRAPH, TrgTorrentGraph)) #define TRG_TORRENT_GRAPH_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_TORRENT_GRAPH, TrgTorrentGraphClass)) #define TRG_IS_TORRENT_GRAPH(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_TORRENT_GRAPH)) #define TRG_IS_TORRENT_GRAPH_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_TORRENT_GRAPH)) #define TRG_TORRENT_GRAPH_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_TORRENT_GRAPH, TrgTorrentGraphClass)) typedef struct { GtkVBox parent; } TrgTorrentGraph; typedef struct { GtkVBoxClass parent_class; } TrgTorrentGraphClass; GType trg_torrent_graph_get_type(void); TrgTorrentGraph *trg_torrent_graph_new(GtkStyle * style); unsigned trg_torrent_graph_get_num_bars(TrgTorrentGraph * g); void trg_torrent_graph_clear_background(); void trg_torrent_graph_draw(TrgTorrentGraph * g); void trg_torrent_graph_start(TrgTorrentGraph * g); void trg_torrent_graph_stop(TrgTorrentGraph * g); void trg_torrent_graph_change_speed(TrgTorrentGraph * g, guint new_speed); void trg_torrent_graph_set_speed(TrgTorrentGraph * g, trg_torrent_model_update_stats * stats); void trg_torrent_graph_set_nothing(TrgTorrentGraph * g); G_END_DECLS #endif #endif /* _TRG_TORRENT_GRAPH */ transmission-remote-gtk-1.4.1/src/trg-torrent-model.c000066400000000000000000001042571341276053300226570ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "torrent.h" #include "json.h" #include "trg-torrent-model.h" #include "protocol-constants.h" #include "trg-model.h" #include "util.h" /* An extension of TrgModel (which is an extension of GtkListStore) which * updates from a JSON torrent-get response. It handles a number of different * update modes. * 1) The first update. * 2) A full update. * 3) An active-only update. * 4) Individual torrent updates. * * Other stuff it does. * 1) Populates a stats struct with speeds/state counts as it works through the * response. * 2) Emits signals if something is added or removed. This is used by the state * selector so it doesn't have to refresh itself on every update. * 3) Added or completed signals, for libnotify notifications. * 4) Maintains the torrent hash table (by ID). * (and provide a lookup function which outputs an iter and/or JSON object.) * 5) If the download directory is new/changed, create a short version if there * is one (duplicate it not) for the state selector to filter/populate against. * 6) Shorten the tracker announce URL. */ enum { TMODEL_TORRENT_COMPLETED, TMODEL_UPDATE, TMODEL_TORRENT_ADDED, TMODEL_STATE_CHANGED, TMODEL_SIGNAL_COUNT }; #define PROP_REMOVE_IN_PROGRESS "remove-in-progress" static guint signals[TMODEL_SIGNAL_COUNT] = { 0 }; G_DEFINE_TYPE(TrgTorrentModel, trg_torrent_model, GTK_TYPE_LIST_STORE) #define TRG_TORRENT_MODEL_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_TORRENT_MODEL, TrgTorrentModelPrivate)) typedef struct _TrgTorrentModelPrivate TrgTorrentModelPrivate; struct _TrgTorrentModelPrivate { GHashTable *ht; GRegex *urlHostRegex; trg_torrent_model_update_stats stats; }; static void trg_torrent_model_dispose(GObject * object) { TrgTorrentModelPrivate *priv = TRG_TORRENT_MODEL_GET_PRIVATE(object); g_hash_table_destroy(priv->ht); G_OBJECT_CLASS(trg_torrent_model_parent_class)->dispose(object); } static void update_torrent_iter(TrgTorrentModel * model, TrgClient * tc, gint64 rpcv, gint64 serial, GtkTreeIter * iter, JsonObject * t, trg_torrent_model_update_stats * stats, guint * whatsChanged); static void trg_torrent_model_class_init(TrgTorrentModelClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(TrgTorrentModelPrivate)); object_class->dispose = trg_torrent_model_dispose; signals[TMODEL_TORRENT_COMPLETED] = g_signal_new("torrent-completed", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (TrgTorrentModelClass, torrent_completed), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[TMODEL_UPDATE] = g_signal_new("update", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (TrgTorrentModelClass, update), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[TMODEL_TORRENT_ADDED] = g_signal_new("torrent-added", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (TrgTorrentModelClass, torrent_added), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[TMODEL_STATE_CHANGED] = g_signal_new("torrents-state-change", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (TrgTorrentModelClass, torrent_removed), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); } trg_torrent_model_update_stats *trg_torrent_model_get_stats(TrgTorrentModel * model) { TrgTorrentModelPrivate *priv = TRG_TORRENT_MODEL_GET_PRIVATE(model); return &(priv->stats); } static void trg_torrent_model_count_peers(TrgTorrentModel * model, GtkTreeIter * iter, JsonObject * t) { GList *trackersList = json_array_get_elements(torrent_get_tracker_stats(t)); gint64 seeders = 0; gint64 leechers = 0; gint64 downloads = 0; GList *li; for (li = trackersList; li; li = g_list_next(li)) { JsonObject *tracker = json_node_get_object((JsonNode *) li->data); seeders += tracker_stats_get_seeder_count(tracker); leechers += tracker_stats_get_leecher_count(tracker); downloads += tracker_stats_get_download_count(tracker); } g_list_free(trackersList); gtk_list_store_set(GTK_LIST_STORE(model), iter, TORRENT_COLUMN_SEEDS, seeders, TORRENT_COLUMN_LEECHERS, leechers, TORRENT_COLUMN_DOWNLOADS, downloads, -1); } static void trg_torrent_model_ref_free(gpointer data) { GtkTreeRowReference *rr = (GtkTreeRowReference *) data; GtkTreeModel *model = gtk_tree_row_reference_get_model(rr); GtkTreePath *path = gtk_tree_row_reference_get_path(rr); if (path) { GtkTreeIter iter; JsonObject *json; if (gtk_tree_model_get_iter(model, &iter, path)) { gtk_tree_model_get(model, &iter, TORRENT_COLUMN_JSON, &json, -1); json_object_unref(json); g_object_set_data(G_OBJECT(model), PROP_REMOVE_IN_PROGRESS, GINT_TO_POINTER(TRUE)); gtk_list_store_remove(GTK_LIST_STORE(model), &iter); g_object_set_data(G_OBJECT(model), PROP_REMOVE_IN_PROGRESS, GINT_TO_POINTER(FALSE)); } gtk_tree_path_free(path); } gtk_tree_row_reference_free(rr); } static void trg_torrent_model_init(TrgTorrentModel * self) { TrgTorrentModelPrivate *priv = TRG_TORRENT_MODEL_GET_PRIVATE(self); GType column_types[TORRENT_COLUMN_COLUMNS]; column_types[TORRENT_COLUMN_ICON] = G_TYPE_STRING; column_types[TORRENT_COLUMN_NAME] = G_TYPE_STRING; column_types[TORRENT_COLUMN_ERROR] = G_TYPE_INT64; column_types[TORRENT_COLUMN_SIZEWHENDONE] = G_TYPE_INT64; column_types[TORRENT_COLUMN_TOTALSIZE] = G_TYPE_INT64; column_types[TORRENT_COLUMN_HAVE_UNCHECKED] = G_TYPE_INT64; column_types[TORRENT_COLUMN_PERCENTDONE] = G_TYPE_DOUBLE; column_types[TORRENT_COLUMN_METADATAPERCENTCOMPLETE] = G_TYPE_DOUBLE; column_types[TORRENT_COLUMN_STATUS] = G_TYPE_STRING; column_types[TORRENT_COLUMN_SEEDS] = G_TYPE_INT64; column_types[TORRENT_COLUMN_LEECHERS] = G_TYPE_INT64; column_types[TORRENT_COLUMN_DOWNLOADS] = G_TYPE_INT64; column_types[TORRENT_COLUMN_DOWNSPEED] = G_TYPE_INT64; column_types[TORRENT_COLUMN_ADDED] = G_TYPE_INT64; column_types[TORRENT_COLUMN_UPSPEED] = G_TYPE_INT64; column_types[TORRENT_COLUMN_ETA] = G_TYPE_INT64; column_types[TORRENT_COLUMN_UPLOADED] = G_TYPE_INT64; column_types[TORRENT_COLUMN_DOWNLOADED] = G_TYPE_INT64; column_types[TORRENT_COLUMN_HAVE_VALID] = G_TYPE_INT64; column_types[TORRENT_COLUMN_RATIO] = G_TYPE_DOUBLE; column_types[TORRENT_COLUMN_ID] = G_TYPE_INT64; column_types[TORRENT_COLUMN_JSON] = G_TYPE_POINTER; column_types[TORRENT_COLUMN_UPDATESERIAL] = G_TYPE_INT64; column_types[TORRENT_COLUMN_FLAGS] = G_TYPE_INT; column_types[TORRENT_COLUMN_DOWNLOADDIR] = G_TYPE_STRING; column_types[TORRENT_COLUMN_DOWNLOADDIR_SHORT] = G_TYPE_STRING; column_types[TORRENT_COLUMN_BANDWIDTH_PRIORITY] = G_TYPE_INT64; column_types[TORRENT_COLUMN_DONE_DATE] = G_TYPE_INT64; column_types[TORRENT_COLUMN_FROMPEX] = G_TYPE_INT64; column_types[TORRENT_COLUMN_FROMDHT] = G_TYPE_INT64; column_types[TORRENT_COLUMN_FROMTRACKERS] = G_TYPE_INT64; column_types[TORRENT_COLUMN_FROMLTEP] = G_TYPE_INT64; column_types[TORRENT_COLUMN_FROMRESUME] = G_TYPE_INT64; column_types[TORRENT_COLUMN_FROMINCOMING] = G_TYPE_INT64; column_types[TORRENT_COLUMN_PEER_SOURCES] = G_TYPE_STRING; column_types[TORRENT_COLUMN_SEED_RATIO_LIMIT] = G_TYPE_DOUBLE; column_types[TORRENT_COLUMN_SEED_RATIO_MODE] = G_TYPE_INT64; column_types[TORRENT_COLUMN_PEERS_CONNECTED] = G_TYPE_INT64; column_types[TORRENT_COLUMN_PEERS_FROM_US] = G_TYPE_INT64; column_types[TORRENT_COLUMN_WEB_SEEDS_TO_US] = G_TYPE_INT64; column_types[TORRENT_COLUMN_PEERS_TO_US] = G_TYPE_INT64; column_types[TORRENT_COLUMN_TRACKERHOST] = G_TYPE_STRING; column_types[TORRENT_COLUMN_QUEUE_POSITION] = G_TYPE_INT64; column_types[TORRENT_COLUMN_LASTACTIVE] = G_TYPE_INT64; column_types[TORRENT_COLUMN_FILECOUNT] = G_TYPE_UINT; gtk_list_store_set_column_types(GTK_LIST_STORE(self), TORRENT_COLUMN_COLUMNS, column_types); priv->ht = g_hash_table_new_full(g_int64_hash, g_int64_equal, (GDestroyNotify) g_free, trg_torrent_model_ref_free); g_object_set_data(G_OBJECT(self), PROP_REMOVE_IN_PROGRESS, GINT_TO_POINTER(FALSE)); priv->urlHostRegex = trg_uri_host_regex_new(); } gboolean trg_torrent_model_is_remove_in_progress(TrgTorrentModel * model) { return (gboolean) GPOINTER_TO_INT(g_object_get_data (G_OBJECT(model), PROP_REMOVE_IN_PROGRESS)); } static gboolean trg_torrent_model_reload_dir_aliases_foreachfunc(GtkTreeModel * model, GtkTreePath * path G_GNUC_UNUSED, GtkTreeIter * iter, gpointer gdata) { gchar *downloadDir, *shortDownloadDir; gtk_tree_model_get(model, iter, TORRENT_COLUMN_DOWNLOADDIR, &downloadDir, -1); shortDownloadDir = shorten_download_dir((TrgClient *) gdata, downloadDir); gtk_list_store_set(GTK_LIST_STORE(model), iter, TORRENT_COLUMN_DOWNLOADDIR_SHORT, shortDownloadDir, -1); g_free(downloadDir); g_free(shortDownloadDir); return FALSE; } void trg_torrent_model_reload_dir_aliases(TrgClient * tc, GtkTreeModel * model) { gtk_tree_model_foreach(model, trg_torrent_model_reload_dir_aliases_foreachfunc, tc); g_signal_emit(model, signals[TMODEL_STATE_CHANGED], 0, TORRENT_UPDATE_PATH_CHANGE); } static gboolean trg_torrent_model_stats_scan_foreachfunc(GtkTreeModel * model, GtkTreePath * path G_GNUC_UNUSED, GtkTreeIter * iter, gpointer gdata) { trg_torrent_model_update_stats *stats = (trg_torrent_model_update_stats *) gdata; guint flags; gtk_tree_model_get(model, iter, TORRENT_COLUMN_FLAGS, &flags, -1); if (flags & TORRENT_FLAG_SEEDING) stats->seeding++; else if (flags & TORRENT_FLAG_DOWNLOADING) stats->down++; else if (flags & TORRENT_FLAG_PAUSED) stats->paused++; if (flags & TORRENT_FLAG_ERROR) stats->error++; if (flags & TORRENT_FLAG_COMPLETE) stats->complete++; else stats->incomplete++; if (flags & TORRENT_FLAG_CHECKING) stats->checking++; if (flags & TORRENT_FLAG_ACTIVE) stats->active++; if (flags & TORRENT_FLAG_SEEDING_WAIT) stats->seed_wait++; if (flags & TORRENT_FLAG_DOWNLOADING_WAIT) stats->down_wait++; stats->count++; return FALSE; } void trg_torrent_model_remove_all(TrgTorrentModel * model) { TrgTorrentModelPrivate *priv = TRG_TORRENT_MODEL_GET_PRIVATE(model); g_hash_table_remove_all(priv->ht); gtk_list_store_clear(GTK_LIST_STORE(model)); } gchar *shorten_download_dir(TrgClient * tc, const gchar * downloadDir) { TrgPrefs *prefs = trg_client_get_prefs(tc); JsonArray *labels = trg_prefs_get_array(prefs, TRG_PREFS_KEY_DESTINATIONS, TRG_PREFS_CONNECTION); JsonObject *session = trg_client_get_session(tc); const gchar *defaultDownloadDir = session_get_download_dir(session); gchar *shortDownloadDir = NULL; if (labels) { GList *labelsList = json_array_get_elements(labels); if (labelsList) { GList *li; for (li = labelsList; li; li = g_list_next(li)) { JsonObject *labelObj = json_node_get_object((JsonNode *) li->data); const gchar *labelDir = json_object_get_string_member(labelObj, TRG_PREFS_KEY_DESTINATIONS_SUBKEY_DIR); if (!g_strcmp0(downloadDir, labelDir)) { const gchar *labelLabel = json_object_get_string_member(labelObj, TRG_PREFS_SUBKEY_LABEL); shortDownloadDir = g_strdup(labelLabel); break; } } g_list_free(labelsList); } } if (shortDownloadDir) { return shortDownloadDir; } else { if (!g_strcmp0(defaultDownloadDir, downloadDir)) return g_strdup(_("Default")); if (g_str_has_prefix(downloadDir, defaultDownloadDir)) { int offset = strlen(defaultDownloadDir); if (*(downloadDir + offset) == '/') offset++; if (offset < strlen(downloadDir)) return g_strdup(downloadDir + offset); } } return g_strdup(downloadDir); } static inline void update_torrent_iter(TrgTorrentModel * model, TrgClient * tc, gint64 rpcv, gint64 serial, GtkTreeIter * iter, JsonObject * t, trg_torrent_model_update_stats * stats, guint * whatsChanged) { TrgTorrentModelPrivate *priv = TRG_TORRENT_MODEL_GET_PRIVATE(model); GtkListStore *ls = GTK_LIST_STORE(model); guint lastFlags, newFlags; JsonObject *lastJson, *pf; JsonArray *trackerStats; gchar *statusString, *statusIcon, *downloadDir; gint64 downRate, upRate, haveValid, uploaded, downloaded, id, status, lpd; guint fileCount; gchar *firstTrackerHost = NULL; gchar *peerSources = NULL; gchar *lastDownloadDir = NULL; downRate = torrent_get_rate_down(t); stats->downRateTotal += downRate; upRate = torrent_get_rate_up(t); stats->upRateTotal += upRate; uploaded = torrent_get_uploaded(t); downloaded = torrent_get_downloaded(t); haveValid = torrent_get_have_valid(t); downloadDir = (gchar *) torrent_get_download_dir(t); rm_trailing_slashes(downloadDir); id = torrent_get_id(t); status = torrent_get_status(t); fileCount = json_array_get_length(torrent_get_files(t)); newFlags = torrent_get_flags(t, rpcv, status, fileCount, downRate, upRate); statusString = torrent_get_status_string(rpcv, status, newFlags); statusIcon = torrent_get_status_icon(rpcv, newFlags); pf = torrent_get_peersfrom(t); trackerStats = torrent_get_tracker_stats(t); gtk_tree_model_get(GTK_TREE_MODEL(model), iter, TORRENT_COLUMN_FLAGS, &lastFlags, TORRENT_COLUMN_JSON, &lastJson, TORRENT_COLUMN_DOWNLOADDIR, &lastDownloadDir, -1); json_object_ref(t); if (json_array_get_length(trackerStats) > 0) { JsonObject *firstTracker = json_array_get_object_element(trackerStats, 0); firstTrackerHost = trg_gregex_get_first(priv->urlHostRegex, tracker_stats_get_host (firstTracker)); } lpd = peerfrom_get_lpd(pf); if (newFlags & TORRENT_FLAG_ACTIVE) { if (lpd >= 0) { peerSources = g_strdup_printf("%" G_GINT64_FORMAT " / %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT, peerfrom_get_trackers(pf), peerfrom_get_incoming(pf), peerfrom_get_ltep(pf), peerfrom_get_dht(pf), peerfrom_get_pex(pf), lpd, peerfrom_get_resume(pf)); } else { peerSources = g_strdup_printf("%" G_GINT64_FORMAT " / %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT " / N/A / %" G_GINT64_FORMAT, peerfrom_get_trackers(pf), peerfrom_get_incoming(pf), peerfrom_get_ltep(pf), peerfrom_get_dht(pf), peerfrom_get_pex(pf), peerfrom_get_resume(pf)); } } #ifdef TRG_DEBUG gtk_list_store_set(ls, iter, TORRENT_COLUMN_ICON, statusIcon, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_NAME, torrent_get_name(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_SIZEWHENDONE, torrent_get_size_when_done(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_PERCENTDONE, (newFlags & TORRENT_FLAG_CHECKING) ? torrent_get_recheck_progress(t) : torrent_get_percent_done(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_STATUS, statusString, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_DOWNSPEED, downRate, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_FLAGS, newFlags, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_UPSPEED, upRate, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_ETA, torrent_get_eta(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_UPLOADED, uploaded, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_DOWNLOADED, downloaded, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_RATIO, uploaded > 0 && downloaded > 0 ? (double) uploaded / (double) downloaded : 0, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_ID, id, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_JSON, t, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_UPDATESERIAL, serial, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_ADDED, torrent_get_added_date(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_DOWNLOADDIR, downloadDir, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_PEERS_CONNECTED, torrent_get_peers_connected(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_ETA, torrent_get_eta(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_BANDWIDTH_PRIORITY, torrent_get_bandwidth_priority(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_TOTALSIZE, torrent_get_total_size(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_HAVE_UNCHECKED, torrent_get_have_unchecked(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_METADATAPERCENTCOMPLETE, torrent_get_metadata_percent_complete(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_PEERS_TO_US, torrent_get_peers_sending_to_us(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_PEERS_FROM_US, torrent_get_peers_getting_from_us(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_WEB_SEEDS_TO_US, torrent_get_web_seeds_sending_to_us(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_SEED_RATIO_LIMIT, torrent_get_seed_ratio_limit(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_SEED_RATIO_MODE, torrent_get_seed_ratio_mode(t), -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_FILECOUNT, fileCount, -1); gtk_list_store_set(ls, iter, TORRENT_COLUMN_HAVE_VALID, haveValid, -1); #else gtk_list_store_set(ls, iter, TORRENT_COLUMN_ICON, statusIcon, TORRENT_COLUMN_ADDED, torrent_get_added_date(t), TORRENT_COLUMN_FILECOUNT, fileCount, TORRENT_COLUMN_DONE_DATE, torrent_get_done_date(t), TORRENT_COLUMN_NAME, torrent_get_name(t), TORRENT_COLUMN_ERROR, torrent_get_error(t), TORRENT_COLUMN_SIZEWHENDONE, torrent_get_size_when_done(t), TORRENT_COLUMN_PERCENTDONE, (newFlags & TORRENT_FLAG_CHECKING) ? torrent_get_recheck_progress(t) : torrent_get_percent_done(t), TORRENT_COLUMN_METADATAPERCENTCOMPLETE, torrent_get_metadata_percent_complete(t), TORRENT_COLUMN_STATUS, statusString, TORRENT_COLUMN_DOWNSPEED, downRate, TORRENT_COLUMN_FLAGS, newFlags, TORRENT_COLUMN_UPSPEED, upRate, TORRENT_COLUMN_ETA, torrent_get_eta(t), TORRENT_COLUMN_UPLOADED, uploaded, TORRENT_COLUMN_DOWNLOADED, downloaded, TORRENT_COLUMN_TOTALSIZE, torrent_get_total_size(t), TORRENT_COLUMN_HAVE_UNCHECKED, torrent_get_have_unchecked(t), TORRENT_COLUMN_HAVE_VALID, haveValid, TORRENT_COLUMN_FROMPEX, peerfrom_get_pex(pf), TORRENT_COLUMN_FROMDHT, peerfrom_get_dht(pf), TORRENT_COLUMN_FROMTRACKERS, peerfrom_get_trackers(pf), TORRENT_COLUMN_FROMLTEP, peerfrom_get_ltep(pf), TORRENT_COLUMN_FROMRESUME, peerfrom_get_resume(pf), TORRENT_COLUMN_FROMINCOMING, peerfrom_get_incoming(pf), TORRENT_COLUMN_PEER_SOURCES, peerSources, TORRENT_COLUMN_PEERS_CONNECTED, torrent_get_peers_connected(t), TORRENT_COLUMN_PEERS_TO_US, torrent_get_peers_sending_to_us(t), TORRENT_COLUMN_PEERS_FROM_US, torrent_get_peers_getting_from_us(t), TORRENT_COLUMN_WEB_SEEDS_TO_US, torrent_get_web_seeds_sending_to_us(t), TORRENT_COLUMN_QUEUE_POSITION, torrent_get_queue_position(t), TORRENT_COLUMN_SEED_RATIO_LIMIT, torrent_get_seed_ratio_limit(t), TORRENT_COLUMN_SEED_RATIO_MODE, torrent_get_seed_ratio_mode(t), TORRENT_COLUMN_LASTACTIVE, torrent_get_activity_date(t), TORRENT_COLUMN_RATIO, uploaded > 0 && haveValid > 0 ? (double) uploaded / (double) haveValid : 0, TORRENT_COLUMN_DOWNLOADDIR, downloadDir, TORRENT_COLUMN_BANDWIDTH_PRIORITY, torrent_get_bandwidth_priority(t), TORRENT_COLUMN_ID, id, TORRENT_COLUMN_JSON, t, TORRENT_COLUMN_TRACKERHOST, firstTrackerHost ? firstTrackerHost : "", TORRENT_COLUMN_UPDATESERIAL, serial, -1); #endif if (!lastDownloadDir || g_strcmp0(downloadDir, lastDownloadDir)) { gchar *shortDownloadDir = shorten_download_dir(tc, downloadDir); gtk_list_store_set(ls, iter, TORRENT_COLUMN_DOWNLOADDIR_SHORT, shortDownloadDir, -1); g_free(shortDownloadDir); *whatsChanged |= TORRENT_UPDATE_PATH_CHANGE; } if (lastJson) json_object_unref(lastJson); if ((lastFlags & TORRENT_FLAG_DOWNLOADING) && (!(newFlags & TORRENT_FLAG_DOWNLOADING)) && (newFlags & TORRENT_FLAG_COMPLETE)) g_signal_emit(model, signals[TMODEL_TORRENT_COMPLETED], 0, iter); if (lastFlags != newFlags) *whatsChanged |= TORRENT_UPDATE_STATE_CHANGE; trg_torrent_model_count_peers(model, iter, t); if (firstTrackerHost) g_free(firstTrackerHost); if (peerSources) g_free(peerSources); g_free(lastDownloadDir); g_free(statusString); g_free(statusIcon); } TrgTorrentModel *trg_torrent_model_new(void) { return g_object_new(TRG_TYPE_TORRENT_MODEL, NULL); } struct TrgModelRemoveData { GList *toRemove; gint64 currentSerial; }; GHashTable *get_torrent_table(TrgTorrentModel * model) { TrgTorrentModelPrivate *priv = TRG_TORRENT_MODEL_GET_PRIVATE(model); return priv->ht; } static gboolean trg_model_find_removed_foreachfunc(GtkTreeModel * model, GtkTreePath * path G_GNUC_UNUSED, GtkTreeIter * iter, gpointer gdata) { struct TrgModelRemoveData *args = (struct TrgModelRemoveData *) gdata; gint64 rowSerial; gtk_tree_model_get(model, iter, TORRENT_COLUMN_UPDATESERIAL, &rowSerial, -1); if (rowSerial != args->currentSerial) { gint64 *id = g_new(gint64, 1); gtk_tree_model_get(model, iter, TORRENT_COLUMN_ID, id, -1); args->toRemove = g_list_append(args->toRemove, id); } return FALSE; } static GList *trg_torrent_model_find_removed(GtkTreeModel * model, gint64 currentSerial) { struct TrgModelRemoveData args; args.toRemove = NULL; args.currentSerial = currentSerial; gtk_tree_model_foreach(GTK_TREE_MODEL(model), trg_model_find_removed_foreachfunc, &args); return args.toRemove; } gboolean get_torrent_data(GHashTable * table, gint64 id, JsonObject ** t, GtkTreeIter * out_iter) { gpointer result = g_hash_table_lookup(table, &id); gboolean found = FALSE; if (result) { GtkTreeRowReference *rr = (GtkTreeRowReference *) result; GtkTreePath *path = gtk_tree_row_reference_get_path(rr); GtkTreeIter iter; if (path) { GtkTreeModel *model = gtk_tree_row_reference_get_model(rr); gtk_tree_model_get_iter(model, &iter, path); if (out_iter) *out_iter = iter; if (t) gtk_tree_model_get(model, &iter, TORRENT_COLUMN_JSON, t, -1); found = TRUE; gtk_tree_path_free(path); } } return found; } static void trg_torrent_model_stat_counts_clear(trg_torrent_model_update_stats * stats) { stats->count = stats->down = stats->error = stats->paused = stats->seeding = stats->complete = stats->incomplete = stats->active = stats->checking = stats->seed_wait = stats->down_wait = 0; } trg_torrent_model_update_stats *trg_torrent_model_update(TrgTorrentModel * model, TrgClient * tc, JsonObject * response, gint mode) { TrgTorrentModelPrivate *priv = TRG_TORRENT_MODEL_GET_PRIVATE(model); GList *torrentList; JsonObject *args, *t; GList *li; gint64 id; gint64 serial = trg_client_get_serial(tc); JsonArray *removedTorrents; GtkTreeIter iter; GtkTreePath *path; GtkTreeRowReference *rr; gpointer *result; guint whatsChanged = 0; gint64 rpcv = trg_client_get_rpc_version(tc); args = get_arguments(response); torrentList = json_array_get_elements(get_torrents(args)); priv->stats.downRateTotal = 0; priv->stats.upRateTotal = 0; for (li = torrentList; li; li = g_list_next(li)) { t = json_node_get_object((JsonNode *) li->data); id = torrent_get_id(t); result = mode == TORRENT_GET_MODE_FIRST ? NULL : g_hash_table_lookup(priv->ht, &id); if (!result) { gint64 *idCopy; gtk_list_store_append(GTK_LIST_STORE(model), &iter); whatsChanged |= TORRENT_UPDATE_ADDREMOVE; update_torrent_iter(model, tc, rpcv, serial, &iter, t, &(priv->stats), &whatsChanged); path = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &iter); rr = gtk_tree_row_reference_new(GTK_TREE_MODEL(model), path); idCopy = g_new(gint64, 1); *idCopy = id; g_hash_table_insert(priv->ht, idCopy, rr); gtk_tree_path_free(path); if (mode != TORRENT_GET_MODE_FIRST) g_signal_emit(model, signals[TMODEL_TORRENT_ADDED], 0, &iter); } else { path = gtk_tree_row_reference_get_path((GtkTreeRowReference *) result); if (path) { if (gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path)) { update_torrent_iter(model, tc, rpcv, serial, &iter, t, &(priv->stats), &whatsChanged); } gtk_tree_path_free(path); } } } g_list_free(torrentList); if (mode == TORRENT_GET_MODE_UPDATE) { GList *hitlist = trg_torrent_model_find_removed(GTK_TREE_MODEL(model), serial); if (hitlist) { for (li = hitlist; li; li = g_list_next(li)) { g_hash_table_remove(priv->ht, li->data); g_free(li->data); } whatsChanged |= TORRENT_UPDATE_ADDREMOVE; g_list_free(hitlist); } } else if (mode > TORRENT_GET_MODE_FIRST) { removedTorrents = get_torrents_removed(args); if (removedTorrents) { GList *hitlist = json_array_get_elements(removedTorrents); for (li = hitlist; li; li = g_list_next(li)) { id = json_node_get_int((JsonNode *) li->data); g_hash_table_remove(priv->ht, &id); whatsChanged |= TORRENT_UPDATE_ADDREMOVE; } g_list_free(hitlist); } } if (whatsChanged != 0) { if ((whatsChanged & TORRENT_UPDATE_ADDREMOVE) || (whatsChanged & TORRENT_UPDATE_STATE_CHANGE)) { trg_torrent_model_stat_counts_clear(&priv->stats); gtk_tree_model_foreach(GTK_TREE_MODEL(model), trg_torrent_model_stats_scan_foreachfunc, &(priv->stats)); } g_signal_emit(model, signals[TMODEL_STATE_CHANGED], 0, whatsChanged); } g_signal_emit(model, signals[TMODEL_UPDATE], 0); return &(priv->stats); } transmission-remote-gtk-1.4.1/src/trg-torrent-model.h000066400000000000000000000123671341276053300226640ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_TORRENT_MODEL_H_ #define TRG_TORRENT_MODEL_H_ #include #include #include "trg-client.h" G_BEGIN_DECLS #define TRG_TYPE_TORRENT_MODEL trg_torrent_model_get_type() #define TRG_TORRENT_MODEL(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_TORRENT_MODEL, TrgTorrentModel)) #define TRG_TORRENT_MODEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_TORRENT_MODEL, TrgTorrentModelClass)) #define TRG_IS_TORRENT_MODEL(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_TORRENT_MODEL)) #define TRG_IS_TORRENT_MODEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_TORRENT_MODEL)) #define TRG_TORRENT_MODEL_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_TORRENT_MODEL, TrgTorrentModelClass)) typedef struct { GtkListStore parent; } TrgTorrentModel; typedef struct { GtkListStoreClass parent_class; void (*torrent_completed) (TrgTorrentModel * model, GtkTreeIter * iter, gpointer data); void (*update) (TrgTorrentModel * model, gpointer data); void (*torrent_added) (TrgTorrentModel * model, GtkTreeIter * iter, gpointer data); void (*torrent_removed) (TrgTorrentModel * model, gpointer data); } TrgTorrentModelClass; typedef struct { gint64 downRateTotal; gint64 upRateTotal; gint seeding; gint down; gint paused; gint count; gint error; gint complete; gint incomplete; gint checking; gint active; gint seed_wait; gint down_wait; } trg_torrent_model_update_stats; #define TORRENT_UPDATE_STATE_CHANGE (1 << 0) #define TORRENT_UPDATE_PATH_CHANGE (1 << 1) #define TORRENT_UPDATE_ADDREMOVE (1 << 2) GType trg_torrent_model_get_type(void); TrgTorrentModel *trg_torrent_model_new(void); G_END_DECLS gboolean find_existing_peer_item(GtkListStore * model, JsonObject * p, GtkTreeIter * iter); trg_torrent_model_update_stats *trg_torrent_model_update(TrgTorrentModel * model, TrgClient * tc, JsonObject * response, gint mode); trg_torrent_model_update_stats *trg_torrent_model_get_stats(TrgTorrentModel * model); GHashTable *get_torrent_table(TrgTorrentModel * model); void trg_torrent_model_remove_all(TrgTorrentModel * model); gboolean trg_torrent_model_is_remove_in_progress(TrgTorrentModel * model); gboolean get_torrent_data(GHashTable * table, gint64 id, JsonObject ** t, GtkTreeIter * out_iter); gchar *shorten_download_dir(TrgClient * tc, const gchar * downloadDir); void trg_torrent_model_reload_dir_aliases(TrgClient * tc, GtkTreeModel * model); enum { TORRENT_COLUMN_ICON, TORRENT_COLUMN_NAME, TORRENT_COLUMN_SIZEWHENDONE, TORRENT_COLUMN_PERCENTDONE, TORRENT_COLUMN_METADATAPERCENTCOMPLETE, TORRENT_COLUMN_STATUS, TORRENT_COLUMN_SEEDS, TORRENT_COLUMN_LEECHERS, TORRENT_COLUMN_DOWNLOADS, TORRENT_COLUMN_PEERS_CONNECTED, TORRENT_COLUMN_PEERS_FROM_US, TORRENT_COLUMN_WEB_SEEDS_TO_US, TORRENT_COLUMN_PEERS_TO_US, TORRENT_COLUMN_DOWNSPEED, TORRENT_COLUMN_UPSPEED, TORRENT_COLUMN_ETA, TORRENT_COLUMN_UPLOADED, TORRENT_COLUMN_DOWNLOADED, TORRENT_COLUMN_TOTALSIZE, TORRENT_COLUMN_HAVE_UNCHECKED, TORRENT_COLUMN_HAVE_VALID, TORRENT_COLUMN_RATIO, TORRENT_COLUMN_ADDED, TORRENT_COLUMN_ID, TORRENT_COLUMN_JSON, TORRENT_COLUMN_UPDATESERIAL, TORRENT_COLUMN_FLAGS, TORRENT_COLUMN_DOWNLOADDIR, TORRENT_COLUMN_DOWNLOADDIR_SHORT, TORRENT_COLUMN_BANDWIDTH_PRIORITY, TORRENT_COLUMN_DONE_DATE, TORRENT_COLUMN_FROMPEX, TORRENT_COLUMN_FROMDHT, TORRENT_COLUMN_FROMTRACKERS, TORRENT_COLUMN_FROMLTEP, TORRENT_COLUMN_FROMRESUME, TORRENT_COLUMN_FROMINCOMING, TORRENT_COLUMN_PEER_SOURCES, TORRENT_COLUMN_TRACKERHOST, TORRENT_COLUMN_QUEUE_POSITION, TORRENT_COLUMN_LASTACTIVE, TORRENT_COLUMN_FILECOUNT, TORRENT_COLUMN_ERROR, TORRENT_COLUMN_SEED_RATIO_MODE, TORRENT_COLUMN_SEED_RATIO_LIMIT, TORRENT_COLUMN_COLUMNS }; #endif /* TRG_TORRENT_MODEL_H_ */ transmission-remote-gtk-1.4.1/src/trg-torrent-move-dialog.c000066400000000000000000000247061341276053300237620ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "trg-client.h" #include "trg-main-window.h" #include "trg-torrent-move-dialog.h" #include "trg-destination-combo.h" #include "hig.h" #include "torrent.h" #include "requests.h" G_DEFINE_TYPE(TrgTorrentMoveDialog, trg_torrent_move_dialog, GTK_TYPE_DIALOG) #define TRG_TORRENT_MOVE_DIALOG_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_TORRENT_MOVE_DIALOG, TrgTorrentMoveDialogPrivate)) typedef struct _TrgTorrentMoveDialogPrivate TrgTorrentMoveDialogPrivate; struct _TrgTorrentMoveDialogPrivate { TrgClient *client; TrgMainWindow *win; TrgTorrentTreeView *treeview; JsonArray *ids; GtkWidget *location_combo, *move_check, *move_button; }; enum { PROP_0, PROP_CLIENT, PROP_PARENT_WINDOW, PROP_TREEVIEW }; static void trg_torrent_move_response_cb(GtkDialog * dlg, gint res_id, gpointer data) { TrgTorrentMoveDialogPrivate *priv = TRG_TORRENT_MOVE_DIALOG_GET_PRIVATE(dlg); if (res_id == GTK_RESPONSE_ACCEPT) { gchar *location = trg_destination_combo_get_dir(TRG_DESTINATION_COMBO (priv->location_combo)); JsonNode *request = torrent_set_location(priv->ids, location, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->move_check))); g_free(location); trg_destination_combo_save_selection(TRG_DESTINATION_COMBO (priv->location_combo)); dispatch_async(priv->client, request, on_generic_interactive_action_response, data); } else { json_array_unref(priv->ids); } gtk_widget_destroy(GTK_WIDGET(dlg)); } static void location_changed(GtkComboBox * w, gpointer data) { TrgTorrentMoveDialogPrivate *priv = TRG_TORRENT_MOVE_DIALOG_GET_PRIVATE(data); gtk_widget_set_sensitive(priv->move_button, trg_destination_combo_has_text (TRG_DESTINATION_COMBO (priv->location_combo))); } static GObject *trg_torrent_move_dialog_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *object = G_OBJECT_CLASS (trg_torrent_move_dialog_parent_class)->constructor(type, n_construct_properties, construct_params); TrgTorrentMoveDialogPrivate *priv = TRG_TORRENT_MOVE_DIALOG_GET_PRIVATE(object); gint count; gchar *msg; GtkWidget *w, *t; guint row = 0; t = hig_workarea_create(); w = priv->location_combo = trg_destination_combo_new(priv->client, TRG_PREFS_KEY_LAST_MOVE_DESTINATION); g_signal_connect(w, "changed", G_CALLBACK(location_changed), object); hig_workarea_add_row(t, &row, _("Location:"), w, NULL); priv->move_check = hig_workarea_add_wide_checkbutton(t, &row, _("Move"), TRUE); gtk_window_set_destroy_with_parent(GTK_WINDOW(object), TRUE); gtk_dialog_add_button(GTK_DIALOG(object), GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL); priv->move_button = gtk_dialog_add_button(GTK_DIALOG(object), _("Move"), GTK_RESPONSE_ACCEPT); gtk_widget_set_sensitive(priv->move_button, trg_destination_combo_has_text (TRG_DESTINATION_COMBO (priv->location_combo))); gtk_container_set_border_width(GTK_CONTAINER(object), GUI_PAD); gtk_dialog_set_default_response(GTK_DIALOG(object), GTK_RESPONSE_ACCEPT); gtk_dialog_set_alternative_button_order(GTK_DIALOG(object), GTK_RESPONSE_ACCEPT, GTK_RESPONSE_CANCEL, -1); gtk_container_set_border_width(GTK_CONTAINER(t), GUI_PAD); gtk_box_pack_start(GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG(object))), t, TRUE, TRUE, 0); count = gtk_tree_selection_count_selected_rows(gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview))); priv->ids = build_json_id_array(priv->treeview); if (count == 1) { JsonObject *json; const gchar *name; get_torrent_data(trg_client_get_torrent_table(priv->client), trg_mw_get_selected_torrent_id(priv->win), &json, NULL); name = torrent_get_name(json); msg = g_strdup_printf(_("Move %s"), name); } else { msg = g_strdup_printf(_("Move %d torrents"), count); } gtk_window_set_transient_for(GTK_WINDOW(object), GTK_WINDOW(priv->win)); gtk_window_set_title(GTK_WINDOW(object), msg); g_signal_connect(G_OBJECT(object), "response", G_CALLBACK(trg_torrent_move_response_cb), priv->win); return object; } static void trg_torrent_move_dialog_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { TrgTorrentMoveDialogPrivate *priv = TRG_TORRENT_MOVE_DIALOG_GET_PRIVATE(object); switch (property_id) { case PROP_CLIENT: g_value_set_pointer(value, priv->client); break; case PROP_PARENT_WINDOW: g_value_set_object(value, priv->win); break; case PROP_TREEVIEW: g_value_set_object(value, priv->treeview); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_torrent_move_dialog_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgTorrentMoveDialogPrivate *priv = TRG_TORRENT_MOVE_DIALOG_GET_PRIVATE(object); switch (property_id) { case PROP_CLIENT: priv->client = g_value_get_pointer(value); break; case PROP_PARENT_WINDOW: priv->win = g_value_get_object(value); break; case PROP_TREEVIEW: priv->treeview = g_value_get_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void trg_torrent_move_dialog_class_init(TrgTorrentMoveDialogClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(TrgTorrentMoveDialogPrivate)); object_class->get_property = trg_torrent_move_dialog_get_property; object_class->set_property = trg_torrent_move_dialog_set_property; object_class->constructor = trg_torrent_move_dialog_constructor; g_object_class_install_property(object_class, PROP_TREEVIEW, g_param_spec_object ("torrent-tree-view", "TrgTorrentTreeView", "TrgTorrentTreeView", TRG_TYPE_TORRENT_TREE_VIEW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_PARENT_WINDOW, g_param_spec_object ("parent-window", "Parent window", "Parent window", TRG_TYPE_MAIN_WINDOW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_CLIENT, g_param_spec_pointer ("trg-client", "TClient", "Client", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } static void trg_torrent_move_dialog_init(TrgTorrentMoveDialog * self) { } TrgTorrentMoveDialog *trg_torrent_move_dialog_new(TrgMainWindow * win, TrgClient * client, TrgTorrentTreeView * ttv) { return g_object_new(TRG_TYPE_TORRENT_MOVE_DIALOG, "trg-client", client, "torrent-tree-view", ttv, "parent-window", win, NULL); } transmission-remote-gtk-1.4.1/src/trg-torrent-move-dialog.h000066400000000000000000000043341341276053300237620ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_TORRENT_MOVE_DIALOG_H_ #define TRG_TORRENT_MOVE_DIALOG_H_ #include #include #include "trg-client.h" #include "trg-main-window.h" G_BEGIN_DECLS #define TRG_TYPE_TORRENT_MOVE_DIALOG trg_torrent_move_dialog_get_type() #define TRG_TORRENT_MOVE_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_TORRENT_MOVE_DIALOG, TrgTorrentMoveDialog)) #define TRG_TORRENT_MOVE_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_TORRENT_MOVE_DIALOG, TrgTorrentMoveDialogClass)) #define TRG_IS_TORRENT_MOVE_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_TORRENT_MOVE_DIALOG)) #define TRG_IS_TORRENT_MOVE_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_TORRENT_MOVE_DIALOG)) #define TRG_TORRENT_MOVE_DIALOG_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_TORRENT_MOVE_DIALOG, TrgTorrentMoveDialogClass)) typedef struct { GtkDialog parent; } TrgTorrentMoveDialog; typedef struct { GtkDialogClass parent_class; } TrgTorrentMoveDialogClass; GType trg_torrent_move_dialog_get_type(void); TrgTorrentMoveDialog *trg_torrent_move_dialog_new(TrgMainWindow * win, TrgClient * client, TrgTorrentTreeView * ttv); G_END_DECLS #endif /* TRG_TORRENT_MOVE_DIALOG_H_ */ transmission-remote-gtk-1.4.1/src/trg-torrent-props-dialog.c000066400000000000000000000730731341276053300241600ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "util.h" #include "torrent.h" #include "json.h" #include "trg-client.h" #include "trg-json-widgets.h" #include "requests.h" #include "protocol-constants.h" #include "trg-peers-model.h" #include "trg-peers-tree-view.h" #include "trg-files-model.h" #include "trg-files-tree-view.h" #include "trg-trackers-model.h" #include "trg-trackers-tree-view.h" #include "trg-torrent-model.h" #include "trg-torrent-tree-view.h" #include "trg-torrent-props-dialog.h" #include "trg-main-window.h" #include "hig.h" /* Pretty similar to remote preferences, also using the widget creation functions * in trg-json-widgets.c. The torrent tree view is passed into here, which this * gets the selection from. If there are multiple selections, use the first to * populate the fields. * * Build the JSON array of torrent IDs when the dialog is created, in case the * selection changes before clicking OK. * * When the user clicks OK, use trg-json-widgets to populate an object with the * values and then send it with the IDs. */ G_DEFINE_TYPE(TrgTorrentPropsDialog, trg_torrent_props_dialog, GTK_TYPE_DIALOG) enum { PROP_0, PROP_TREEVIEW, PROP_TORRENT_MODEL, PROP_PARENT_WINDOW, PROP_CLIENT }; #define GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_TORRENT_PROPS_DIALOG, TrgTorrentPropsDialogPrivate)) typedef struct _TrgTorrentPropsDialogPrivate TrgTorrentPropsDialogPrivate; struct _TrgTorrentPropsDialogPrivate { TrgTorrentTreeView *tv; TrgTorrentModel *torrentModel; TrgClient *client; TrgMainWindow *parent; JsonArray *targetIds; GList *widgets; GtkWidget *bandwidthPriorityCombo, *seedRatioMode; TrgPeersTreeView *peersTv; TrgPeersModel *peersModel; TrgTrackersTreeView *trackersTv; TrgTrackersModel *trackersModel; TrgFilesTreeView *filesTv; TrgFilesModel *filesModel; JsonObject *lastJson; GtkWidget *size_lb; GtkWidget *have_lb; GtkWidget *dl_lb; GtkWidget *ul_lb; GtkWidget *state_lb; GtkWidget *date_started_lb; GtkWidget *eta_lb; GtkWidget *last_activity_lb; GtkWidget *error_lb; GtkWidget *destination_lb; GtkWidget *hash_lb; GtkWidget *privacy_lb; GtkWidget *origin_lb; GtkTextBuffer *comment_buffer; gboolean show_details; }; static void trg_torrent_props_dialog_set_property(GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec G_GNUC_UNUSED) { TrgTorrentPropsDialogPrivate *priv = GET_PRIVATE(object); switch (prop_id) { case PROP_PARENT_WINDOW: priv->parent = g_value_get_object(value); break; case PROP_TREEVIEW: priv->tv = g_value_get_object(value); break; case PROP_TORRENT_MODEL: priv->torrentModel = g_value_get_object(value); break; case PROP_CLIENT: priv->client = g_value_get_pointer(value); break; } } static void trg_torrent_props_dialog_get_property(GObject * object, guint prop_id, GValue * value, GParamSpec * pspec G_GNUC_UNUSED) { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); } static void trg_torrent_props_response_cb(GtkDialog * dialog, gint res_id, gpointer data G_GNUC_UNUSED) { TrgTorrentPropsDialogPrivate *priv = GET_PRIVATE(dialog); if (priv->show_details) { TrgPrefs *prefs = trg_client_get_prefs(priv->client); gint width, height; gtk_window_get_size(GTK_WINDOW(dialog), &width, &height); trg_prefs_set_int(prefs, "dialog-width", width, TRG_PREFS_GLOBAL); trg_prefs_set_int(prefs, "dialog-height", height, TRG_PREFS_GLOBAL); trg_tree_view_persist(TRG_TREE_VIEW(priv->peersTv), TRG_TREE_VIEW_PERSIST_SORT | TRG_TREE_VIEW_PERSIST_LAYOUT); trg_tree_view_persist(TRG_TREE_VIEW(priv->filesTv), TRG_TREE_VIEW_PERSIST_SORT | TRG_TREE_VIEW_PERSIST_LAYOUT); trg_tree_view_persist(TRG_TREE_VIEW(priv->trackersTv), TRG_TREE_VIEW_PERSIST_SORT | TRG_TREE_VIEW_PERSIST_LAYOUT); } if (res_id != GTK_RESPONSE_OK) { json_array_unref(priv->targetIds); } else { JsonNode *request = torrent_set(priv->targetIds); JsonObject *args = node_get_arguments(request); json_object_set_int_member(args, FIELD_SEED_RATIO_MODE, gtk_combo_box_get_active(GTK_COMBO_BOX (priv->seedRatioMode) )); json_object_set_int_member(args, FIELD_BANDWIDTH_PRIORITY, gtk_combo_box_get_active(GTK_COMBO_BOX (priv->bandwidthPriorityCombo) ) - 1); trg_json_widgets_save(priv->widgets, args); trg_json_widget_desc_list_free(priv->widgets); dispatch_async(priv->client, request, on_generic_interactive_action_response, priv->parent); } gtk_widget_destroy(GTK_WIDGET(dialog)); } static void seed_ratio_mode_changed_cb(GtkWidget * w, gpointer data) { gtk_widget_set_sensitive(GTK_WIDGET(data), gtk_combo_box_get_active(GTK_COMBO_BOX(w)) == 1 ? TRUE : FALSE); } static GtkWidget *info_page_new(TrgTorrentPropsDialog * dialog) { TrgTorrentPropsDialogPrivate *priv = GET_PRIVATE(dialog); guint row = 0; GtkTextBuffer *b; GtkWidget *l, *w, *fr, *sw; GtkWidget *t = hig_workarea_create(); hig_workarea_add_section_title(t, &row, _("Activity")); /* size */ l = priv->size_lb = gtk_label_new(NULL); gtk_label_set_single_line_mode(GTK_LABEL(l), TRUE); hig_workarea_add_row(t, &row, _("Torrent size:"), l, NULL); /* have */ l = priv->have_lb = gtk_label_new(NULL); gtk_label_set_single_line_mode(GTK_LABEL(l), TRUE); hig_workarea_add_row(t, &row, _("Have:"), l, NULL); /* downloaded */ l = priv->dl_lb = gtk_label_new(NULL); gtk_label_set_single_line_mode(GTK_LABEL(l), TRUE); hig_workarea_add_row(t, &row, _("Downloaded:"), l, NULL); /* uploaded */ l = priv->ul_lb = gtk_label_new(NULL); gtk_label_set_single_line_mode(GTK_LABEL(l), TRUE); hig_workarea_add_row(t, &row, _("Uploaded:"), l, NULL); /* state */ l = priv->state_lb = gtk_label_new(NULL); gtk_label_set_single_line_mode(GTK_LABEL(l), TRUE); hig_workarea_add_row(t, &row, _("State:"), l, NULL); /* running for */ l = priv->date_started_lb = gtk_label_new(NULL); gtk_label_set_single_line_mode(GTK_LABEL(l), TRUE); hig_workarea_add_row(t, &row, _("Running time:"), l, NULL); /* eta */ l = priv->eta_lb = gtk_label_new(NULL); gtk_label_set_single_line_mode(GTK_LABEL(l), TRUE); hig_workarea_add_row(t, &row, _("Remaining time:"), l, NULL); /* last activity */ l = priv->last_activity_lb = gtk_label_new(NULL); gtk_label_set_single_line_mode(GTK_LABEL(l), TRUE); hig_workarea_add_row(t, &row, _("Last activity:"), l, NULL); /* error */ l = g_object_new(GTK_TYPE_LABEL, "selectable", TRUE, "ellipsize", PANGO_ELLIPSIZE_END, NULL); hig_workarea_add_row(t, &row, _("Error:"), l, NULL); priv->error_lb = l; hig_workarea_add_section_divider(t, &row); hig_workarea_add_section_title(t, &row, _("Details")); /* destination */ l = g_object_new(GTK_TYPE_LABEL, "selectable", TRUE, "ellipsize", PANGO_ELLIPSIZE_END, NULL); hig_workarea_add_row(t, &row, _("Location:"), l, NULL); priv->destination_lb = l; /* hash */ l = g_object_new(GTK_TYPE_LABEL, "selectable", TRUE, "ellipsize", PANGO_ELLIPSIZE_END, NULL); hig_workarea_add_row(t, &row, _("Hash:"), l, NULL); priv->hash_lb = l; /* privacy */ l = gtk_label_new(NULL); gtk_label_set_single_line_mode(GTK_LABEL(l), TRUE); hig_workarea_add_row(t, &row, _("Privacy:"), l, NULL); priv->privacy_lb = l; /* origins */ l = g_object_new(GTK_TYPE_LABEL, "selectable", TRUE, "ellipsize", PANGO_ELLIPSIZE_END, NULL); hig_workarea_add_row(t, &row, _("Origin:"), l, NULL); priv->origin_lb = l; /* comment */ b = priv->comment_buffer = gtk_text_buffer_new(NULL); w = gtk_text_view_new_with_buffer(b); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(w), GTK_WRAP_WORD); gtk_text_view_set_editable(GTK_TEXT_VIEW(w), FALSE); sw = gtk_scrolled_window_new(NULL, NULL); gtk_widget_set_size_request(sw, 350, 36); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(sw), w); fr = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(fr), GTK_SHADOW_IN); gtk_container_add(GTK_CONTAINER(fr), sw); w = hig_workarea_add_tall_row(t, &row, _("Comment:"), fr, NULL); gtk_misc_set_alignment(GTK_MISC(w), 0.0f, 0.0f); hig_workarea_add_section_divider(t, &row); return t; } static void info_page_update(TrgTorrentPropsDialog * dialog, JsonObject * t, TrgTorrentModel * torrentModel, GtkTreeIter * iter) { TrgTorrentPropsDialogPrivate *priv = GET_PRIVATE(dialog); GtkTreeModel *model = GTK_TREE_MODEL(torrentModel); gint64 sizeWhenDone, haveValid, downloaded, uploaded, percentDone, eta, activityDate, error; gchar *statusString; guint flags; const gchar *str; char buf[512]; gtk_tree_model_get(model, iter, TORRENT_COLUMN_SIZEWHENDONE, &sizeWhenDone, TORRENT_COLUMN_UPLOADED, &uploaded, TORRENT_COLUMN_DOWNLOADED, &downloaded, TORRENT_COLUMN_HAVE_VALID, &haveValid, TORRENT_COLUMN_PERCENTDONE, &percentDone, TORRENT_COLUMN_ETA, &eta, TORRENT_COLUMN_LASTACTIVE, &activityDate, TORRENT_COLUMN_STATUS, &statusString, TORRENT_COLUMN_FLAGS, &flags, TORRENT_COLUMN_ERROR, &error, -1); if (torrent_get_is_private(t)) str = _("Private to this tracker -- DHT and PEX disabled"); else str = _("Public torrent"); gtk_label_set_text(GTK_LABEL(priv->privacy_lb), str); { const gchar *creator = torrent_get_creator(t); gint64 dateCreated = torrent_get_date_created(t); gchar *dateStr = epoch_to_string(dateCreated); if (creator && strlen(creator) > 0 && dateCreated > 0) g_snprintf(buf, sizeof(buf), _("Created by %1$s on %2$s"), creator, dateStr); else if (dateCreated > 0) g_snprintf(buf, sizeof(buf), _("Created on %1$s"), dateStr); else if (creator && strlen(creator) > 0) g_snprintf(buf, sizeof(buf), _("Created by %1$s"), creator); else g_strlcpy(buf, _("N/A"), sizeof(buf)); g_free(dateStr); gtk_label_set_text(GTK_LABEL(priv->origin_lb), buf); } gtk_text_buffer_set_text(priv->comment_buffer, torrent_get_comment(t), -1); gtk_label_set_text(GTK_LABEL(priv->destination_lb), torrent_get_download_dir(t)); gtk_label_set_text(GTK_LABEL(priv->state_lb), statusString); g_free(statusString); { gchar *addedStr = epoch_to_string(torrent_get_added_date(t)); gtk_label_set_text(GTK_LABEL(priv->date_started_lb), addedStr); g_free(addedStr); } /* eta */ if (eta > 0) { tr_strltime_long(buf, eta, sizeof(buf)); gtk_label_set_text(GTK_LABEL(priv->eta_lb), buf); } else { gtk_label_set_text(GTK_LABEL(priv->eta_lb), ""); } gtk_label_set_text(GTK_LABEL(priv->hash_lb), torrent_get_hash(t)); gtk_label_set_text(GTK_LABEL(priv->error_lb), error ? torrent_get_errorstr(t) : _("No errors")); if (flags & TORRENT_FLAG_ACTIVE) { gtk_label_set_text(GTK_LABEL(priv->last_activity_lb), _("Active now")); } else { gchar *activityStr = epoch_to_string(activityDate); gtk_label_set_text(GTK_LABEL(priv->last_activity_lb), activityStr); g_free(activityStr); } tr_strlsize(buf, sizeWhenDone, sizeof(buf)); gtk_label_set_text(GTK_LABEL(priv->size_lb), buf); tr_strlsize(buf, downloaded, sizeof(buf)); gtk_label_set_text(GTK_LABEL(priv->dl_lb), buf); tr_strlsize(buf, uploaded, sizeof(buf)); gtk_label_set_text(GTK_LABEL(priv->ul_lb), buf); tr_strlsize(buf, haveValid, sizeof(buf)); gtk_label_set_text(GTK_LABEL(priv->have_lb), buf); } static GtkWidget *trg_props_limits_page_new(TrgTorrentPropsDialog * win, JsonObject * json) { TrgTorrentPropsDialogPrivate *priv = GET_PRIVATE(win); GtkWidget *w, *tb, *t; guint row = 0; t = hig_workarea_create(); hig_workarea_add_section_title(t, &row, _("Bandwidth")); w = trg_json_widget_check_new(&priv->widgets, json, FIELD_HONORS_SESSION_LIMITS, _("Honor global limits"), NULL); hig_workarea_add_wide_control(t, &row, w); w = priv->bandwidthPriorityCombo = gtr_combo_box_new_enum(_("Low"), 0, _("Normal"), 1, _("High"), 2, NULL); gtk_combo_box_set_active(GTK_COMBO_BOX(w), torrent_get_bandwidth_priority(json) + 1); hig_workarea_add_row(t, &row, _("Torrent priority:"), w, NULL); if (json_object_has_member(json, FIELD_QUEUE_POSITION)) { w = trg_json_widget_spin_int_new(&priv->widgets, json, FIELD_QUEUE_POSITION, NULL, 0, INT_MAX, 1); hig_workarea_add_row(t, &row, _("Queue Position:"), w, w); } tb = trg_json_widget_check_new(&priv->widgets, json, FIELD_DOWNLOAD_LIMITED, _("Limit download speed (KiB/s)"), NULL); w = trg_json_widget_spin_int_new(&priv->widgets, json, FIELD_DOWNLOAD_LIMIT, tb, 0, INT_MAX, 1); hig_workarea_add_row_w(t, &row, tb, w, NULL); tb = trg_json_widget_check_new(&priv->widgets, json, FIELD_UPLOAD_LIMITED, _("Limit upload speed (KiB/s)"), NULL); w = trg_json_widget_spin_int_new(&priv->widgets, json, FIELD_UPLOAD_LIMIT, tb, 0, INT_MAX, 1); hig_workarea_add_row_w(t, &row, tb, w, NULL); hig_workarea_add_section_title(t, &row, _("Seeding")); w = priv->seedRatioMode = gtr_combo_box_new_enum(_("Use global settings"), 0, _("Stop seeding at ratio"), 1, _("Seed regardless of ratio"), 2, NULL); gtk_combo_box_set_active(GTK_COMBO_BOX(w), torrent_get_seed_ratio_mode(json)); hig_workarea_add_row(t, &row, _("Seed ratio mode:"), w, NULL); w = trg_json_widget_spin_double_new(&priv->widgets, json, FIELD_SEED_RATIO_LIMIT, NULL, 0, INT_MAX, 0.2); seed_ratio_mode_changed_cb(priv->seedRatioMode, w); g_signal_connect(G_OBJECT(priv->seedRatioMode), "changed", G_CALLBACK(seed_ratio_mode_changed_cb), w); hig_workarea_add_row(t, &row, _("Seed ratio limit:"), w, w); hig_workarea_add_section_title(t, &row, _("Peers")); w = trg_json_widget_spin_int_new(&priv->widgets, json, FIELD_PEER_LIMIT, NULL, 0, INT_MAX, 5); hig_workarea_add_row(t, &row, _("Peer limit:"), w, w); return t; } static void models_updated(TrgTorrentModel * model, gpointer data) { TrgTorrentPropsDialogPrivate *priv = GET_PRIVATE(data); GHashTable *ht = get_torrent_table(model); gint64 serial = trg_client_get_serial(priv->client); JsonObject *t = NULL; GtkTreeIter iter; gboolean exists = get_torrent_data(ht, json_array_get_int_element(priv-> targetIds, 0), &t, &iter); if (exists && priv->lastJson != t) { trg_files_model_update(priv->filesModel, GTK_TREE_VIEW(priv->filesTv), serial, t, TORRENT_GET_MODE_UPDATE); trg_peers_model_update(priv->peersModel, TRG_TREE_VIEW(priv->peersTv), serial, t, TORRENT_GET_MODE_UPDATE); trg_trackers_model_update(priv->trackersModel, serial, t, TORRENT_GET_MODE_UPDATE); info_page_update(TRG_TORRENT_PROPS_DIALOG(data), t, model, &iter); } gtk_widget_set_sensitive(GTK_WIDGET(priv->filesTv), exists); gtk_widget_set_sensitive(GTK_WIDGET(priv->trackersTv), exists); gtk_widget_set_sensitive(GTK_WIDGET(priv->peersTv), exists); priv->lastJson = t; } static GObject *trg_torrent_props_dialog_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *object = G_OBJECT_CLASS (trg_torrent_props_dialog_parent_class)->constructor(type, n_construct_properties, construct_params); TrgTorrentPropsDialog *propsDialog = TRG_TORRENT_PROPS_DIALOG(object); GtkWindow *window = GTK_WINDOW(object); TrgTorrentPropsDialogPrivate *priv = GET_PRIVATE(object); GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->tv)); gint rowCount = gtk_tree_selection_count_selected_rows(selection); TrgPrefs *prefs = trg_client_get_prefs(priv->client); priv->show_details = trg_prefs_get_int(prefs, TRG_PREFS_KEY_STYLE, TRG_PREFS_GLOBAL) != TRG_STYLE_CLASSIC && rowCount == 1; gint64 width, height; JsonObject *json; GtkTreeIter iter; GtkWidget *notebook, *contentvbox; get_torrent_data(trg_client_get_torrent_table(priv->client), trg_mw_get_selected_torrent_id(priv->parent), &json, &iter); priv->targetIds = build_json_id_array(priv->tv); if (rowCount > 1) { gchar *windowTitle = g_strdup_printf(_("Multiple (%d) torrent properties"), rowCount); gtk_window_set_title(window, windowTitle); g_free(windowTitle); } else if (rowCount == 1) { gtk_window_set_title(window, torrent_get_name(json)); } gtk_window_set_transient_for(window, GTK_WINDOW(priv->parent)); gtk_window_set_destroy_with_parent(window, TRUE); gtk_dialog_add_button(GTK_DIALOG(object), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); gtk_dialog_add_button(GTK_DIALOG(object), GTK_STOCK_OK, GTK_RESPONSE_OK); gtk_container_set_border_width(GTK_CONTAINER(object), GUI_PAD); gtk_dialog_set_default_response(GTK_DIALOG(object), GTK_RESPONSE_OK); g_signal_connect(G_OBJECT(object), "response", G_CALLBACK(trg_torrent_props_response_cb), NULL); notebook = gtk_notebook_new(); if (priv->show_details) { gint64 serial = trg_client_get_serial(priv->client); /* Information */ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), info_page_new(propsDialog), gtk_label_new(_("Information"))); info_page_update(propsDialog, json, priv->torrentModel, &iter); /* Files */ priv->filesModel = trg_files_model_new(); priv->filesTv = trg_files_tree_view_new(priv->filesModel, priv->parent, priv->client, "TrgFilesTreeView-dialog"); trg_files_model_update(priv->filesModel, GTK_TREE_VIEW(priv->filesTv), serial, json, TORRENT_GET_MODE_FIRST); gtk_widget_set_sensitive(GTK_WIDGET(priv->filesTv), TRUE); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), my_scrolledwin_new(GTK_WIDGET (priv->filesTv)), gtk_label_new(_("Files"))); /* Peers */ priv->peersModel = trg_peers_model_new(); priv->peersTv = trg_peers_tree_view_new(prefs, priv->peersModel, "TrgPeersTreeView-dialog"); trg_peers_model_update(priv->peersModel, TRG_TREE_VIEW(priv->peersTv), serial, json, TORRENT_GET_MODE_FIRST); gtk_widget_set_sensitive(GTK_WIDGET(priv->peersTv), TRUE); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), my_scrolledwin_new(GTK_WIDGET (priv->peersTv)), gtk_label_new(_("Peers"))); /* Trackers */ priv->trackersModel = trg_trackers_model_new(); priv->trackersTv = trg_trackers_tree_view_new(priv->trackersModel, priv->client, priv->parent, "TrgTrackersTreeView-dialog"); trg_trackers_tree_view_new_connection(priv->trackersTv, priv->client); trg_trackers_model_update(priv->trackersModel, serial, json, TORRENT_GET_MODE_FIRST); gtk_widget_set_sensitive(GTK_WIDGET(priv->trackersTv), TRUE); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), my_scrolledwin_new(GTK_WIDGET (priv->trackersTv)), gtk_label_new(_("Trackers"))); g_object_unref(priv->trackersModel); g_object_unref(priv->filesModel); g_object_unref(priv->peersModel); g_signal_connect_object(priv->torrentModel, "update", G_CALLBACK (models_updated), object, G_CONNECT_AFTER); priv->lastJson = json; } gtk_notebook_append_page(GTK_NOTEBOOK(notebook), trg_props_limits_page_new(propsDialog, json), gtk_label_new(_("Limits"))); gtk_container_set_border_width(GTK_CONTAINER(notebook), GUI_PAD); contentvbox = gtk_dialog_get_content_area(GTK_DIALOG(object)); gtk_box_pack_start(GTK_BOX(contentvbox), notebook, TRUE, TRUE, 0); if (priv->show_details) { TrgPrefs *prefs = trg_client_get_prefs(priv->client); if ((width = trg_prefs_get_int(prefs, "dialog-width", TRG_PREFS_GLOBAL)) <= 0 || (height = trg_prefs_get_int(prefs, "dialog-height", TRG_PREFS_GLOBAL)) <= 0) { width = 700; height = 600; } } else { width = height = 500; } gtk_window_set_default_size(window, width, height); return object; } static void trg_torrent_props_dialog_class_init(TrgTorrentPropsDialogClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->constructor = trg_torrent_props_dialog_constructor; object_class->set_property = trg_torrent_props_dialog_set_property; object_class->get_property = trg_torrent_props_dialog_get_property; g_type_class_add_private(klass, sizeof(TrgTorrentPropsDialogPrivate)); g_object_class_install_property(object_class, PROP_TREEVIEW, g_param_spec_object ("torrent-tree-view", "TrgTorrentTreeView", "TrgTorrentTreeView", TRG_TYPE_TORRENT_TREE_VIEW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_TORRENT_MODEL, g_param_spec_object("torrent-model", "TrgTorrentModel", "TrgTorrentModel", TRG_TYPE_TORRENT_MODEL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_PARENT_WINDOW, g_param_spec_object("parent-window", "Parent window", "Parent window", TRG_TYPE_MAIN_WINDOW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_CLIENT, g_param_spec_pointer("trg-client", "TClient", "Client", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } static void trg_torrent_props_dialog_init(TrgTorrentPropsDialog * self G_GNUC_UNUSED) { } TrgTorrentPropsDialog *trg_torrent_props_dialog_new(GtkWindow * window, TrgTorrentTreeView * treeview, TrgTorrentModel * torrentModel, TrgClient * client) { return g_object_new(TRG_TYPE_TORRENT_PROPS_DIALOG, "torrent-tree-view", treeview, "torrent-model", torrentModel, "parent-window", window, "trg-client", client, NULL); } transmission-remote-gtk-1.4.1/src/trg-torrent-props-dialog.h000066400000000000000000000045661341276053300241660ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_TORRENT_PROPS_DIALOG_H_ #define TRG_TORRENT_PROPS_DIALOG_H_ #include #include "trg-torrent-tree-view.h" #include "trg-client.h" G_BEGIN_DECLS #define TRG_TYPE_TORRENT_PROPS_DIALOG trg_torrent_props_dialog_get_type() #define TRG_TORRENT_PROPS_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_TORRENT_PROPS_DIALOG, TrgTorrentPropsDialog)) #define TRG_TORRENT_PROPS_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_TORRENT_PROPS_DIALOG, TrgTorrentPropsDialogClass)) #define TRG_IS_TORRENT_PROPS_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_TORRENT_PROPS_DIALOG)) #define TRG_IS_TORRENT_PROPS_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_TORRENT_PROPS_DIALOG)) #define TRG_TORRENT_PROPS_DIALOG_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_TORRENT_PROPS_DIALOG, TrgTorrentPropsDialogClass)) typedef struct { GtkDialog parent; } TrgTorrentPropsDialog; typedef struct { GtkDialogClass parent_class; } TrgTorrentPropsDialogClass; GType trg_torrent_props_dialog_get_type(void); TrgTorrentPropsDialog *trg_torrent_props_dialog_new(GtkWindow * window, TrgTorrentTreeView * treeview, TrgTorrentModel * torrentModel, TrgClient * client); G_END_DECLS #endif /* TRG_TORRENT_PROPS_DIALOG_H_ */ transmission-remote-gtk-1.4.1/src/trg-torrent-tree-view.c000066400000000000000000000373011341276053300234610ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "trg-prefs.h" #include "trg-tree-view.h" #include "trg-torrent-model.h" #include "torrent-cell-renderer.h" #include "trg-torrent-tree-view.h" G_DEFINE_TYPE(TrgTorrentTreeView, trg_torrent_tree_view, TRG_TYPE_TREE_VIEW) #define GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_TORRENT_TREE_VIEW, TrgTorrentTreeViewPrivate)) typedef struct _TrgTorrentTreeViewPrivate TrgTorrentTreeViewPrivate; struct _TrgTorrentTreeViewPrivate { TrgClient *client; }; static void trg_torrent_tree_view_class_init(TrgTorrentTreeViewClass * klass G_GNUC_UNUSED) { g_type_class_add_private(klass, sizeof(TrgTorrentTreeViewPrivate)); } static void trg_torrent_tree_view_init(TrgTorrentTreeView * tttv) { TrgTreeView *ttv = TRG_TREE_VIEW(tttv); trg_column_description *desc; desc = trg_tree_view_reg_column(ttv, TRG_COLTYPE_ICONTEXT, TORRENT_COLUMN_NAME, _("Name"), "name", 0); desc->model_column_extra = TORRENT_COLUMN_ICON; trg_tree_view_reg_column(ttv, TRG_COLTYPE_SIZE, TORRENT_COLUMN_SIZEWHENDONE, _("Size"), "size", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_PROG, TORRENT_COLUMN_PERCENTDONE, _("Done"), "done", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, TORRENT_COLUMN_STATUS, _("Status"), "status", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TORRENT_COLUMN_SEEDS, _("Seeds"), "seeds", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TORRENT_COLUMN_PEERS_TO_US, _("Sending"), "sending", TRG_COLUMN_EXTRA); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TORRENT_COLUMN_LEECHERS, _("Leechers"), "leechers", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TORRENT_COLUMN_DOWNLOADS, _("Downloads"), "downloads", TRG_COLUMN_EXTRA); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TORRENT_COLUMN_PEERS_FROM_US, _("Receiving"), "connected-leechers", TRG_COLUMN_EXTRA); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TORRENT_COLUMN_PEERS_CONNECTED, _("Connected"), "connected-peers", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TORRENT_COLUMN_FROMPEX, _("PEX Peers"), "from-pex", TRG_COLUMN_EXTRA | TRG_COLUMN_HIDE_FROM_TOP_MENU); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TORRENT_COLUMN_FROMDHT, _("DHT Peers"), "from-dht", TRG_COLUMN_EXTRA | TRG_COLUMN_HIDE_FROM_TOP_MENU); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TORRENT_COLUMN_FROMTRACKERS, _("Tracker Peers"), "from-trackers", TRG_COLUMN_EXTRA | TRG_COLUMN_HIDE_FROM_TOP_MENU); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TORRENT_COLUMN_FROMLTEP, _("LTEP Peers"), "from-ltep", TRG_COLUMN_EXTRA | TRG_COLUMN_HIDE_FROM_TOP_MENU); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TORRENT_COLUMN_FROMRESUME, _("Resumed Peers"), "from-resume", TRG_COLUMN_EXTRA | TRG_COLUMN_HIDE_FROM_TOP_MENU); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TORRENT_COLUMN_FROMINCOMING, _("Incoming Peers"), "from-incoming", TRG_COLUMN_EXTRA | TRG_COLUMN_HIDE_FROM_TOP_MENU); trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, TORRENT_COLUMN_PEER_SOURCES, _("Peers T/I/E/H/X/L/R"), "peer-sources", TRG_COLUMN_EXTRA | TRG_COLUMN_HIDE_FROM_TOP_MENU); trg_tree_view_reg_column(ttv, TRG_COLTYPE_SPEED, TORRENT_COLUMN_DOWNSPEED, _("Down Speed"), "down-speed", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_SPEED, TORRENT_COLUMN_UPSPEED, _("Up Speed"), "up-speed", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_ETA, TORRENT_COLUMN_ETA, _("ETA"), "eta", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_SIZE, TORRENT_COLUMN_UPLOADED, _("Uploaded"), "uploaded", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_SIZE, TORRENT_COLUMN_DOWNLOADED, _("Downloaded"), "downloaded", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_RATIO, TORRENT_COLUMN_RATIO, _("Ratio"), "ratio", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_EPOCH, TORRENT_COLUMN_ADDED, _("Added"), "added", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, TORRENT_COLUMN_TRACKERHOST, _("First Tracker"), "first-tracker", TRG_COLUMN_EXTRA); trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, TORRENT_COLUMN_DOWNLOADDIR, _("Location"), "download-dir", TRG_COLUMN_EXTRA); trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, TORRENT_COLUMN_ID, _("ID"), "id", TRG_COLUMN_EXTRA); trg_tree_view_reg_column(ttv, TRG_COLTYPE_PRIO, TORRENT_COLUMN_BANDWIDTH_PRIORITY, _("Priority"), "priority", TRG_COLUMN_EXTRA); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTEQZERO, TORRENT_COLUMN_QUEUE_POSITION, _("Queue Position"), "queue-position", TRG_COLUMN_EXTRA); trg_tree_view_reg_column(ttv, TRG_COLTYPE_EPOCH, TORRENT_COLUMN_DONE_DATE, _("Completed"), "done-date", TRG_COLUMN_EXTRA); trg_tree_view_reg_column(ttv, TRG_COLTYPE_EPOCH, TORRENT_COLUMN_LASTACTIVE, _("Last Active"), "last-active", TRG_COLUMN_EXTRA); gtk_tree_view_set_search_column(GTK_TREE_VIEW(tttv), TORRENT_COLUMN_NAME); } static void trg_torrent_model_get_json_id_array_foreach(GtkTreeModel * model, GtkTreePath * path G_GNUC_UNUSED, GtkTreeIter * iter, gpointer data) { JsonArray *output = (JsonArray *) data; gint64 id; gtk_tree_model_get(model, iter, TORRENT_COLUMN_ID, &id, -1); json_array_add_int_element(output, id); } JsonArray *build_json_id_array(TrgTorrentTreeView * tv) { GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); JsonArray *ids = json_array_new(); gtk_tree_selection_selected_foreach(selection, (GtkTreeSelectionForeachFunc) trg_torrent_model_get_json_id_array_foreach, ids); return ids; } static void setup_classic_layout(TrgTorrentTreeView * tv) { gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(tv), TRUE); gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(tv), TRUE); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tv), TRUE); trg_tree_view_setup_columns(TRG_TREE_VIEW(tv)); } static void trg_torrent_tree_view_renderer_pref_changed(TrgPrefs * p, const gchar * updatedKey, gpointer data) { if (!g_strcmp0(updatedKey, TRG_PREFS_KEY_STYLE)) { GtkTreeView *tv = torrent_cell_renderer_get_owner(TORRENT_CELL_RENDERER(data)); gboolean compact = trg_prefs_get_int(p, TRG_PREFS_KEY_STYLE, TRG_PREFS_GLOBAL) == TRG_STYLE_TR_COMPACT; g_object_set(G_OBJECT(data), "compact", GINT_TO_POINTER(compact), NULL); g_signal_emit_by_name(tv, "style-updated", NULL, NULL); } } static void setup_transmission_layout(TrgTorrentTreeView * tv, gint64 style) { TrgTorrentTreeViewPrivate *priv = GET_PRIVATE(tv); GtkCellRenderer *renderer = torrent_cell_renderer_new(); TrgPrefs *prefs = trg_client_get_prefs(priv->client); GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes("", renderer, "status", TORRENT_COLUMN_FLAGS, "error", TORRENT_COLUMN_ERROR, "fileCount", TORRENT_COLUMN_FILECOUNT, "totalSize", TORRENT_COLUMN_TOTALSIZE, "ratio", TORRENT_COLUMN_RATIO, "downloaded", TORRENT_COLUMN_DOWNLOADED, "haveValid", TORRENT_COLUMN_HAVE_VALID, "sizeWhenDone", TORRENT_COLUMN_SIZEWHENDONE, "uploaded", TORRENT_COLUMN_UPLOADED, "percentComplete", TORRENT_COLUMN_PERCENTDONE, "metadataPercentComplete", TORRENT_COLUMN_METADATAPERCENTCOMPLETE, "upSpeed", TORRENT_COLUMN_UPSPEED, "downSpeed", TORRENT_COLUMN_DOWNSPEED, "peersToUs", TORRENT_COLUMN_PEERS_TO_US, "peersGettingFromUs", TORRENT_COLUMN_PEERS_FROM_US, "webSeedsToUs", TORRENT_COLUMN_WEB_SEEDS_TO_US, "eta", TORRENT_COLUMN_ETA, "json", TORRENT_COLUMN_JSON, "seedRatioMode", TORRENT_COLUMN_SEED_RATIO_MODE, "seedRatioLimit", TORRENT_COLUMN_SEED_RATIO_LIMIT, "connected", TORRENT_COLUMN_PEERS_CONNECTED, NULL); g_object_set(G_OBJECT(renderer), "client", priv->client, "owner", tv, "compact", style == TRG_STYLE_TR_COMPACT, NULL); g_signal_connect_object(prefs, "pref-changed", G_CALLBACK (trg_torrent_tree_view_renderer_pref_changed), renderer, G_CONNECT_AFTER); gtk_tree_view_column_set_resizable(column, FALSE); gtk_tree_view_column_set_reorderable(column, FALSE); gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(tv), FALSE); gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(tv), FALSE); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tv), FALSE); gtk_tree_view_column_set_sort_column_id(column, TORRENT_COLUMN_NAME); gtk_tree_view_append_column(GTK_TREE_VIEW(tv), column); } static void trg_torrent_tree_view_pref_changed(TrgPrefs * p, const gchar * updatedKey, gpointer data) { if (!g_strcmp0(updatedKey, TRG_PREFS_KEY_STYLE)) { TrgTorrentTreeViewPrivate *priv = GET_PRIVATE(data); TrgPrefs *prefs = trg_client_get_prefs(priv->client); trg_tree_view_remove_all_columns(TRG_TREE_VIEW(data)); if (trg_prefs_get_int(p, TRG_PREFS_KEY_STYLE, TRG_PREFS_GLOBAL) == TRG_STYLE_CLASSIC) setup_classic_layout(TRG_TORRENT_TREE_VIEW(data)); else setup_transmission_layout(TRG_TORRENT_TREE_VIEW(data), trg_prefs_get_int(prefs, TRG_PREFS_KEY_STYLE, TRG_PREFS_GLOBAL)); } } TrgTorrentTreeView *trg_torrent_tree_view_new(TrgClient * tc, GtkTreeModel * model) { GObject *obj = g_object_new(TRG_TYPE_TORRENT_TREE_VIEW, NULL); TrgTorrentTreeViewPrivate *priv = GET_PRIVATE(obj); TrgPrefs *prefs = trg_client_get_prefs(tc); gint64 style = trg_prefs_get_int(prefs, TRG_PREFS_KEY_STYLE, TRG_PREFS_GLOBAL); trg_tree_view_set_prefs(TRG_TREE_VIEW(obj), trg_client_get_prefs(tc)); gtk_tree_view_set_model(GTK_TREE_VIEW(obj), model); priv->client = tc; if (style == TRG_STYLE_CLASSIC) { setup_classic_layout(TRG_TORRENT_TREE_VIEW(obj)); } else { setup_transmission_layout(TRG_TORRENT_TREE_VIEW(obj), style); } g_signal_connect(prefs, "pref-changed", G_CALLBACK(trg_torrent_tree_view_pref_changed), obj); trg_tree_view_restore_sort(TRG_TREE_VIEW(obj), TRG_TREE_VIEW_SORTABLE_PARENT); return TRG_TORRENT_TREE_VIEW(obj); } transmission-remote-gtk-1.4.1/src/trg-torrent-tree-view.h000066400000000000000000000042611341276053300234650ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _TRG_TORRENT_TREE_VIEW_H_ #define _TRG_TORRENT_TREE_VIEW_H_ #include #include #include "trg-prefs.h" #include "trg-torrent-model.h" #include "trg-tree-view.h" #include "trg-state-selector.h" G_BEGIN_DECLS #define TRG_TYPE_TORRENT_TREE_VIEW trg_torrent_tree_view_get_type() #define TRG_TORRENT_TREE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_TORRENT_TREE_VIEW, TrgTorrentTreeView)) #define TRG_TORRENT_TREE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_TORRENT_TREE_VIEW, TrgTorrentTreeViewClass)) #define TRG_IS_TORRENT_TREE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_TORRENT_TREE_VIEW)) #define TRG_IS_TORRENT_TREE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_TORRENT_TREE_VIEW)) #define TRG_TORRENT_TREE_VIEW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_TORRENT_TREE_VIEW, TrgTorrentTreeViewClass)) typedef struct { TrgTreeView parent; } TrgTorrentTreeView; typedef struct { TrgTreeViewClass parent_class; } TrgTorrentTreeViewClass; GType trg_torrent_tree_view_get_type(void); TrgTorrentTreeView *trg_torrent_tree_view_new(TrgClient * tc, GtkTreeModel * model); JsonArray *build_json_id_array(TrgTorrentTreeView * tv); G_END_DECLS #endif /* _TRG_TORRENT_TREE_VIEW_H_ */ transmission-remote-gtk-1.4.1/src/trg-trackers-model.c000066400000000000000000000201201341276053300227620ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "config.h" #include "torrent.h" #include "trg-client.h" #include "trg-model.h" #include "trg-trackers-model.h" G_DEFINE_TYPE(TrgTrackersModel, trg_trackers_model, GTK_TYPE_LIST_STORE) #define TRG_TRACKERS_MODEL_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_TRACKERS_MODEL, TrgTrackersModelPrivate)) typedef struct _TrgTrackersModelPrivate TrgTrackersModelPrivate; struct _TrgTrackersModelPrivate { gint64 torrentId; gint64 accept; }; void trg_trackers_model_set_no_selection(TrgTrackersModel * model) { TrgTrackersModelPrivate *priv = TRG_TRACKERS_MODEL_GET_PRIVATE(model); priv->torrentId = -1; } gint64 trg_trackers_model_get_torrent_id(TrgTrackersModel * model) { TrgTrackersModelPrivate *priv = TRG_TRACKERS_MODEL_GET_PRIVATE(model); return priv->torrentId; } void trg_trackers_model_update(TrgTrackersModel * model, gint64 updateSerial, JsonObject * t, gint mode) { TrgTrackersModelPrivate *priv = TRG_TRACKERS_MODEL_GET_PRIVATE(model); GtkTreeIter trackIter; JsonObject *tracker; gint64 trackerId; GList *trackers, *li; const gchar *announce; const gchar *scrape; if (mode == TORRENT_GET_MODE_FIRST) { gtk_list_store_clear(GTK_LIST_STORE(model)); priv->torrentId = torrent_get_id(t); priv->accept = TRUE; } else if (!priv->accept) { return; } trackers = json_array_get_elements(torrent_get_tracker_stats(t)); for (li = trackers; li; li = g_list_next(li)) { tracker = json_node_get_object((JsonNode *) li->data); trackerId = tracker_stats_get_id(tracker); announce = tracker_stats_get_announce(tracker); scrape = tracker_stats_get_scrape(tracker); if (mode == TORRENT_GET_MODE_FIRST || find_existing_model_item(GTK_TREE_MODEL(model), TRACKERCOL_ID, trackerId, &trackIter) == FALSE) gtk_list_store_append(GTK_LIST_STORE(model), &trackIter); #ifdef DEBUG gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_ICON, "network-workgroup", -1); gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_TIER, tracker_stats_get_tier(tracker), -1); gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_ANNOUNCE, announce, -1); gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_SCRAPE, scrape, -1); gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_ID, trackerId, -1); gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_UPDATESERIAL, updateSerial, -1); gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_LAST_ANNOUNCE_RESULT, tracker_stats_get_announce_result(tracker), -1); gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_LAST_ANNOUNCE_TIME, tracker_stats_get_last_announce_time(tracker), -1); gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_LAST_SCRAPE_TIME, tracker_stats_get_last_scrape_time(tracker), -1); gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_HOST, tracker_stats_get_host(tracker), -1); gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_LAST_ANNOUNCE_PEER_COUNT, tracker_stats_get_last_announce_peer_count (tracker), -1); gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_LEECHERCOUNT, tracker_stats_get_leecher_count(tracker), -1); gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_SEEDERCOUNT, tracker_stats_get_seeder_count(tracker), -1); #else gtk_list_store_set(GTK_LIST_STORE(model), &trackIter, TRACKERCOL_ICON, "network-workgroup", TRACKERCOL_ID, trackerId, TRACKERCOL_UPDATESERIAL, updateSerial, TRACKERCOL_TIER, tracker_stats_get_tier(tracker), TRACKERCOL_ANNOUNCE, announce, TRACKERCOL_SCRAPE, scrape, TRACKERCOL_HOST, tracker_stats_get_host(tracker), TRACKERCOL_LAST_ANNOUNCE_RESULT, tracker_stats_get_announce_result(tracker), TRACKERCOL_LAST_ANNOUNCE_TIME, tracker_stats_get_last_announce_time(tracker), TRACKERCOL_LAST_SCRAPE_TIME, tracker_stats_get_last_scrape_time(tracker), TRACKERCOL_LAST_ANNOUNCE_PEER_COUNT, tracker_stats_get_last_announce_peer_count (tracker), TRACKERCOL_LEECHERCOUNT, tracker_stats_get_leecher_count(tracker), TRACKERCOL_SEEDERCOUNT, tracker_stats_get_seeder_count(tracker), -1); #endif } g_list_free(trackers); trg_model_remove_removed(GTK_LIST_STORE(model), TRACKERCOL_UPDATESERIAL, updateSerial); } static void trg_trackers_model_class_init(TrgTrackersModelClass * klass) { g_type_class_add_private(klass, sizeof(TrgTrackersModelPrivate)); } void trg_trackers_model_set_accept(TrgTrackersModel * model, gboolean accept) { TrgTrackersModelPrivate *priv = TRG_TRACKERS_MODEL_GET_PRIVATE(model); priv->accept = accept; } static void trg_trackers_model_init(TrgTrackersModel * self) { TrgTrackersModelPrivate *priv = TRG_TRACKERS_MODEL_GET_PRIVATE(self); GType column_types[TRACKERCOL_COLUMNS]; column_types[TRACKERCOL_ICON] = G_TYPE_STRING; column_types[TRACKERCOL_TIER] = G_TYPE_INT64; column_types[TRACKERCOL_ANNOUNCE] = G_TYPE_STRING; column_types[TRACKERCOL_SCRAPE] = G_TYPE_STRING; column_types[TRACKERCOL_ID] = G_TYPE_INT64; column_types[TRACKERCOL_LAST_ANNOUNCE_PEER_COUNT] = G_TYPE_INT64; column_types[TRACKERCOL_LAST_ANNOUNCE_TIME] = G_TYPE_INT64; column_types[TRACKERCOL_LAST_SCRAPE_TIME] = G_TYPE_INT64; column_types[TRACKERCOL_SEEDERCOUNT] = G_TYPE_INT64; column_types[TRACKERCOL_LEECHERCOUNT] = G_TYPE_INT64; column_types[TRACKERCOL_HOST] = G_TYPE_STRING; column_types[TRACKERCOL_LAST_ANNOUNCE_RESULT] = G_TYPE_STRING; column_types[TRACKERCOL_UPDATESERIAL] = G_TYPE_INT64; priv->accept = TRUE; priv->torrentId = -1; gtk_list_store_set_column_types(GTK_LIST_STORE(self), TRACKERCOL_COLUMNS, column_types); } TrgTrackersModel *trg_trackers_model_new(void) { return g_object_new(TRG_TYPE_TRACKERS_MODEL, NULL); } transmission-remote-gtk-1.4.1/src/trg-trackers-model.h000066400000000000000000000065431341276053300230040ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_TRACKERS_MODEL_H_ #define TRG_TRACKERS_MODEL_H_ #include #include G_BEGIN_DECLS #define TRG_TYPE_TRACKERS_MODEL trg_trackers_model_get_type() #define TRG_TRACKERS_MODEL(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_TRACKERS_MODEL, TrgTrackersModel)) #define TRG_TRACKERS_MODEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_TRACKERS_MODEL, TrgTrackersModelClass)) #define TRG_IS_TRACKERS_MODEL(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_TRACKERS_MODEL)) #define TRG_IS_TRACKERS_MODEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_TRACKERS_MODEL)) #define TRG_TRACKERS_MODEL_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_TRACKERS_MODEL, TrgTrackersModelClass)) typedef struct { GtkListStore parent; } TrgTrackersModel; typedef struct { GtkListStoreClass parent_class; } TrgTrackersModelClass; GType trg_trackers_model_get_type(void); TrgTrackersModel *trg_trackers_model_new(void); G_END_DECLS void trg_trackers_model_update(TrgTrackersModel * model, gint64 updateSerial, JsonObject * t, gint mode); void trg_trackers_model_set_accept(TrgTrackersModel * model, gboolean accept); gint64 trg_trackers_model_get_torrent_id(TrgTrackersModel * model); void trg_trackers_model_set_no_selection(TrgTrackersModel * model); typedef enum { /* we won't (announce,scrape) this torrent to this tracker because * the torrent is stopped, or because of an error, or whatever */ TR_TRACKER_INACTIVE = 0, /* we will (announce,scrape) this torrent to this tracker, and are * waiting for enough time to pass to satisfy the tracker's interval */ TR_TRACKER_WAITING = 1, /* it's time to (announce,scrape) this torrent, and we're waiting on a * a free slot to open up in the announce manager */ TR_TRACKER_QUEUED = 2, /* we're (announcing,scraping) this torrent right now */ TR_TRACKER_ACTIVE = 3 } tr_tracker_state; enum { /* trackers */ TRACKERCOL_ICON, TRACKERCOL_TIER, TRACKERCOL_ANNOUNCE, TRACKERCOL_SCRAPE, TRACKERCOL_ID, /* trackerstats */ TRACKERCOL_LAST_ANNOUNCE_PEER_COUNT, TRACKERCOL_LAST_ANNOUNCE_TIME, TRACKERCOL_LAST_SCRAPE_TIME, TRACKERCOL_SEEDERCOUNT, TRACKERCOL_LEECHERCOUNT, TRACKERCOL_HOST, TRACKERCOL_LAST_ANNOUNCE_RESULT, /* other */ TRACKERCOL_UPDATESERIAL, TRACKERCOL_COLUMNS }; #endif /* TRG_TRACKERS_MODEL_H_ */ transmission-remote-gtk-1.4.1/src/trg-trackers-tree-view.c000066400000000000000000000337431341276053300236100ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "trg-prefs.h" #include "trg-trackers-tree-view.h" #include "trg-tree-view.h" #include "trg-client.h" #include "trg-menu-bar.h" #include "requests.h" #include "json.h" #include "trg-trackers-model.h" #include "trg-main-window.h" G_DEFINE_TYPE(TrgTrackersTreeView, trg_trackers_tree_view, TRG_TYPE_TREE_VIEW) #define TRG_TRACKERS_TREE_VIEW_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_TRACKERS_TREE_VIEW, TrgTrackersTreeViewPrivate)) typedef struct _TrgTrackersTreeViewPrivate TrgTrackersTreeViewPrivate; struct _TrgTrackersTreeViewPrivate { TrgClient *client; GtkCellRenderer *announceRenderer; GtkTreeViewColumn *announceColumn; TrgMainWindow *win; }; static void trg_trackers_tree_view_class_init(TrgTrackersTreeViewClass * klass) { g_type_class_add_private(klass, sizeof(TrgTrackersTreeViewPrivate)); } static gboolean is_tracker_edit_supported(TrgClient * tc) { return trg_client_get_rpc_version(tc) >= 10; } static gboolean on_trackers_update(gpointer data) { trg_response *response = (trg_response *) data; TrgTrackersTreeViewPrivate *priv = TRG_TRACKERS_TREE_VIEW_GET_PRIVATE(response->cb_data); GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(response->cb_data)); trg_trackers_model_set_accept(TRG_TRACKERS_MODEL(model), TRUE); response->cb_data = priv->win; return on_generic_interactive_action_response(data); } void trg_trackers_tree_view_new_connection(TrgTrackersTreeView * tv, TrgClient * tc) { TrgTrackersTreeViewPrivate *priv = TRG_TRACKERS_TREE_VIEW_GET_PRIVATE(tv); gboolean editable = is_tracker_edit_supported(tc); g_object_set(priv->announceRenderer, "editable", editable, "mode", editable ? GTK_CELL_RENDERER_MODE_EDITABLE : GTK_CELL_RENDERER_MODE_INERT, NULL); } static void trg_tracker_announce_edited(GtkCellRendererText * renderer, gchar * path, gchar * new_text, gpointer user_data) { TrgTrackersTreeViewPrivate *priv = TRG_TRACKERS_TREE_VIEW_GET_PRIVATE(user_data); GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(user_data)); gint64 torrentId = trg_trackers_model_get_torrent_id(TRG_TRACKERS_MODEL(model)); JsonArray *torrentIds = json_array_new(); JsonArray *trackerModifiers = json_array_new(); gint64 trackerId; JsonNode *req; JsonObject *args; GtkTreeIter iter; gchar *icon; gtk_tree_model_get_iter_from_string(model, &iter, path); gtk_list_store_set(GTK_LIST_STORE(model), &iter, TRACKERCOL_ANNOUNCE, new_text, -1); gtk_tree_model_get(model, &iter, TRACKERCOL_ID, &trackerId, TRACKERCOL_ICON, &icon, -1); json_array_add_int_element(torrentIds, torrentId); req = torrent_set(torrentIds); args = node_get_arguments(req); if (!g_strcmp0(icon, "list-add")) { json_array_add_string_element(trackerModifiers, new_text); json_object_set_array_member(args, "trackerAdd", trackerModifiers); } else { json_array_add_int_element(trackerModifiers, trackerId); json_array_add_string_element(trackerModifiers, new_text); json_object_set_array_member(args, "trackerReplace", trackerModifiers); } g_free(icon); dispatch_async(priv->client, req, on_trackers_update, user_data); } static void trg_tracker_announce_editing_started(GtkCellRenderer * renderer G_GNUC_UNUSED, GtkCellEditable * editable G_GNUC_UNUSED, gchar * path G_GNUC_UNUSED, gpointer user_data) { TrgTrackersModel *model = TRG_TRACKERS_MODEL(gtk_tree_view_get_model (GTK_TREE_VIEW(user_data))); trg_trackers_model_set_accept(model, FALSE); } static void trg_tracker_announce_editing_canceled(GtkWidget * w G_GNUC_UNUSED, gpointer data) { TrgTrackersModel *model = TRG_TRACKERS_MODEL(gtk_tree_view_get_model(GTK_TREE_VIEW(data))); trg_trackers_model_set_accept(model, TRUE); } static void trg_trackers_tree_view_init(TrgTrackersTreeView * self) { TrgTrackersTreeViewPrivate *priv = TRG_TRACKERS_TREE_VIEW_GET_PRIVATE(self); TrgTreeView *ttv = TRG_TREE_VIEW(self); trg_column_description *desc; desc = trg_tree_view_reg_column(ttv, TRG_COLTYPE_ICONTEXT, TRACKERCOL_TIER, _("Tier"), "tier", TRG_COLUMN_UNREMOVABLE); desc->model_column_extra = TRACKERCOL_ICON; desc = trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, TRACKERCOL_ANNOUNCE, _("Announce URL"), "announce-url", TRG_COLUMN_UNREMOVABLE); priv->announceRenderer = desc->customRenderer = gtk_cell_renderer_text_new(); g_signal_connect(priv->announceRenderer, "edited", G_CALLBACK(trg_tracker_announce_edited), self); g_signal_connect(priv->announceRenderer, "editing-canceled", G_CALLBACK(trg_tracker_announce_editing_canceled), self); g_signal_connect(priv->announceRenderer, "editing-started", G_CALLBACK(trg_tracker_announce_editing_started), self); desc->out = &priv->announceColumn; trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TRACKERCOL_LAST_ANNOUNCE_PEER_COUNT, _("Peers"), "last-announce-peer-count", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TRACKERCOL_SEEDERCOUNT, _("Seeder Count"), "seeder-count", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_NUMGTZERO, TRACKERCOL_LEECHERCOUNT, _("Leecher Count"), "leecher-count", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_EPOCH, TRACKERCOL_LAST_ANNOUNCE_TIME, _("Last Announce"), "last-announce-time", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, TRACKERCOL_LAST_ANNOUNCE_RESULT, _("Last Result"), "last-result", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, TRACKERCOL_SCRAPE, _("Scrape URL"), "scrape-url", 0); trg_tree_view_reg_column(ttv, TRG_COLTYPE_EPOCH, TRACKERCOL_LAST_SCRAPE_TIME, _("Last Scrape"), "last-scrape-time", TRG_COLUMN_EXTRA); trg_tree_view_reg_column(ttv, TRG_COLTYPE_TEXT, TRACKERCOL_HOST, _("Host"), "host", TRG_COLUMN_EXTRA); } static void add_tracker(GtkWidget * w, gpointer data) { GtkTreeView *tv = GTK_TREE_VIEW(data); TrgTrackersTreeViewPrivate *priv = TRG_TRACKERS_TREE_VIEW_GET_PRIVATE(data); GtkTreeModel *model = gtk_tree_view_get_model(tv); GtkTreeIter iter; GtkTreePath *path; gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, TRACKERCOL_ICON, "list-add", -1); path = gtk_tree_model_get_path(model, &iter); gtk_tree_view_set_cursor(tv, path, priv->announceColumn, TRUE); gtk_tree_path_free(path); } static void delete_tracker(GtkWidget * w, gpointer data) { TrgTrackersTreeViewPrivate *priv = TRG_TRACKERS_TREE_VIEW_GET_PRIVATE(data); GtkTreeView *tv = GTK_TREE_VIEW(data); GList *selectionRefs = trg_tree_view_get_selected_refs_list(tv); GtkTreeModel *model = gtk_tree_view_get_model(tv); JsonArray *trackerIds = json_array_new(); gint64 torrentId = trg_trackers_model_get_torrent_id(TRG_TRACKERS_MODEL(model)); JsonArray *torrentIds = json_array_new(); JsonNode *req; JsonObject *args; GList *li; for (li = selectionRefs; li; li = g_list_next(li)) { GtkTreeRowReference *rr = (GtkTreeRowReference *) li->data; GtkTreePath *path = gtk_tree_row_reference_get_path(rr); if (path) { gint64 trackerId; GtkTreeIter trackerIter; gtk_tree_model_get_iter(model, &trackerIter, path); gtk_tree_model_get(model, &trackerIter, TRACKERCOL_ID, &trackerId, -1); json_array_add_int_element(trackerIds, trackerId); gtk_list_store_remove(GTK_LIST_STORE(model), &trackerIter); gtk_tree_path_free(path); } gtk_tree_row_reference_free(rr); } g_list_free(selectionRefs); json_array_add_int_element(torrentIds, torrentId); req = torrent_set(torrentIds); args = node_get_arguments(req); json_object_set_array_member(args, "trackerRemove", trackerIds); trg_trackers_model_set_accept(TRG_TRACKERS_MODEL(model), FALSE); dispatch_async(priv->client, req, on_trackers_update, data); } static void view_popup_menu_add_only(GtkWidget * treeview, GdkEventButton * event, gpointer data G_GNUC_UNUSED) { GtkWidget *menu, *menuitem; menu = gtk_menu_new(); menuitem = trg_menu_bar_item_new(GTK_MENU_SHELL(menu), _("Add"), GTK_STOCK_ADD, TRUE); g_signal_connect(menuitem, "activate", G_CALLBACK(add_tracker), treeview); gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, (event != NULL) ? event->button : 0, gdk_event_get_time((GdkEvent *) event)); } static void view_popup_menu(GtkWidget * treeview, GdkEventButton * event, gpointer data G_GNUC_UNUSED) { GtkWidget *menu, *menuitem; menu = gtk_menu_new(); menuitem = trg_menu_bar_item_new(GTK_MENU_SHELL(menu), _("Delete"), GTK_STOCK_DELETE, TRUE); g_signal_connect(menuitem, "activate", G_CALLBACK(delete_tracker), treeview); menuitem = trg_menu_bar_item_new(GTK_MENU_SHELL(menu), _("Add"), GTK_STOCK_ADD, TRUE); g_signal_connect(menuitem, "activate", G_CALLBACK(add_tracker), treeview); gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, (event != NULL) ? event->button : 0, gdk_event_get_time((GdkEvent *) event)); } static gboolean view_onButtonPressed(GtkWidget * treeview, GdkEventButton * event, gpointer userdata) { TrgTrackersTreeViewPrivate *priv = TRG_TRACKERS_TREE_VIEW_GET_PRIVATE(treeview); TrgTrackersModel *model = TRG_TRACKERS_MODEL(gtk_tree_view_get_model (GTK_TREE_VIEW(treeview))); GtkTreeSelection *selection; GtkTreePath *path; if (!is_tracker_edit_supported(priv->client)) return FALSE; if (event->type == GDK_BUTTON_PRESS && event->button == 3) { selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), (gint) event->x, (gint) event->y, &path, NULL, NULL, NULL)) { if (!gtk_tree_selection_path_is_selected(selection, path)) { gtk_tree_selection_unselect_all(selection); gtk_tree_selection_select_path(selection, path); } gtk_tree_path_free(path); view_popup_menu(treeview, event, userdata); } else if (trg_trackers_model_get_torrent_id(model) >= 0) { view_popup_menu_add_only(treeview, event, userdata); } return TRUE; } return FALSE; } static gboolean view_onPopupMenu(GtkWidget * treeview, gpointer userdata) { view_popup_menu(treeview, NULL, userdata); return TRUE; } TrgTrackersTreeView *trg_trackers_tree_view_new(TrgTrackersModel * model, TrgClient * client, TrgMainWindow * win, const gchar * configId) { GObject *obj = g_object_new(TRG_TYPE_TRACKERS_TREE_VIEW, "config-id", configId, "prefs", trg_client_get_prefs(client), NULL); TrgTrackersTreeViewPrivate *priv = TRG_TRACKERS_TREE_VIEW_GET_PRIVATE(obj); gtk_tree_view_set_model(GTK_TREE_VIEW(obj), GTK_TREE_MODEL(model)); priv->client = client; priv->win = win; trg_tree_view_setup_columns(TRG_TREE_VIEW(obj)); g_signal_connect(obj, "button-press-event", G_CALLBACK(view_onButtonPressed), NULL); g_signal_connect(obj, "popup-menu", G_CALLBACK(view_onPopupMenu), NULL); return TRG_TRACKERS_TREE_VIEW(obj); } transmission-remote-gtk-1.4.1/src/trg-trackers-tree-view.h000066400000000000000000000046271341276053300236140ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TRG_TRACKERS_TREE_VIEW_H_ #define TRG_TRACKERS_TREE_VIEW_H_ #include #include #include "trg-trackers-model.h" #include "trg-tree-view.h" #include "trg-client.h" #include "trg-main-window.h" G_BEGIN_DECLS #define TRG_TYPE_TRACKERS_TREE_VIEW trg_trackers_tree_view_get_type() #define TRG_TRACKERS_TREE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_TRACKERS_TREE_VIEW, TrgTrackersTreeView)) #define TRG_TRACKERS_TREE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_TRACKERS_TREE_VIEW, TrgTrackersTreeViewClass)) #define TRG_IS_TRACKERS_TREE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_TRACKERS_TREE_VIEW)) #define TRG_IS_TRACKERS_TREE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_TRACKERS_TREE_VIEW)) #define TRG_TRACKERS_TREE_VIEW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_TRACKERS_TREE_VIEW, TrgTrackersTreeViewClass)) typedef struct { TrgTreeView parent; } TrgTrackersTreeView; typedef struct { TrgTreeViewClass parent_class; } TrgTrackersTreeViewClass; GType trg_trackers_tree_view_get_type(void); TrgTrackersTreeView *trg_trackers_tree_view_new(TrgTrackersModel * model, TrgClient * client, TrgMainWindow * win, const gchar * configId); void trg_trackers_tree_view_new_connection(TrgTrackersTreeView * tv, TrgClient * tc); G_END_DECLS #endif /* TRG_TRACKERS_TREE_VIEW_H_ */ transmission-remote-gtk-1.4.1/src/trg-tree-view.c000066400000000000000000001002501341276053300217600ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "trg-prefs.h" #include "trg-tree-view.h" #include "trg-cell-renderer-speed.h" #include "trg-cell-renderer-size.h" #include "trg-cell-renderer-ratio.h" #include "trg-cell-renderer-wanted.h" #include "trg-cell-renderer-eta.h" #include "trg-cell-renderer-epoch.h" #include "trg-cell-renderer-priority.h" #include "trg-cell-renderer-numgteqthan.h" #include "trg-cell-renderer-file-icon.h" /* A subclass of GtkTreeView which allows the user to change column visibility * by right clicking on any column for a menu to hide the clicked column, or * insert any hidden column after. * * This class persists these choices to TrgPrefs, and restores them when it is * initialised. Column widths are also saved/restored. * * All the columns must be preregistered so it knows what model column, * renderers etc to use if it should be created, and what columns are available. */ enum { PROP_0, PROP_PREFS, PROP_CONFIGID }; enum { SIGNAL_COLUMN_ADDED, SIGNAL_COUNT }; static guint signals[SIGNAL_COUNT] = { 0 }; G_DEFINE_TYPE(TrgTreeView, trg_tree_view, GTK_TYPE_TREE_VIEW) #define TRG_TREE_VIEW_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_TREE_VIEW, TrgTreeViewPrivate)) typedef struct _TrgTreeViewPrivate TrgTreeViewPrivate; struct _TrgTreeViewPrivate { GList *columns; TrgPrefs *prefs; gchar *configId; }; #define GDATA_KEY_COLUMN_DESC "column-desc" gboolean trg_tree_view_is_column_showing(TrgTreeView * tv, gint index) { TrgTreeViewPrivate *priv = TRG_TREE_VIEW_GET_PRIVATE(tv); GList *li; for (li = priv->columns; li; li = g_list_next(li)) { trg_column_description *cd = (trg_column_description *) li->data; if (cd->model_column == index) { if (cd->flags & TRG_COLUMN_SHOWING) return TRUE; else break; } } return FALSE; } static void trg_tree_view_get_property(GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } static void trg_tree_view_set_property(GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { TrgTreeViewPrivate *priv = TRG_TREE_VIEW_GET_PRIVATE(object); switch (property_id) { case PROP_PREFS: priv->prefs = g_value_get_object(value); break; case PROP_CONFIGID: g_free(priv->configId); priv->configId = g_value_dup_string(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static GObject *trg_tree_view_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *obj = G_OBJECT_CLASS (trg_tree_view_parent_class)->constructor(type, n_construct_properties, construct_params); return obj; } static JsonObject *trg_prefs_get_tree_view_props(TrgTreeView * tv) { TrgTreeViewPrivate *priv = TRG_TREE_VIEW_GET_PRIVATE(tv); JsonObject *root = trg_prefs_get_root(priv->prefs); const gchar *className = priv->configId && strlen(priv->configId) > 0 ? priv->configId : G_OBJECT_TYPE_NAME(tv); JsonObject *obj; JsonObject *tvProps = NULL; if (!json_object_has_member(root, TRG_PREFS_KEY_TREE_VIEWS)) { obj = json_object_new(); json_object_set_object_member(root, TRG_PREFS_KEY_TREE_VIEWS, obj); } else { obj = json_object_get_object_member(root, TRG_PREFS_KEY_TREE_VIEWS); } if (!json_object_has_member(obj, className)) { tvProps = json_object_new(); json_object_set_object_member(obj, className, tvProps); } else { tvProps = json_object_get_object_member(obj, className); } return tvProps; } static void trg_tree_view_add_column_after(TrgTreeView * tv, trg_column_description * desc, gint64 width, GtkTreeViewColumn * after_col); trg_column_description *trg_tree_view_reg_column(TrgTreeView * tv, gint type, gint model_column, const gchar * header, const gchar * id, guint flags) { TrgTreeViewPrivate *priv = TRG_TREE_VIEW_GET_PRIVATE(tv); trg_column_description *desc = g_new0(trg_column_description, 1); desc->type = type; desc->model_column = model_column; desc->header = g_strdup(header); desc->id = g_strdup(id); desc->flags = flags; priv->columns = g_list_append(priv->columns, desc); return desc; } static trg_column_description *trg_tree_view_find_column(TrgTreeView * tv, const gchar * id) { TrgTreeViewPrivate *priv = TRG_TREE_VIEW_GET_PRIVATE(tv); GList *li; trg_column_description *desc; for (li = priv->columns; li; li = g_list_next(li)) { desc = (trg_column_description *) li->data; if (!g_strcmp0(desc->id, id)) return desc; } return NULL; } static void trg_tree_view_hide_column(GtkWidget * w, GtkTreeViewColumn * col) { trg_column_description *desc = g_object_get_data(G_OBJECT(col), GDATA_KEY_COLUMN_DESC); GtkWidget *tv = gtk_tree_view_column_get_tree_view(col); desc->flags &= ~TRG_COLUMN_SHOWING; gtk_tree_view_remove_column(GTK_TREE_VIEW(tv), col); } static void trg_tree_view_add_column(TrgTreeView * tv, trg_column_description * desc, gint64 width) { trg_tree_view_add_column_after(tv, desc, width, NULL); } static void trg_tree_view_user_add_column_cb(GtkWidget * w, trg_column_description * desc) { GtkTreeViewColumn *col = g_object_get_data(G_OBJECT(w), "parent-col"); TrgTreeView *tv = TRG_TREE_VIEW(gtk_tree_view_column_get_tree_view(col)); trg_tree_view_add_column_after(tv, desc, -1, col); g_signal_emit(tv, signals[SIGNAL_COLUMN_ADDED], 0, desc->id); } static void trg_tree_view_sort_menu_item_toggled(GtkCheckMenuItem * w, gpointer data) { GtkTreeSortable *model = GTK_TREE_SORTABLE(data); trg_column_description *desc = (trg_column_description *) g_object_get_data(G_OBJECT(w), GDATA_KEY_COLUMN_DESC); if (gtk_check_menu_item_get_active(w)) { GtkSortType sortType; gtk_tree_sortable_get_sort_column_id(model, NULL, &sortType); gtk_tree_sortable_set_sort_column_id(model, desc->model_column, sortType); } } static void trg_tree_view_sort_menu_type_toggled(GtkCheckMenuItem * w, gpointer data) { GtkTreeSortable *model = GTK_TREE_SORTABLE(data); if (gtk_check_menu_item_get_active(w)) { gint sortColumn; gint sortType = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w), "sort-type")); gtk_tree_sortable_get_sort_column_id(model, &sortColumn, NULL); gtk_tree_sortable_set_sort_column_id(model, sortColumn, sortType); } } GtkWidget *trg_tree_view_sort_menu(TrgTreeView * tv, const gchar * label) { TrgTreeViewPrivate *priv = TRG_TREE_VIEW_GET_PRIVATE(tv); GtkWidget *item = gtk_menu_item_new_with_mnemonic(label); GtkTreeModel *treeViewModel = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); GtkTreeSortable *sortableModel = GTK_TREE_SORTABLE(gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER(treeViewModel))); GtkWidget *menu = gtk_menu_new(); GtkWidget *b; GList *li; gint sort; GtkSortType sortType; GSList *group = NULL; gtk_tree_sortable_get_sort_column_id(sortableModel, &sort, &sortType); b = gtk_radio_menu_item_new_with_label(group, _("Ascending")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(b), sortType == GTK_SORT_ASCENDING); g_object_set_data(G_OBJECT(b), "sort-type", GINT_TO_POINTER(GTK_SORT_ASCENDING)); g_signal_connect(b, "toggled", G_CALLBACK(trg_tree_view_sort_menu_type_toggled), sortableModel); gtk_menu_shell_append(GTK_MENU_SHELL(menu), b); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(b)); b = gtk_radio_menu_item_new_with_label(group, _("Descending")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(b), sortType == GTK_SORT_DESCENDING); g_object_set_data(G_OBJECT(b), "sort-type", GINT_TO_POINTER(GTK_SORT_DESCENDING)); g_signal_connect(b, "toggled", G_CALLBACK(trg_tree_view_sort_menu_type_toggled), sortableModel); gtk_menu_shell_append(GTK_MENU_SHELL(menu), b); group = NULL; gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_separator_menu_item_new()); for (li = priv->columns; li; li = g_list_next(li)) { trg_column_description *desc = (trg_column_description *) li->data; if (!(desc->flags & TRG_COLUMN_HIDE_FROM_TOP_MENU)) { b = gtk_radio_menu_item_new_with_label(group, desc->header); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(b)); if (desc->model_column == sort) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(b), TRUE); g_object_set_data(G_OBJECT(b), GDATA_KEY_COLUMN_DESC, desc); g_signal_connect(b, "toggled", G_CALLBACK (trg_tree_view_sort_menu_item_toggled), sortableModel); gtk_menu_shell_append(GTK_MENU_SHELL(menu), b); } } gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), menu); return item; } static void view_popup_menu(GtkButton * button, GdkEventButton * event, GtkTreeViewColumn * column) { GtkWidget *tv = gtk_tree_view_column_get_tree_view(column); TrgTreeViewPrivate *priv = TRG_TREE_VIEW_GET_PRIVATE(tv); GtkWidget *menu, *menuitem; trg_column_description *desc; guint n_showing = 0; GList *li; menu = gtk_menu_new(); desc = g_object_get_data(G_OBJECT(column), GDATA_KEY_COLUMN_DESC); for (li = priv->columns; li; li = g_list_next(li)) { trg_column_description *desc = (trg_column_description *) li->data; if (!(desc->flags & TRG_COLUMN_SHOWING)) { menuitem = gtk_check_menu_item_new_with_label(desc->header); g_object_set_data(G_OBJECT(menuitem), "parent-col", column); g_signal_connect(menuitem, "activate", G_CALLBACK(trg_tree_view_user_add_column_cb), desc); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); } else { n_showing++; } } menuitem = gtk_check_menu_item_new_with_label(desc->header); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE); g_signal_connect(menuitem, "activate", G_CALLBACK(trg_tree_view_hide_column), column); gtk_widget_set_sensitive(menuitem, !(desc->flags & TRG_COLUMN_UNREMOVABLE) && n_showing > 1); gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), menuitem); gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, (event != NULL) ? event->button : 0, gdk_event_get_time((GdkEvent *) event)); } /* This used to get the column as an argument binded when the signal was * created, but it seems GTK now destroys and recreates them in some * circumstances. So bind the column description instead and search for the * column by its title. */ static gboolean col_onButtonPressed(GtkButton * button, GdkEventButton * event, trg_column_description *desc) { if (event->type == GDK_BUTTON_PRESS && event->button == 3) { GtkTreeView *gtv = GTK_TREE_VIEW(gtk_widget_get_parent(GTK_WIDGET(button))); GList *cols = gtk_tree_view_get_columns(gtv); GList *li; for (li = cols; li; li = g_list_next(li)) { GtkTreeViewColumn *col = GTK_TREE_VIEW_COLUMN(li->data); if (!g_strcmp0(desc->header, gtk_tree_view_column_get_title(col))) { view_popup_menu(button, event, col); break; } } g_list_free(cols); return TRUE; } return FALSE; } static GtkTreeViewColumn * trg_tree_view_icontext_column_new(trg_column_description * desc, gchar * renderer_property) { GtkTreeViewColumn *column = gtk_tree_view_column_new(); GtkCellRenderer *renderer = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_set_title(column, desc->header); gtk_tree_view_column_pack_start(column, renderer, FALSE); gtk_tree_view_column_set_attributes(column, renderer, renderer_property, desc->model_column_extra, NULL); renderer = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(column, renderer, TRUE); gtk_tree_view_column_set_attributes(column, renderer, "text", desc->model_column, NULL); return column; } static GtkTreeViewColumn * trg_tree_view_fileicontext_column_new(trg_column_description * desc) { GtkTreeViewColumn *column = gtk_tree_view_column_new(); GtkCellRenderer *renderer = trg_cell_renderer_file_icon_new(); gtk_tree_view_column_set_title(column, desc->header); gtk_tree_view_column_pack_start(column, renderer, FALSE); gtk_tree_view_column_set_attributes(column, renderer, "file-id", desc->model_column_extra, "file-name", desc->model_column, NULL); renderer = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(column, renderer, TRUE); gtk_tree_view_column_set_attributes(column, renderer, "text", desc->model_column, NULL); return column; } static void trg_tree_view_add_column_after(TrgTreeView * tv, trg_column_description * desc, gint64 width, GtkTreeViewColumn * after_col) { GtkCellRenderer *renderer; GtkTreeViewColumn *column = NULL; GtkButton *column_button = NULL; switch (desc->type) { case TRG_COLTYPE_TEXT: renderer = desc->customRenderer ? desc->customRenderer : gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(desc->header, renderer, "text", desc-> model_column, NULL); break; case TRG_COLTYPE_SPEED: renderer = trg_cell_renderer_speed_new(); column = gtk_tree_view_column_new_with_attributes(desc->header, renderer, "speed-value", desc-> model_column, NULL); break; case TRG_COLTYPE_EPOCH: renderer = trg_cell_renderer_epoch_new(); column = gtk_tree_view_column_new_with_attributes(desc->header, renderer, "epoch-value", desc-> model_column, NULL); break; case TRG_COLTYPE_ETA: renderer = trg_cell_renderer_eta_new(); column = gtk_tree_view_column_new_with_attributes(desc->header, renderer, "eta-value", desc-> model_column, NULL); break; case TRG_COLTYPE_SIZE: renderer = trg_cell_renderer_size_new(); column = gtk_tree_view_column_new_with_attributes(desc->header, renderer, "size-value", desc-> model_column, NULL); break; case TRG_COLTYPE_PROG: renderer = gtk_cell_renderer_progress_new(); column = gtk_tree_view_column_new_with_attributes(desc->header, renderer, "value", desc-> model_column, NULL); break; case TRG_COLTYPE_RATIO: renderer = trg_cell_renderer_ratio_new(); column = gtk_tree_view_column_new_with_attributes(desc->header, renderer, "ratio-value", desc-> model_column, NULL); break; case TRG_COLTYPE_WANTED: column = gtk_tree_view_column_new(); renderer = trg_cell_renderer_wanted_new(); /*gtk_cell_renderer_set_alignment(GTK_CELL_RENDERER(renderer), 0.5f, 0.0); */ gtk_tree_view_column_set_title(column, desc->header); gtk_tree_view_column_pack_start(column, renderer, TRUE); gtk_tree_view_column_set_attributes(column, renderer, "wanted-value", desc->model_column, NULL); break; case TRG_COLTYPE_ICONTEXT: column = trg_tree_view_icontext_column_new(desc, "icon-name"); break; case TRG_COLTYPE_FILEICONTEXT: column = trg_tree_view_fileicontext_column_new(desc); break; case TRG_COLTYPE_PRIO: renderer = trg_cell_renderer_priority_new(); column = gtk_tree_view_column_new_with_attributes(desc->header, renderer, "priority-value", desc-> model_column, NULL); break; case TRG_COLTYPE_NUMGTZERO: renderer = trg_cell_renderer_numgteqthan_new(1); column = gtk_tree_view_column_new_with_attributes(desc->header, renderer, "value", desc-> model_column, NULL); break; case TRG_COLTYPE_NUMGTEQZERO: renderer = trg_cell_renderer_numgteqthan_new(0); column = gtk_tree_view_column_new_with_attributes(desc->header, renderer, "value", desc-> model_column, NULL); break; default: g_critical("unknown TrgTreeView column"); return; } //gtk_tree_view_column_set_min_width(column, 0); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_reorderable(column, TRUE); gtk_tree_view_column_set_sort_column_id(column, desc->model_column); gtk_tree_view_column_set_expand(column, TRUE); /*gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);*/ if (width > 0) { //gtk_tree_view_column_set_fixed_width(column, width); } g_object_set_data(G_OBJECT(column), GDATA_KEY_COLUMN_DESC, desc); gtk_tree_view_append_column(GTK_TREE_VIEW(tv), column); if (after_col) gtk_tree_view_move_column_after(GTK_TREE_VIEW(tv), column, after_col); column_button = GTK_BUTTON(gtk_tree_view_column_get_button(column)); g_signal_connect(column_button, "button-press-event", G_CALLBACK(col_onButtonPressed), desc); if (desc->out) *(desc->out) = column; desc->flags |= TRG_COLUMN_SHOWING; } void trg_tree_view_remove_all_columns(TrgTreeView * tv) { GtkTreeView *gtv = GTK_TREE_VIEW(tv); GList *cols = gtk_tree_view_get_columns(gtv); GList *li; for (li = cols; li; li = g_list_next(li)) { gtk_tree_view_remove_column(gtv, GTK_TREE_VIEW_COLUMN(li->data)); } g_list_free(cols); } void trg_tree_view_persist(TrgTreeView * tv, guint flags) { JsonObject *props = trg_prefs_get_tree_view_props(tv); GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); GList *cols, *li; JsonArray *widths, *columns; gint sort_column_id; GtkSortType sort_type; if (flags & TRG_TREE_VIEW_PERSIST_SORT) { gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE ((flags & TRG_TREE_VIEW_SORTABLE_PARENT) ? gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model)) : model), &sort_column_id, &sort_type); if (json_object_has_member(props, TRG_PREFS_KEY_TV_SORT_COL)) json_object_remove_member(props, TRG_PREFS_KEY_TV_SORT_COL); if (json_object_has_member(props, TRG_PREFS_KEY_TV_SORT_TYPE)) json_object_remove_member(props, TRG_PREFS_KEY_TV_SORT_TYPE); json_object_set_int_member(props, TRG_PREFS_KEY_TV_SORT_COL, (gint64) sort_column_id); json_object_set_int_member(props, TRG_PREFS_KEY_TV_SORT_TYPE, (gint64) sort_type); } if (flags & TRG_TREE_VIEW_PERSIST_LAYOUT) { cols = gtk_tree_view_get_columns(GTK_TREE_VIEW(tv)); if (json_object_has_member(props, TRG_PREFS_KEY_TV_WIDTHS)) json_object_remove_member(props, TRG_PREFS_KEY_TV_WIDTHS); widths = json_array_new(); json_object_set_array_member(props, TRG_PREFS_KEY_TV_WIDTHS, widths); if (json_object_has_member(props, TRG_PREFS_KEY_TV_COLUMNS)) json_object_remove_member(props, TRG_PREFS_KEY_TV_COLUMNS); columns = json_array_new(); json_object_set_array_member(props, TRG_PREFS_KEY_TV_COLUMNS, columns); for (li = cols; li; li = g_list_next(li)) { GtkTreeViewColumn *col = (GtkTreeViewColumn *) li->data; trg_column_description *desc = g_object_get_data(G_OBJECT(li->data), GDATA_KEY_COLUMN_DESC); json_array_add_string_element(columns, desc->id); json_array_add_int_element(widths, gtk_tree_view_column_get_width (col)); } g_list_free(cols); } } void trg_tree_view_restore_sort(TrgTreeView * tv, guint flags) { JsonObject *props = trg_prefs_get_tree_view_props(tv); GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); if (json_object_has_member(props, TRG_PREFS_KEY_TV_SORT_COL) && json_object_has_member(props, TRG_PREFS_KEY_TV_SORT_TYPE)) { gint64 sort_col = json_object_get_int_member(props, TRG_PREFS_KEY_TV_SORT_COL); gint64 sort_type = json_object_get_int_member(props, TRG_PREFS_KEY_TV_SORT_TYPE); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE ((flags & TRG_TREE_VIEW_SORTABLE_PARENT) ? gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model)) : model), sort_col, (GtkSortType) sort_type); } } void trg_tree_view_set_prefs(TrgTreeView * tv, TrgPrefs * prefs) { TrgTreeViewPrivate *priv = TRG_TREE_VIEW_GET_PRIVATE(tv); priv->prefs = prefs; } void trg_tree_view_setup_columns(TrgTreeView * tv) { TrgTreeViewPrivate *priv = TRG_TREE_VIEW_GET_PRIVATE(tv); JsonObject *props = trg_prefs_get_tree_view_props(tv); GList *columns, *widths, *cli, *wli; if (!json_object_has_member(props, TRG_PREFS_KEY_TV_COLUMNS) || !json_object_has_member(props, TRG_PREFS_KEY_TV_WIDTHS)) { GList *li; for (li = priv->columns; li; li = g_list_next(li)) { trg_column_description *desc = (trg_column_description *) li->data; if (desc && !(desc->flags & TRG_COLUMN_EXTRA)) trg_tree_view_add_column(tv, desc, -1); } return; } columns = json_array_get_elements(json_object_get_array_member (props, TRG_PREFS_KEY_TV_COLUMNS)); widths = json_array_get_elements(json_object_get_array_member (props, TRG_PREFS_KEY_TV_WIDTHS)); for (cli = columns, wli = widths; cli && wli; cli = g_list_next(cli), wli = g_list_next(wli)) { trg_column_description *desc = trg_tree_view_find_column(tv, json_node_get_string ((JsonNode *) cli-> data)); if (desc) { gint64 width = json_node_get_int((JsonNode *) wli->data); trg_tree_view_add_column(tv, desc, width); } } g_list_free(columns); g_list_free(widths); } GList *trg_tree_view_get_selected_refs_list(GtkTreeView * tv) { GtkTreeModel *model = gtk_tree_view_get_model(tv); GtkTreeSelection *selection = gtk_tree_view_get_selection(tv); GList *li, *selectionList; GList *refList = NULL; selectionList = gtk_tree_selection_get_selected_rows(selection, NULL); for (li = selectionList; li != NULL; li = g_list_next(li)) { GtkTreePath *path = (GtkTreePath *) li->data; GtkTreeRowReference *ref = gtk_tree_row_reference_new(model, path); gtk_tree_path_free(path); refList = g_list_append(refList, ref); } g_list_free(selectionList); return refList; } static void trg_tree_view_class_init(TrgTreeViewClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(TrgTreeViewPrivate)); object_class->get_property = trg_tree_view_get_property; object_class->set_property = trg_tree_view_set_property; object_class->constructor = trg_tree_view_constructor; g_object_class_install_property(object_class, PROP_PREFS, g_param_spec_object("prefs", "Trg Prefs", "Trg Prefs", TRG_TYPE_PREFS, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); g_object_class_install_property(object_class, PROP_CONFIGID, g_param_spec_string ("config-id", "config-id", "config-id", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); signals[SIGNAL_COLUMN_ADDED] = g_signal_new("column-added", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET(TrgTreeViewClass, column_added), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); } static void trg_tree_view_init(TrgTreeView * tv) { gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(tv), TRUE); gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(tv), TRUE); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(tv), TRUE); gtk_tree_selection_set_mode(gtk_tree_view_get_selection (GTK_TREE_VIEW(tv)), GTK_SELECTION_MULTIPLE); gtk_widget_set_sensitive(GTK_WIDGET(tv), FALSE); } GtkWidget *trg_tree_view_new(void) { return GTK_WIDGET(g_object_new(TRG_TYPE_TREE_VIEW, NULL)); } transmission-remote-gtk-1.4.1/src/trg-tree-view.h000066400000000000000000000072431341276053300217750ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _TRG_TREE_VIEW_H_ #define _TRG_TREE_VIEW_H_ #include #include "trg-prefs.h" G_BEGIN_DECLS #define TRG_TYPE_TREE_VIEW trg_tree_view_get_type() #define TRG_TREE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_TREE_VIEW, TrgTreeView)) #define TRG_TREE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_TREE_VIEW, TrgTreeViewClass)) #define TRG_IS_TREE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_TREE_VIEW)) #define TRG_IS_TREE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_TREE_VIEW)) #define TRG_TREE_VIEW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_TREE_VIEW, TrgTreeViewClass)) typedef struct { GtkTreeView parent; } TrgTreeView; typedef struct { GtkTreeViewClass parent_class; void (*column_added) (TrgTreeView * tv, const gchar *id); } TrgTreeViewClass; GType trg_tree_view_get_type(void); GtkWidget *trg_tree_view_new(void); G_END_DECLS GList *trg_tree_view_get_selected_refs_list(GtkTreeView * tv); enum { TRG_COLTYPE_ICONTEXT, TRG_COLTYPE_FILEICONTEXT, TRG_COLTYPE_WANTED, TRG_COLTYPE_TEXT, TRG_COLTYPE_SIZE, TRG_COLTYPE_RATIO, TRG_COLTYPE_EPOCH, TRG_COLTYPE_SPEED, TRG_COLTYPE_ETA, TRG_COLTYPE_PROG, TRG_COLTYPE_PRIO, TRG_COLTYPE_NUMGTZERO, TRG_COLTYPE_NUMGTEQZERO } TrgColumnType; typedef struct { gint model_column; gint model_column_extra; gchar *header; gchar *id; guint flags; guint type; GtkCellRenderer *customRenderer; GtkTreeViewColumn **out; } trg_column_description; #define TRG_COLUMN_DEFAULT 0x00 #define TRG_COLUMN_SHOWING (1 << 0) /* 0x01 */ #define TRG_COLUMN_UNREMOVABLE (1 << 1) /* 0x02 */ #define TRG_COLUMN_EXTRA (1 << 2) /* 0x04 */ #define TRG_COLUMN_HIDE_FROM_TOP_MENU (1 << 3) /* 0x08 */ #define TRG_TREE_VIEW_PERSIST_SORT (1 << 0) #define TRG_TREE_VIEW_PERSIST_LAYOUT (1 << 1) #define TRG_TREE_VIEW_SORTABLE_PARENT (1 << 2) trg_column_description *trg_tree_view_reg_column(TrgTreeView * tv, gint type, gint model_column, const gchar * header, const gchar * id, guint flags); void trg_tree_view_setup_columns(TrgTreeView * tv); void trg_tree_view_set_prefs(TrgTreeView * tv, TrgPrefs * prefs); void trg_tree_view_persist(TrgTreeView * tv, guint flags); void trg_tree_view_remove_all_columns(TrgTreeView * tv); void trg_tree_view_restore_sort(TrgTreeView * tv, guint flags); GtkWidget *trg_tree_view_sort_menu(TrgTreeView * tv, const gchar * label); gboolean trg_tree_view_is_column_showing(TrgTreeView * tv, gint index); #endif /* _TRG_TREE_VIEW_H_ */ transmission-remote-gtk-1.4.1/src/trg-valgrind.sh000066400000000000000000000003511341276053300220500ustar00rootroot00000000000000#!/bin/sh G_SLICE=always-malloc G_DEBUG=gc-friendly,resident-modules valgrind --suppressions=gtk.suppression --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20 --log-file=valgrind.log ./transmission-remote-gtk transmission-remote-gtk-1.4.1/src/upload.c000066400000000000000000000055501341276053300205520ustar00rootroot00000000000000#ifdef HAVE_CONFIG_H #include "config.h" #endif #include "protocol-constants.h" #include "requests.h" #include "trg-client.h" #include "util.h" #include "trg-main-window.h" #include "json.h" #include "upload.h" static gboolean upload_complete_callback(gpointer data); static void next_upload(trg_upload *upload); static void add_set_common_args(JsonObject * args, gint priority, gchar * dir) { json_object_set_string_member(args, FIELD_FILE_DOWNLOAD_DIR, dir); json_object_set_int_member(args, FIELD_BANDWIDTH_PRIORITY, (gint64) priority); } void trg_upload_free(trg_upload *upload) { g_str_slist_free(upload->list); g_free(upload->dir); g_free(upload->uid); g_free(upload->file_wanted); g_free(upload->file_priorities); trg_response_free(upload->upload_response); g_free(upload); } static void add_priorities(JsonObject *args, gint* priorities, gint n_files) { gint i; for (i = 0; i < n_files; i++) { gint priority = priorities[i]; if (priority == TR_PRI_LOW) add_file_id_to_array(args, FIELD_FILES_PRIORITY_LOW, i); else if (priority == TR_PRI_HIGH) add_file_id_to_array(args, FIELD_FILES_PRIORITY_HIGH, i); else add_file_id_to_array(args, FIELD_FILES_PRIORITY_NORMAL, i); } } static void add_wanteds(JsonObject *args, gint* wanteds, gint n_files) { gint i; for (i = 0; i < n_files; i++) { if (wanteds[i]) add_file_id_to_array(args, FIELD_FILES_WANTED, i); else add_file_id_to_array(args, FIELD_FILES_UNWANTED, i); } } static void next_upload(trg_upload *upload) { JsonNode *req = NULL; if (upload->upload_response && upload->progress_index < 1) req = torrent_add_from_response(upload->upload_response, upload->flags); else if (upload->list && upload->progress_index < g_slist_length(upload->list)) req = torrent_add_from_file((gchar*)g_slist_nth_data(upload->list, upload->progress_index), upload->flags); if (req) { JsonObject *args = node_get_arguments(req); if (upload->extra_args) add_set_common_args(args, upload->priority, upload->dir); if (upload->file_wanted) add_wanteds(args, upload->file_wanted, upload->n_files); if (upload->file_priorities) add_priorities(args, upload->file_priorities, upload->n_files); upload->progress_index++; dispatch_async(upload->client, req, upload_complete_callback, upload); } else { trg_upload_free(upload); } } static gboolean upload_complete_callback(gpointer data) { trg_response *response = (trg_response*)data; trg_upload *upload = (trg_upload*)response->cb_data; if (upload->callback) upload->callback(data); /* the callback we're delegating to will destroy the response */ if (upload->main_window) on_generic_interactive_action(upload->main_window, response); else trg_response_free(response); next_upload(upload); return FALSE; } void trg_do_upload(trg_upload *upload) { next_upload(upload); } transmission-remote-gtk-1.4.1/src/upload.h000066400000000000000000000012631341276053300205540ustar00rootroot00000000000000#ifndef UPLOAD_H_ #define UPLOAD_H_ #include #include "trg-client.h" #include "trg-main-window.h" typedef struct { GSList *list; // list of filenames trg_response *upload_response; // OR: a HTTP response containing a torrent TrgClient *client; gpointer cb_data; TrgMainWindow *main_window; // a parent window to attach any error dialogs to guint flags; gchar *dir; gint priority; gint* file_priorities; gint* file_wanted; guint n_files; gboolean extra_args; guint progress_index; GSourceFunc callback; gchar *uid; } trg_upload; void trg_upload_free(trg_upload *upload); void trg_do_upload(trg_upload *upload); #endif transmission-remote-gtk-1.4.1/src/util.c000066400000000000000000000365451341276053300202530ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* Many of these functions are taken from the Transmission Project. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include "util.h" /*** **** The code for formatting size and speeds, taken from Transmission. ***/ const int disk_K = 1024; const char *disk_K_str = N_("KiB"); const char *disk_M_str = N_("MiB"); const char *disk_G_str = N_("GiB"); const char *disk_T_str = N_("TiB"); const int speed_K = 1024; const char *speed_K_str = N_("KiB/s"); const char *speed_M_str = N_("MiB/s"); const char *speed_G_str = N_("GiB/s"); const char *speed_T_str = N_("TiB/s"); struct formatter_unit { char *name; gint64 value; }; struct formatter_units { struct formatter_unit units[4]; }; enum { TR_FMT_KB, TR_FMT_MB, TR_FMT_GB, TR_FMT_TB }; static void formatter_init(struct formatter_units *units, unsigned int kilo, const char *kb, const char *mb, const char *gb, const char *tb) { guint64 value = kilo; units->units[TR_FMT_KB].name = g_strdup(kb); units->units[TR_FMT_KB].value = value; value *= kilo; units->units[TR_FMT_MB].name = g_strdup(mb); units->units[TR_FMT_MB].value = value; value *= kilo; units->units[TR_FMT_GB].name = g_strdup(gb); units->units[TR_FMT_GB].value = value; value *= kilo; units->units[TR_FMT_TB].name = g_strdup(tb); units->units[TR_FMT_TB].value = value; } static char *formatter_get_size_str(const struct formatter_units *u, char *buf, gint64 bytes, size_t buflen) { int precision; double value; const char *units; const struct formatter_unit *unit; if (bytes < u->units[1].value) unit = &u->units[0]; else if (bytes < u->units[2].value) unit = &u->units[1]; else if (bytes < u->units[3].value) unit = &u->units[2]; else unit = &u->units[3]; value = (double) bytes / unit->value; units = unit->name; if (unit->value == 1) precision = 0; else if (value < 100) precision = 2; else precision = 1; g_snprintf(buf, buflen, "%.*f %s", precision, value, units); return buf; } static struct formatter_units size_units; void tr_formatter_size_init(unsigned int kilo, const char *kb, const char *mb, const char *gb, const char *tb) { formatter_init(&size_units, kilo, kb, mb, gb, tb); } char *tr_formatter_size_B(char *buf, gint64 bytes, size_t buflen) { return formatter_get_size_str(&size_units, buf, bytes, buflen); } static struct formatter_units speed_units; unsigned int tr_speed_K = 0u; void tr_formatter_speed_init(unsigned int kilo, const char *kb, const char *mb, const char *gb, const char *tb) { tr_speed_K = kilo; formatter_init(&speed_units, kilo, kb, mb, gb, tb); } char *tr_formatter_speed_KBps(char *buf, double KBps, size_t buflen) { const double K = speed_units.units[TR_FMT_KB].value; double speed = KBps; if (speed <= 999.95) /* 0.0 KB to 999.9 KB */ g_snprintf(buf, buflen, "%d %s", (int) speed, speed_units.units[TR_FMT_KB].name); else { speed /= K; if (speed <= 99.995) /* 0.98 MB to 99.99 MB */ g_snprintf(buf, buflen, "%.2f %s", speed, speed_units.units[TR_FMT_MB].name); else if (speed <= 999.95) /* 100.0 MB to 999.9 MB */ g_snprintf(buf, buflen, "%.1f %s", speed, speed_units.units[TR_FMT_MB].name); else { speed /= K; g_snprintf(buf, buflen, "%.1f %s", speed, speed_units.units[TR_FMT_GB].name); } } return buf; } /* URL checkers. */ gboolean is_magnet(const gchar * string) { return g_str_has_prefix(string, "magnet:"); } gboolean is_url(const gchar * string) { /* return g_regex_match_simple ("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?", string, 0, 0); */ return g_regex_match_simple("^http[s]?://", string, 0, 0); } /* * Glib-ish Utility functions. */ gchar *trg_base64encode(const gchar * filename) { GError *error = NULL; GMappedFile *mf = g_mapped_file_new(filename, FALSE, &error); gchar *b64out = NULL; if (error) { g_error("%s", error->message); g_error_free(error); } else { b64out = g_base64_encode((guchar *) g_mapped_file_get_contents(mf), g_mapped_file_get_length(mf)); } g_mapped_file_unref(mf); return b64out; } gchar *trg_gregex_get_first(GRegex * rx, const gchar * src) { GMatchInfo *mi = NULL; gchar *dst = NULL; g_regex_match(rx, src, 0, &mi); if (mi) { dst = g_match_info_fetch(mi, 1); g_match_info_free(mi); } return dst; } GRegex *trg_uri_host_regex_new(void) { return g_regex_new ("^[^:/?#]+:?//(?:www\\.|torrent\\.|torrents\\.|tracker\\.|\\d+\\.)?([^/?#:]*)", G_REGEX_OPTIMIZE, 0, NULL); } void g_str_slist_free(GSList * list) { g_slist_foreach(list, (GFunc) g_free, NULL); g_slist_free(list); } void rm_trailing_slashes(gchar * str) { int i, len; if (!str) return; if ((len = strlen(str)) < 1) return; for (i = strlen(str) - 1; str[i]; i--) { if (str[i] == '/') str[i] = '\0'; else return; } } /* Working with torrents.. */ void add_file_id_to_array(JsonObject * args, const gchar * key, gint index) { JsonArray *array; if (json_object_has_member(args, key)) { array = json_object_get_array_member(args, key); } else { array = json_array_new(); json_object_set_array_member(args, key, array); } json_array_add_int_element(array, index); } /* GTK utilities. */ GtkWidget *gtr_combo_box_new_enum(const char *text_1, ...) { GtkWidget *w; GtkCellRenderer *r; GtkListStore *store; va_list vl; const char *text; va_start(vl, text_1); store = gtk_list_store_new(2, G_TYPE_INT, G_TYPE_STRING); text = text_1; if (text != NULL) do { const int val = va_arg(vl, int); gtk_list_store_insert_with_values(store, NULL, INT_MAX, 0, val, 1, text, -1); text = va_arg(vl, const char *); } while (text != NULL); w = gtk_combo_box_new_with_model(GTK_TREE_MODEL(store)); r = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(w), r, TRUE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(w), r, "text", 1, NULL); /* cleanup */ g_object_unref(store); return w; } GtkWidget *my_scrolledwin_new(GtkWidget * child) { GtkWidget *scrolled_win = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_win), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(scrolled_win), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(scrolled_win), child); return scrolled_win; } /* gtk_widget_set_sensitive() was introduced in 2.18, we can have a minimum of * 2.16 otherwise. */ void trg_widget_set_visible(GtkWidget * w, gboolean visible) { if (visible) gtk_widget_show(w); else gtk_widget_hide(w); } void trg_error_dialog(GtkWindow * parent, trg_response * response) { gchar *msg = make_error_message(response->obj, response->status); GtkWidget *dialog = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", msg); gtk_window_set_title(GTK_WINDOW(dialog), _("Error")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); g_free(msg); } gchar *make_error_message(JsonObject * response, int status) { if (status == FAIL_JSON_DECODE) { return g_strdup(_("JSON decoding error.")); } else if (response && status == FAIL_RESPONSE_UNSUCCESSFUL) { const gchar *resultStr = json_object_get_string_member(response, "result"); if (resultStr == NULL) return g_strdup(_("Server responded, but with no result.")); else return g_strdup(resultStr); } else if (status <= -100) { return g_strdup_printf(_("Request failed with HTTP code %d"), -(status + 100)); } else { return g_strdup(curl_easy_strerror(status)); } } /* Formatters and Transmission basic utility functions.. */ char *tr_strlpercent(char *buf, double x, size_t buflen) { int precision; if (x < 10.0) precision = 2; else if (x < 100.0) precision = 1; else precision = 0; g_snprintf(buf, buflen, "%.*f%%", precision, tr_truncd(x, precision)); return buf; } double tr_truncd(double x, int decimal_places) { const int i = (int) pow(10, decimal_places); double x2 = (int) (x * i); return x2 / i; } char *tr_strratio(char *buf, size_t buflen, double ratio, const char *infinity) { if ((int) ratio == TR_RATIO_NA) g_strlcpy(buf, _("None"), buflen); else if ((int) ratio == TR_RATIO_INF) g_strlcpy(buf, infinity, buflen); else if (ratio < 10.0) g_snprintf(buf, buflen, "%.2f", tr_truncd(ratio, 2)); else if (ratio < 100.0) g_snprintf(buf, buflen, "%.1f", tr_truncd(ratio, 1)); else g_snprintf(buf, buflen, "%'.0f", ratio); return buf; } char *tr_strlratio(char *buf, double ratio, size_t buflen) { return tr_strratio(buf, buflen, ratio, "\xE2\x88\x9E"); } char *tr_strltime_short(char *buf, long seconds, size_t buflen) { int hours, minutes; if (seconds < 0) seconds = 0; hours = seconds / 3600; minutes = (seconds % 3600) / 60; seconds = (seconds % 3600) % 60; g_snprintf(buf, buflen, "%02d:%02d:%02ld", hours, minutes, seconds); return buf; } char *tr_strltime_long(char *buf, long seconds, size_t buflen) { int days, hours, minutes; char d[128], h[128], m[128], s[128]; if (seconds < 0) seconds = 0; days = seconds / 86400; hours = (seconds % 86400) / 3600; minutes = (seconds % 3600) / 60; seconds = (seconds % 3600) % 60; g_snprintf(d, sizeof(d), ngettext("%d day", "%d days", days), days); g_snprintf(h, sizeof(h), ngettext("%d hour", "%d hours", hours), hours); g_snprintf(m, sizeof(m), ngettext("%d minute", "%d minutes", minutes), minutes); g_snprintf(s, sizeof(s), ngettext("%ld second", "%ld seconds", seconds), seconds); if (days) { if (days >= 4 || !hours) { g_strlcpy(buf, d, buflen); } else { g_snprintf(buf, buflen, "%s, %s", d, h); } } else if (hours) { if (hours >= 4 || !minutes) { g_strlcpy(buf, h, buflen); } else { g_snprintf(buf, buflen, "%s, %s", h, m); } } else if (minutes) { if (minutes >= 4 || !seconds) { g_strlcpy(buf, m, buflen); } else { g_snprintf(buf, buflen, "%s, %s", m, s); } } else { g_strlcpy(buf, s, buflen); } return buf; } char *gtr_localtime(time_t time) { const struct tm tm = *localtime(&time); char buf[256], *eoln; g_strlcpy(buf, asctime(&tm), sizeof(buf)); if ((eoln = strchr(buf, '\n'))) *eoln = '\0'; return g_locale_to_utf8(buf, -1, NULL, NULL, NULL); } char *gtr_localtime2(char *buf, time_t time, size_t buflen) { char *tmp = gtr_localtime(time); g_strlcpy(buf, tmp, buflen); g_free(tmp); return buf; } gchar *epoch_to_string(gint64 epoch) { if(epoch == 0) return g_strdup(_("N/A")); GDateTime *dt = g_date_time_new_from_unix_local(epoch); gchar *timestring = g_date_time_format(dt, "%F %H:%M:%S"); g_date_time_unref(dt); return timestring; } /* wrap a link in text with a hyperlink, for use in pango markup. * with or without any links - a newly allocated string is returned. */ gchar *add_links_to_text(const gchar * original) { /* return if original already contains links */ if (g_regex_match_simple("", original, 0, 0)) { return g_strdup(original); } gchar *newText, *url, *link; GMatchInfo *match_info; GRegex *regex = g_regex_new("(https?://[a-zA-Z0-9_\\-\\./?=&]+)", 0, 0, NULL); // extract url and build escaped link g_regex_match(regex, original, 0, &match_info); url = g_match_info_fetch(match_info, 1); if(url) { link = g_markup_printf_escaped("%s", url, url); newText = g_regex_replace(regex, original, -1, 0, link, 0, NULL); g_free(url); g_free(link); } else { newText = g_strdup(original); } g_regex_unref(regex); g_match_info_unref(match_info); return newText; } char *tr_strlsize(char *buf, guint64 bytes, size_t buflen) { if (!bytes) g_strlcpy(buf, Q_("None"), buflen); else tr_formatter_size_B(buf, bytes, buflen); return buf; } gboolean is_minimised_arg(const gchar * arg) { return !g_strcmp0(arg, "-m") || !g_strcmp0(arg, "--minimized") || !g_strcmp0(arg, "/m"); } gboolean should_be_minimised(int argc, char *argv[]) { int i; for (i = 1; i < argc; i++) if (is_minimised_arg(argv[i])) return TRUE; return FALSE; } GtkWidget *trg_hbox_new(gboolean homogeneous, gint spacing) { GtkWidget *box; box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, spacing); gtk_box_set_homogeneous(GTK_BOX(box), homogeneous); return box; } GtkWidget *trg_vbox_new(gboolean homogeneous, gint spacing) { GtkWidget *box; box = gtk_box_new(GTK_ORIENTATION_VERTICAL, spacing); gtk_box_set_homogeneous(GTK_BOX(box), homogeneous); return box; } #ifdef WIN32 gchar *trg_win32_support_path(gchar * file) { gchar *moddir = g_win32_get_package_installation_directory_of_module(NULL); gchar *path = g_build_filename(moddir, file, NULL); g_free(moddir); return path; } #endif gboolean is_unity(void) { return g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity") == 0; } transmission-remote-gtk-1.4.1/src/util.h000066400000000000000000000074061341276053300202520ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* Most of these functions are taken from the Transmission Project. */ #ifndef UTIL_H_ #define UTIL_H_ #include #include #include #include "trg-client.h" #define trg_strlspeed(a, b) tr_formatter_speed_KBps(a, b, sizeof(a)) #define trg_strlpercent(a, b) tr_strlpercent(a, b, sizeof(a)) #define trg_strlsize(a, b) tr_formatter_size_B(a, b, sizeof(a)) #define trg_strlratio(a, b) tr_strlratio(a, b, sizeof(a)) #define MAX3(a,b,c) MAX(a,MAX(b,c)) #define TR_RATIO_NA -1 #define TR_RATIO_INF -2 extern const int disk_K; extern const char *disk_K_str; extern const char *disk_M_str; extern const char *disk_G_str; extern const char *disk_T_str; extern const int speed_K; extern const char *speed_K_str; extern const char *speed_M_str; extern const char *speed_G_str; extern const char *speed_T_str; void add_file_id_to_array(JsonObject * args, const gchar * key, gint index); void g_str_slist_free(GSList * list); GRegex *trg_uri_host_regex_new(void); gchar *trg_gregex_get_first(GRegex * rx, const gchar * uri); gchar *make_error_message(JsonObject * response, int status); void trg_error_dialog(GtkWindow * parent, trg_response * response); gchar *add_links_to_text(const gchar * original); void tr_formatter_size_init(unsigned int kilo, const char *kb, const char *mb, const char *gb, const char *tb); char *tr_formatter_size_B(char *buf, gint64 bytes, size_t buflen); void tr_formatter_speed_init(unsigned int kilo, const char *kb, const char *mb, const char *gb, const char *tb); char *tr_formatter_speed_KBps(char *buf, double KBps, size_t buflen); char *tr_strltime_long(char *buf, long seconds, size_t buflen); gchar *epoch_to_string(gint64 epoch); char *tr_strltime_short(char *buf, long seconds, size_t buflen); char *tr_strlpercent(char *buf, double x, size_t buflen); char *tr_strratio(char *buf, size_t buflen, double ratio, const char *infinity); char *tr_strlratio(char *buf, double ratio, size_t buflen); char *gtr_localtime(time_t time); char *gtr_localtime2(char *buf, time_t time, size_t buflen); double tr_truncd(double x, int decimal_places); char *tr_strlsize(char *buf, guint64 bytes, size_t buflen); void rm_trailing_slashes(gchar * str); void trg_widget_set_visible(GtkWidget * w, gboolean visible); gchar *trg_base64encode(const gchar * filename); GtkWidget *my_scrolledwin_new(GtkWidget * child); gboolean is_url(const gchar * string); gboolean is_magnet(const gchar * string); GtkWidget *gtr_combo_box_new_enum(const char *text_1, ...); gboolean should_be_minimised(int argc, char *argv[]); gboolean is_minimised_arg(const gchar * arg); GtkWidget *trg_vbox_new(gboolean homogeneous, gint spacing); GtkWidget *trg_hbox_new(gboolean homogeneous, gint spacing); gboolean is_unity(void); #ifdef WIN32 gchar *trg_win32_support_path(gchar * file); #endif #endif /* UTIL_H_ */ transmission-remote-gtk-1.4.1/src/win32-mailslot.c000066400000000000000000000144421341276053300220520ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if WIN32 #define TRG_MAILSLOT_NAME "\\\\.\\mailslot\\TransmissionRemoteGTK" #define MAILSLOT_BUFFER_SIZE 1024*32 #include #include #include #include #include "trg-main-window.h" #include "win32-mailslot.h" struct trg_mailslot_recv_args { TrgMainWindow *win; gchar **uris; gboolean present; }; /* to be queued into the glib main loop with g_idle_add() */ static gboolean mailslot_recv_args(gpointer data) { struct trg_mailslot_recv_args *args = (struct trg_mailslot_recv_args *) data; if (args->present) { gtk_window_deiconify(GTK_WINDOW(args->win)); gtk_window_present(GTK_WINDOW(args->win)); } if (args->uris) trg_add_from_filename(args->win, args->uris); g_free(args); return FALSE; } static gpointer mailslot_recv_thread(gpointer data) { TrgMainWindow *win = TRG_MAIN_WINDOW(data); JsonParser *parser; char szBuffer[MAILSLOT_BUFFER_SIZE]; HANDLE hMailslot; DWORD cbBytes; BOOL bResult; hMailslot = CreateMailslot(TRG_MAILSLOT_NAME, /* mailslot name */ MAILSLOT_BUFFER_SIZE, /* input buffer size */ MAILSLOT_WAIT_FOREVER, /* no timeout */ NULL); /* default security attribute */ if (INVALID_HANDLE_VALUE == hMailslot) { g_error("\nError occurred while creating the mailslot: %d", GetLastError()); return NULL; /* Error */ } while (1) { bResult = ReadFile(hMailslot, /* handle to mailslot */ szBuffer, /* buffer to receive data */ sizeof(szBuffer), /* size of buffer */ &cbBytes, /* number of bytes read */ NULL); /* not overlapped I/O */ if ((!bResult) || (0 == cbBytes)) { g_error("Mailslot error from client: %d", GetLastError()); break; } parser = json_parser_new(); if (json_parser_load_from_data(parser, szBuffer, cbBytes, NULL)) { JsonNode *node = json_parser_get_root(parser); JsonObject *obj = json_node_get_object(node); struct trg_mailslot_recv_args *args = g_new0(struct trg_mailslot_recv_args, 1); args->present = json_object_has_member(obj, "present") && json_object_get_boolean_member(obj, "present"); args->win = win; if (json_object_has_member(obj, "args")) { JsonArray *array = json_object_get_array_member(obj, "args"); GList *arrayList = json_array_get_elements(array); if (arrayList) { guint arrayLength = g_list_length(arrayList); guint i = 0; GList *li; args->uris = g_new0(gchar *, arrayLength + 1); for (li = arrayList; li; li = g_list_next(li)) { const gchar *liStr = json_node_get_string((JsonNode *) li->data); args->uris[i++] = g_strdup(liStr); } g_list_free(arrayList); } } json_node_free(node); g_idle_add(mailslot_recv_args, args); } g_object_unref(parser); } CloseHandle(hMailslot); return NULL; /* Success */ } void mailslot_start_background_listener(TrgMainWindow * win) { g_thread_create(mailslot_recv_thread, win, FALSE, NULL); } gboolean mailslot_send_message(gchar ** args) { HANDLE hMailSlot = CreateFile(TRG_MAILSLOT_NAME, /* mailslot name */ GENERIC_WRITE, /* mailslot write only */ FILE_SHARE_READ, /* required for mailslots */ NULL, /* default security attributes */ OPEN_EXISTING, /* opens existing mailslot */ FILE_ATTRIBUTE_NORMAL, /* normal attributes */ NULL); /* no template file */ if (hMailSlot != INVALID_HANDLE_VALUE) { DWORD cbBytes; JsonNode *node = json_node_new(JSON_NODE_OBJECT); JsonObject *obj = json_object_new(); JsonArray *array = json_array_new(); JsonGenerator *generator; gchar *msg; int i; if (args) { for (i = 0; args[i]; i++) json_array_add_string_element(array, args[i]); json_object_set_array_member(obj, "args", array); g_strfreev(args); } else { json_object_set_boolean_member(obj, "present", TRUE); } json_node_take_object(node, obj); generator = json_generator_new(); json_generator_set_root(generator, node); msg = json_generator_to_data(generator, NULL); json_node_free(node); g_object_unref(generator); WriteFile(hMailSlot, /* handle to mailslot */ msg, /* buffer to write from */ strlen(msg) + 1, /* number of bytes to write, include the NULL */ &cbBytes, /* number of bytes written */ NULL); CloseHandle(hMailSlot); g_free(msg); return TRUE; } return FALSE; } #endif transmission-remote-gtk-1.4.1/src/win32-mailslot.h000066400000000000000000000021231341276053300220500ustar00rootroot00000000000000/* * transmission-remote-gtk - A GTK RPC client to Transmission * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef WIN32_MAILSLOT_H_ #define WIN32_MAILSLOT_H_ #if WIN32 #include #include "trg-main-window.h" void mailslot_start_background_listener(TrgMainWindow * win); int mailslot_send_message(gchar ** args); #endif #endif /* WIN32_MAILSLOT_H_ */ transmission-remote-gtk-1.4.1/src/win32.rc000066400000000000000000000016321341276053300204070ustar00rootroot000000000000001 ICON "transmission_large.ico" // Executable version information. 1 VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 FILEFLAGSMASK 0x17L #ifdef DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "080904b0" BEGIN VALUE "CompanyName", "eth0.org.uk" VALUE "FileDescription", "Transmission Remote GTK" VALUE "FileVersion", "1, 0, 0, 0" VALUE "InternalName", "transmission-remote-gtk" VALUE "LegalCopyright", "2011 Alan Fitton" VALUE "OriginalFilename", "transmission-remote-gtk.exe" VALUE "ProductName", "Transmission Remote GTK" VALUE "ProductVersion", "1, 0, 0, 0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x809, 1200 END END