pax_global_header00006660000000000000000000000064142122206460014511gustar00rootroot0000000000000052 comment=4c6a72b35b236d31469bc371829f9107e261d1b1 gpaste-3.42.6/000077500000000000000000000000001421222064600130705ustar00rootroot00000000000000gpaste-3.42.6/.clang-format000066400000000000000000000004721421222064600154460ustar00rootroot00000000000000--- AlignAfterOpenBracket: true AlignOperands: true AlignTrailingComments: true AlwaysBreakAfterDefinitionReturnType: All BinPackArguments: false BreakBeforeBraces: Allman ColumnLimit: 0 IndentWidth: 4 MaxEmptyLinesToKeep: 1 SpaceBeforeParens: Always UseTab: Never ... Language: JavaScript DisableFormat: true ... gpaste-3.42.6/.github/000077500000000000000000000000001421222064600144305ustar00rootroot00000000000000gpaste-3.42.6/.github/FUNDING.yml000066400000000000000000000000201421222064600162350ustar00rootroot00000000000000github: Keruspe gpaste-3.42.6/.gitignore000066400000000000000000000010721421222064600150600ustar00rootroot00000000000000/.buildconfig /.cache /Makefile /bin/* /build /tests/bin/* /data/appstream/*.appdata.xml /data/appstream/*.appdata.valid /data/control-center/*.xml /data/desktop/*.desktop /data/desktop/*.desktop.in /data/dbus/*.service /data/gsettings/*.gschema.xml /data/systemd/*.service /bindings /data/pkg-config/*.pc /man/*.1 /ABOUT-NLS /po/Makefile /po/Makevars.template /po/Rules-quot /po/boldquot.sed /po/en@boldquot.header /po/en@quot.header /po/insert-header.sin /po/quot.sed /po/remove-potcdate.sed /po/remove-potcdate.sin /src/gnome-shell/metadata.json /test-suite.log *.mo gpaste-3.42.6/AUTHORS000066400000000000000000000001051421222064600141340ustar00rootroot00000000000000Lead developer Marc-Antoine Perennou gpaste-3.42.6/COPYING000066400000000000000000000024651421222064600141320ustar00rootroot00000000000000Copyright (c) 2010-2018, Marc-Antoine Perennou All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. gpaste-3.42.6/ChangeLog000066400000000000000000000002201421222064600146340ustar00rootroot000000000000002011-06-29 Marc-Antoine Perennou * *: The ChangeLog is autogenerated when releasing, see git log for changes gpaste-3.42.6/Makefile.am000066400000000000000000000063661421222064600151370ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2019, Marc-Antoine Perennou SUBDIRS = po ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} AM_MAKEFLAGS = --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS = \ --with-controlcenterdir="$$dc_install_base/$(controlcenterdir)" \ --with-dbusservicesdir="$$dc_install_base/$(dbusservicesdir)" \ --with-systemduserunitdir="$$dc_install_base/$(systemduserunitdir)" \ --enable-appstream-util \ --enable-gnome-shell-extension \ --enable-introspection \ --enable-vala \ $(NULL) AM_CPPFLAGS = \ -include config.h \ -I$(srcdir)/src/libgpaste \ -I$(srcdir)/src/libgpaste/client \ -I$(srcdir)/src/libgpaste/core \ -I$(srcdir)/src/libgpaste/daemon \ -I$(srcdir)/src/libgpaste/gnome-shell-client \ -I$(srcdir)/src/libgpaste/io \ -I$(srcdir)/src/libgpaste/keybinder \ -I$(srcdir)/src/libgpaste/screensaver-client \ -I$(srcdir)/src/libgpaste/settings \ -I$(srcdir)/src/libgpaste/settings-ui \ -I$(srcdir)/src/libgpaste/util \ -DG_PASTE_COMPILATION \ -DGTK_API=$(GTK_API) \ -DLOCALEDIR=\"$(localedir)\" \ -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" \ -DG_LOG_USE_STRUCTURED=1 \ -DGDK_DISABLE_DEPRECATED \ -DGTK_DISABLE_DEPRECATED \ $(NULL) EXTRA_DIST = \ autogen.sh \ README.md \ $(NULL) CLEANFILES = SUFFIXES = bin_PROGRAMS = pkginclude_HEADERS = pkglibexec_PROGRAMS = lib_LTLIBRARIES = noinst_LTLIBRARIES = TESTS= noinst_PROGRAMS= \ $(TESTS) \ $(NULL) # Libraries include src/libgpaste.mk # Bindings include src/gi.mk include src/vapi.mk # Core utilities include src/client.mk include src/daemon.mk include src/ui.mk # Gnome-Shell extension include src/gnome-shell.mk # Data include data/appstream.mk include data/completions.mk include data/control-center.mk include data/dbus.mk include data/desktop.mk include data/gsettings.mk include data/pkg-config.mk include data/search-provider.mk include data/systemd.mk # Man pages include man/1.mk # Tests stuff include tests/gnome-shell-client.mk # Meson stuff include meson.mk # Maintainance stuff update-po: $(MAKE) -C po $@ release: $(MAKE) update-po && \ $(MAKE) distcheck && \ git commit -asm "Release $(PACKAGE_NAME) $(PACKAGE_VERSION)" && \ git tag -sm "Release $(PACKAGE_NAME) $(PACKAGE_VERSION)" v$(PACKAGE_VERSION) # Generate a ChangeLog file from 'git log' dist-hook: @ if test -d "$(srcdir)/.git"; then \ cd "$(srcdir)"; \ echo -e '# Generated by Makefile. Do not edit.\n\n' > $(distdir)/ChangeLog; \ $(srcdir)/build-aux/missing --run git log >> $(distdir)/ChangeLog; \ fi gpaste-3.42.6/NEWS000066400000000000000000000742351421222064600136020ustar00rootroot00000000000000NEW in 3.42.6 (15/02/2022) ============= - fix the storage path in meson builds NEW in 3.42.5 (15/02/2022) ============= - fix some race conditions in history handling NEW in 3.42.4 (15/02/2022) ============= - better fix crash when there is no history yet NEW in 3.42.3 (15/02/2022) ============= - fix crash when there is no history yet - translations update NEW in 3.42.2 (24/11/2021) ============= - fix gnome-shell exntesion when the daemon restarts - translations update NEW in 3.42.1 (30/10/2021) ============= - fix keybindings on wayland - translations update NEW in 3.42.0 (28/09/2021) ============= - port to gnome-shell 41 - translations update NEW in 3.40.3 (26/09/2021) ============= - translations update NEW in 3.40.2 (30/04/2021) ============= - fix a crash in memory usage checking NEW in 3.40.1 (10/04/2021) ============= - fix build with meson NEW in 3.40.0 (09/04/2021) ============= - port to gnome-shell 40 - placeholder for gnome-shell prefs NEW in 3.38.6 (08/03/2021) ============= - fix X11 keybinder outside of GNOME NEW in 3.38.5 (03/02/2021) ============= - better handling and reporting of invalid uuids passed to gpaste-client - gpaste-client now has a --use-index argument for several subcommands to use index instead of uuid NEW in 3.38.4 (22/12/2020) ============= - fix the make-password keybinding - updated translations NEW in 3.38.3 (02/11/2020) ============= - gnome-shell extension warning fixes - updated translations NEW in 3.38.2 (03/10/2020) ============= - gnome-shell extension cosmetic updates NEW in 3.38.1 (01/10/2020) ============= - Disable images support by default (can be reenabled in preferences) - Search now includes passwords (using their names) - systemd integration enhancements NEW in 3.38.0 (15/09/2020) ============= - Drop the Tracking DBus signal - Switch to uuids to identify items - Bump DBus interface to org.gnome.GPaste2 - Update to gnome-shell 3.38.0 NEW in 3.36.5 (08/03/2021) ============= - fix X11 keybinder outside of GNOME NEW in 3.36.4 (03/10/2020) ============= - gnome-shell extension cosmetic updates NEW in 3.36.3 (27/03/2020) ============= - Fix activating items using Ctrl-Number in gnome-shell NEW in 3.36.2 (19/03/2020) ============= - Fix keybinding regrab with gnome-shell NEW in 3.36.1 (19/03/2020) ============= - Fix keybinding grab with gnome-shell NEW in 3.36.0 (08/03/2020) ============= - Update to gnome-shell 3.36.0 NEW in 3.34.4 (27/03/2020) ============= - Fix activating items using Ctrl-Number in gnome-shell NEW in 3.34.3 (19/03/2020) ============= - Fix keybinding regrab with gnome-shell NEW in 3.34.2 (19/03/2020) ============= - Fix keybinding grab with gnome-shell NEW in 3.34.1 (09/10/2019) ============= - Compatibility with recent appstream-glib NEW in 3.34.0 (09/09/2019) ============= - Update to gnome-shell 3.34.0 NEW in 3.32.1 (27/03/2020) ============= - Compatibility with recent appstream-glib - Fix keybinding regrab with gnome-shell - Fix activating items using Ctrl-Number in gnome-shell NEW in 3.32.0 (12/03/2019) ============= - Update to gnome-shell 3.32.0 - Allow loading settings from ~/.config/gpaste/settings NEW in 3.30.2 (14/11/2018) ============= - Fix warnings with gcc 8 - Fix ItemSelected dbus signal - Fix crash with recent gnome-shell when emptying history NEW in 3.30.1 (08/09/2018) ============= - workaround a bug in gnome-shell 3.30.0 NEW in 3.30.0 (08/09/2018) ============= - silence warnings with gcc 8 - update dependencies for gnome 3.30 NEW in 3.28.3 (14/11/2018) ============= - Fix warnings with gcc 8 - Fix ItemSelected dbus signal - Fix crash with recent gnome-shell when emptying history NEW in 3.28.2 (13/04/2018) ============= - fix a crash in images support NEW in 3.28.1 (26/03/2018) ============= - gnome-shell extension cleanups - allow disabling the confirmation dialog for emptying history NEW in 3.28.0 (13/03/2018) ============= - gpaste-daemonn now emits a dbus signal when an item is selected - gpaste-client can now print the history in reverse order - drop gtk4 support, it will come back later - API adjustments to prepare for the future gtk4 port - ask confirmation before emptying a history NEW in 3.26.3 (13/04/2018) ============= - fix a crash in images support NEW in 3.26.2 (08/03/2018) ============= - fix regression in gnome-shell extension - fix another potential images memory leak NEW in 3.26.1 (07/03/2018) ============= - fix memory leaks in images support - silence a warnings in the gnome-shell extension NEW in 3.26.0 (16/09/2017) ============= - Javascript modernizations - Adapt to gjs 1.50 - Adapt to gnome-shell/mutter 3.26 - use the new clipboardText feature in the search provider - gtk4 3.91.2 compatibility NEW in 3.24.6 (13/04/2018) ============= - fix a crash in images support NEW in 3.24.5 (08/03/2018) ============= - fix regression in gnome-shell extension - fix another potential images memory leak NEW in 3.24.4 (07/03/2018) ============= - fix memory leaks in images support - silence a warnings in the gnome-shell extension NEW in 3.24.3 (16/09/2017) ============= - Pagination fixes in the gnome-shell extension - Fix some cransh in gpaste-ui NEW in 3.24.2 (19/05/2017) ============= - `gpaste-client add` now accepts reading from stdin - you can't have two passwords with the same name in the history anymore - prevent a bug adding a password both as password and text in come case NEW in 3.24.1 (08/04/2017) ============= - fix a regression in Passwords handling NEW in 3.24.0 (07/04/2017) ============= - change the history format to 2.0 to be more flexible (backward compatible) - unify and consolidate some clipboard interactions - handle text/html and text/xml mime types NEW in 3.23.90 (20/03/2017) ============= - applet and unity app-indicator have been removed - a minimal applet is available there: https://github.com/Keruspe/gpaste-applet - Dutch translation has been added - gtk4 is now supported (--with-gtk=4.0) - gnome-shell/mutter 3.24 are now supported and required - ui will now close when you select an item (configurable) - more intuitive search interactions in the ui - preparations for future other storage backends - preparations for mime types support - more reliable "paste" behaviour part in some corener cases NEW in 3.22.7 (13/04/2018) ============= - fix a crash in images support NEW in 3.22.6 (08/03/2018) ============= - fix regression in gnome-shell extension - fix another potential images memory leak NEW in 3.22.5 (07/03/2018) ============= - fix memory leaks in images support - silence a warnings in the gnome-shell extension NEW in 3.22.4 (19/05/2017) ============= - `gpaste-client add` now accepts reading from stdin - you can't have two passwords with the same name in the history anymore - prevent a bug adding a password both as password and text in come case NEW in 3.22.3 (28/02/2017) ============= - fix switch in gnome-shell extension - fix some wrongly detected growing line NEW in 3.22.2 (17/02/2017) ============= - fix memory leaks in the debugging logs - fix some corner case in images handling - fix crash in UI when refreshing during search - stability improvements NEW in 3.22.1 (30/11/2016) ============= - Fix some build system issues for vala and gobject-introspection NEW in 3.22.0 (08/10/2016) ============= - Depend on gtk+ 3.22, glib 2.50, gobject-introspeciton 1.50 - Bug fixes and simplifications in pagination handling for gnome-shell - Fix bug with clipboard/primary selection synchronisation - Fix racy calls to gtk_clipboard_store NEW in 3.21.91 (17/09/2016) ============= - Lots of fixes in the gnome-shell extension pagination - Fix a crash when trying to add binary data with gpaste-client - Use GLib new structured logging - Update appstream files NEW in 3.21.90 (09/09/2016) ============= - Port from intltool to gettext - pkg-config 0.29 is now required - Port to the internal mutter-clutter - gnome-shell extension cleanup - Add pagination to gnmoe-shell extension NEW in 3.20.8 (13/04/2018) ============= - fix a crash in images support NEW in 3.20.7 (08/03/2018) ============= - fix memory leaks in images support - silence a warnings in the gnome-shell extension NEW in 3.20.6 (28/02/2017) ============= - fix switch in gnome-shell extension - fix refresh with search in the ui - fix some wrongly detected growing line NEW in 3.20.5 (17/02/2017) ============= - fix memory leaks in the debugging logs - fix some corner case in images handling - stability improvements NEW in 3.20.4 (28/06/2016) ============= - Fix some extensive CPU usage in some cases NEW in 3.20.3 (14/06/2016) ============= - Fix soname versioning NEW in 3.20.2 (24/05/2016) ============= - Add missing icon NEW in 3.20.1 (23/05/2016) ============= - Fix crash when a search goes wrong - Fix hanging issue due to gtk+ race (?) in gtk_clipboard_store - Fix the gnome-shell menu sometimes displaying twice - Add debug logs to the core library - Fix some build issues with some toolchains NEW in 3.20 (23/03/2016) ============= - Relicensing from GPL-3 to BSD-2 - Detect the presence of more features at runtime instead of compile time - The gpaste-client cli has been mostly rewritten - "gpaste-client file" now supports adding images to the history - The legacy "gpaste" cli is gone - gnome-shell extension cleanups and compatibility with 3.20 - automake 1.15 is required - pkg-config 0.27 is required - gtk+ 3.20, vala 0.32 (if --enable-vapi) and gobject-introspection 1.48 are required - gpaste-ui now has a "new" button to add new contents to the clipboard - The daemon now reexecs itself on SIGUSR1 - Avoid having two passwords under the same name in history - libgpaste now logs into its own G_LOG_DOMAIN - GPaste components now write their pid to a file - A new tool is provided for debugging, but not installed: clipboard-watcher - systemd user units are provided - Build system cleanups - Outdated translations have been dropped - gobject-introspection fixes - Fix style with gtk+ 3.20 - Implement the new shotcut window from gtk+ - Various code cleanups NEW in 3.18.8 (13/04/2018) ============= - fix a crash in images support NEW in 3.18.7 (08/03/2018) ============= - fix memory leaks in images support - silence a warnings in the gnome-shell extension NEW in 3.18.6 (17/02/2017) ============= - fix memory leaks in the debugging logs - fix some corner case in images handling - stability improvements NEW in 3.18.5 (28/06/2016) ============= - fix some extensive CPU usage in some cases NEW in 3.18.4 (22/05/2016) ============= - fix crash when a search goes wrong - fix hanging issue due to gtk+ race (?) in gtk_clipboard_store - fix the gnome-shell menu sometimes displaying twice - add debug logs to the core library NEW in 3.18.3 (15/01/2016) ============= - fix synchronisation issues between clipboard and primary selection - fix a memory leak - never handle images when images support is disabled NEW in 3.18.2 (16/10/2015) ============= - fix disabling legacy cli - fix gnome-shell empty button - fix emptying the active history - fix showing about dialog - update brazilian portuguese translation NEW in 3.18.1.1 (27/09/2015) ============= - few build system cleanups - gobject-introspection fixes NEW in 3.18.1 (23/09/2015) ============= - fix a regression in growing lines detection NEW in 3.18 (21/09/2015) ============= - Warning, this is a big release, with changes in API, you might have to kill your old daemon after upgrading - The "gpaste" cli is now "gpaste-client". old name can still be enabled with --enable-cli for now - The "gpaste settings" tool is gone, use the "burger" menu from "gpaste-client ui" - The graphical tool now allows you to fully manage your histories - The graphical tool now allows you to restart the daemon - The graphical tool now allows you to edit an element from the history - The graphical tool new allows you to upload an element to a pastebin service (requires wgetpaste) - The graphical tool now displays the size of each history - The graphical tool now displays the index of each element in the history - The graphical tool has been slightly redisigned - A new gnome-shell search-provider is provided by the daemon - When searching e.g. "42", the 42nd element from hsitory will be included in search results - gpaste-client gained a new subcommand: "get-history" to get the name of the current history - gpaste-client gained a new subcommand: "replace" to replace the content of an item in the history - Compatibility with gnome-shell 3.18 - The daemon now "works" on wayland using XWayland and gnome-shell 3.18 - The dbus interface name is now org.gnome.GPaste1 - The "Empty" dbus method has been renamed "EmptyHistory" - The "NameLost" and "ReexecuteSelf" dbus signals are gone - Three new dbus signals: "DeleteHistory", "EmptyHistory" and "SwitchHistory" - The daemon gained new dbus methods: GetItemKind, GetElements, GetHistoryName, Replace - BackupHistory EmptyHistory and DeleteHistory now take the history as a parameter instead of the current one - GPasteClient hasn't the "name-lost" and "reexecute-self" signals anymore - GPasteClient gained three new signals: "delete-history", "empty-history" and "switch-history" - GPasteHistory gained a new "switch" signal - GPasteHistory now tracks dconf to switch between histories - A few formerly private constructors and methods are now publicly available - The way GPaste handles dbus conection and objects have significantly been reworked - Everything is now handled using 64bits types (the numeric settings have thus been reset and some max values changed) - A lot of code cleanup and rearchitecturation - Signals are now properly documented for gobject-introspection and thus bindings - Various build system cleanups (gobject-introspection and vapigen are now required to build from git - Shell completion updates - Translations updates NEW in 3.16.3.1 (23/09/2015) ============= - fix a regression in growing lines detection NEW in 3.16.3 (05/09/2015) ============= - various gnome-shell extension fixes - prevent potential crash from external library users NEW in 3.16.2.1 (11/05/2015) ============= - gpaste; fix error in pipe detection NEW in 3.16.2 (11/05/2015) ============= - gpaste; allow taking password from stdin NEW in 3.16.1 (29/04/2012) ============= - bump max history size - fix weird behaviour wrt screensaver NEW in 3.16 (23/03/2015) ============= - new subcommand: gpaste merge to merge various entries (with --decoration and --separator) - new tool: gpaste-ui (minimal graphical interface) - legacy applet reworked to use gpaste ui - ubuntu app indicator reworked to use gpaste ui - new keybinding to launch gpaste ui - new keybinding to upload clipboard content to a pastebin service (requires wgetpaste >= 2.26) - the daemon now returns standard DBus errors on invalid input - name dbus parameters - gnome-shell 3.16 support (require gnome-shell 3.16 because of breaking changes) - require glib 2.44 and gtk 3.16 - compatibility with new glib autoptr mechanism - fully switch to appstream - updated shell completions - updated translations - various libgpaste api cleanups (bump soname to 3, rework libtool versioning) - detect applet and app-indicator at runtime instead of build time - fix bug with recent glib - make a lot more stuff async - gpasted is dead (long live gpaste-daemon) - Changed DBus signal is dead - drop old ubuntu compat patches - drop gpaste-config.h - drop old manual pages for applet and app-indicator - drop legacy gpaste subcommands (raw, oneline, zero, favor --raw, --oneline and --raw) - various bugfixes - some progress regarding wayland support NEW in 3.14.4.1 (11/05/2015) ============= - gpaste; fix error in pipe detection NEW in 3.14.4 (11/05/2015) ============= - gpaste; allow taking password from stdin NEW in 3.14.3 (21/03/2015) ============= - fix crashes related to images support NEW in 3.14.2 (07/03/2015) ============= - improve zsh completion - fix a bug causing the gnome-shell extension to randomly crash NEW in 3.14.1 (17/01/2015) ============= - search is now always done by the daemon, not the gnome-shell extension - new gpaste subcomand: search - gpaste now accepts --online --raw and --zero options - search is now async - various gnome-shell extension fixes - updated completions - we now restore the clipboard contents when unlocking the screensaver NEW in 3.14 (10/10/2014) ============= - update for latest gobject-introspection - support gnome-shell 3.14 - start redesign of the gnome-shell extension - new gpaste show-history command NEW in 3.12.3.1 and 3.10.4.1 (09/10/2014) ============= - a bug preventing the history to be saved to disk has been fixed - prevent a segfault when loading large histories - add a new gpaste oneline-history command NEW in 3.12.3 and 3.10.4 (25/09/2014) ============= - gpaste-daemon now has an Update dbus signal more precise than Changed - desktop files fixes - all calls to clipboard are now async - performance improvements - gpaste-client has been updated to match gpaste-daemon changes with an update signal - gnome-shell extension has been ported to the update signal - applets have been ported to the update signal - gnome-shell search bar now matches the user theme NEW in 3.12.2 and 3.10.3 (28/07/2014) ============= - gpasted has been renamed gpaste-daemon - Desktop files have been fixed - Fixes for the ubuntu app-indicator - Keybinding to mark an item as being a password - All libgpaste-* have been merged into a single libgpaste - Misc bugfixes reported for debian packaging NEW in 3.12.1 and 3.10.2 (16/07/2014) ============= - systemd support has been removed - GPaste is now compliant with https://wiki.gnome.org/HowDoI/DBusApplicationLaunching - GPaste now has built-in support for managing passwords, blog post coming. - Completions and man pages have been updated - Translations have been updated - Miscellaneous bugfixes with static analysis - The search feature of the gnome-shell extension has been improved NEW in 3.12 (02/05/2014) ============= - Improved compatibility with GNOME 3.12 NEW in 3.10.1 (01/05/2014) ============= - gpasted no longer fails at runtime if gnome-shell's settings schema is not installed - growing lines are detected for lines getting expanded at their left too - gnome-shell extension has been rewritten - gnome-shell extension now has a search bar - translations update - misc bugfixes NEW in 3.10 (25/03/2014) ============= - Follow GNOME versionning - Don't display error on daemon-reexec - Fix coredumps due to g_error - New library: libgpaste-applet - Unity support (for Ubuntu 14.04 and above) using libgpaste-applet - Port legacy applet to libgpaste-applet and rename to StatusIcon - Redesign GPaste StatusIcon to make it simpler and similar to gnome-shell extension - Vala is no longer required to build the applet (rewritten in C) - Lower automake dependency to 1.11 - Be compatible with gnome-shell up to 3.12 - libgpaste-settings: add reset - gpaste settings: add reset buttons - gpaste settings: add a switch to enable the gnome-shell extension - The gnome-shell gsettings schema is now required when --enable-extension is provided (default) - gpasted: GetElement now returns the display string - gpasted now forwards the full history via dbus, letting the client manage the display limit - gpasted gained GetHistoryLength, GetRawHistory, GetRawElement and About - gpasted gained a new Version property - Add about dialog to all components - Prefer dark theme - Display more info at the end of configure - Provide appdata files - Parallel build fixes - Fix build issues for Fedora, Ubuntu and Debian - clang related fixes - Fix warnings - Translations update NEW in 3.8 (10/02/2014) ============= - Fix german translation - No longer depend on libxml - Update Portugueuse and French translations - New growing-lines feature - Misc bufixes NEW in 3.7 (09/11/2013) ============= - "Paste and Pop" is now only "Pop" - Fix SEGV when deleting last item of history - New gnome-shell DBus client library - DBus client libraries are now async - Keybinder now uses gnome-shell if available to grab keys - Preparations for wayland port - Enhance internal memory management - Code cleanup - Misc bug fixes - German translation NEW in 3.6 (17/10/2013) ============= - GPaste settings look has been updated to better fit with recent GNOME - Performance improvements - Daemon now fully evenmential (no more polling, less power consuption) - GPasteClipboard now has a "owner-change" signal similar to GtkClipboard's one - Misc. bugfixes - New setting to set the maximum amount of memory used by data in history - FIFO mode has been dropped (lacking design) - Code cleanup and modernisation - g_paste_history_add is now transfer full NEW in 3.5 (25/09/2013) ============= - Compatibility with gnome-shell 3.9.90 and above - The gnome-shell applet has totally been rewritten and is now more intuitive. - Port to newer glib - Don't use deprecated stuff from gtk+ - The X11 keybinder is now optional - New keybinding to sync the clipboard to the primary selection - New keybinding to sync the primary selection to the clipboard NEW in 3.3.1 (22/03/2014) ============= - Build fixes for debian wheezy NEW in 3.3 (22/02/2014) ============= - New growing-lines feature (backported from 3.8) NEW in 3.2.2 (22/10/2013) ============= - "Paste and Pop" is now only "Pop" - Fix SEGV at startup - Fix SEGV when deleting last item of history NEW in 3.2.1 (19/10/2013) ============= - Update translations - Fix build with old glib NEW in 3.2 (16/10/2013) ============= - Performance improvements - Daemon now fully evenmential (no more polling, less power consuption) - GPasteClipboard now has a "owner-change" signal similar to GtkClipboard's one - Misc. bugfixes - New setting to set the maximum amount of memory used by data in history - FIFO mode has been dropped (lacking design) - g_paste_history_add is now transfer full NEW in 3.1 (23/09/2013) ============= - Compatibility with gnome-shell up to 3.9.5 - New keybinding to sync the clipboard to the primary selection - New keybinding to sync the primary selection to the clipboard NEW in 3.0.2 (01/06/2013) ============= - Fix build without gnome-control-center installed - Fix focus when using in gnome-shel extension NEW in 3.0.1 (13/04/2013) ============= - Fix build NEW in 3.0 (13/04/2013) ============= - Various build fixes - Support of gnome-control-center for setting keybindings - Compatibility with newer gnome-shell NEW in 2.99.2 (22/01/2013) ============= - Fix a bug making gpaste settings ui a no-op - Don't close legacy applet menu when deleting an item - Fix vala bindings - Updated portuguese translation NEW in 2.99.1 (15/01/2013) ============= - Fix a few typos in the conditional code for applet and extension - Fix make install when GPaste is not yet installed - Clean desktop files NEW in 2.99 (14/01/2013) ============= - Compatibility with recent development releases of gnome-shell - "gpaste f" now defers the file reading to the GPaste daemon - libgpaste-client does now fully cover the GPaste DBus API - libgpaste-keybinder has been ported to use XInput2 - keybindings have been fixed - The gnome-shell extension has been ported to use libgpaste-client - A systemd user unit is now provided - New library: libgpaste-settings-ui - gpaste-settings has been ported to libgpaste-settings-ui - The gnome-shell extension now has a pref.js module based on libgpaste-settings-ui - An autostart desktop file is now provided with the legacy applet - gobject-introspection and vala support are now optional - Various code cleanup NEW in 2.9.1 (01/12/2012) ============= - Fix memory leak when handling images - Fix duplicated images in history - Fix "changed" signal in GPasteSettings NEW in 2.9 (29/09/2012) ============= - Now depends on intltool 0.50 - Automake stack is even more modular - libgpaste has been split into sublibs: libgpaste-core, libgpaste-keybinder and libgpaste-settings - New libraries: libgpaste-client and libgpaste-daemon - gpaste CLI is rewritten in C - Keybindings have totally been reworked - Performance improvements - Various code cleanup - Images support can now be disabled - Paste and Pop keybinding may behave weirdly because of gtk+ NEW in 2.8.1 (05/05/2012) ============= - Fix crash in g_paste_daemon_tracking NEW in 2.8 (02/05/2012) ============= - Various cleanup and bugfixes - The history file now has a version number - CDATA can now be copied - ToggleHistory is now ShowHistory - The "keyboard-shortcut" preferences is now called "show-history" - New feature : Paste & Pop with a new keybinding (experimental) - Vapi is no longer shipped and is generated when building - Now requires automake 1.12 and autoconf 2.69 - Brazilian Portuguese translation by Elder Marco - FIFO mode - Multi-history with "gpaste backup-history" and "gpaste switch-history" - New commands: "gpaste delete-history" and "gpaste list-histories" - gpaste-settings has been rewritten - libgpaste improvements NEW in 2.5 (08/03/2012) ============= - Reexecute has now a signal: ReexecuteSelf - New library to externalize the core: libgpaste written in C with introspection and vapi - Various build system cleanup - Small bug fixes - Port gpasted to libgpaste and rewrite it in C - Port gpaste-settings to libgpaste - Port gpaste-applet to libgpaste NEW in 2.2.1 (07/01/2012) ============= - Regen tarball with intltool 0.41.1 NEW in 2.2 (07/01/2012) ============= - Content is now stripped before being added to clipboard - New settings for maximum and minimum size of an item (thanks to Lukáš Zapletal) - Various code cleanup - Fix keybinding handling (conflict with mutter in keyboard grabbing) - Ability to stop tracking changes when disabling extension - Rewrite of gpaste-settings NEW in 2.1 (01/12/2011) ============= - Fix a bug which was "randomly" deleting image files - Generate tarball with sane vala to unbreak keybindings NEW in 2.0 (27/11/2011) ============= - Updated finnish translation - Cleanups - Fix separators disapearing in gnome-shell extension - Don't close menu when deleting items - Uris support (files copying) - Rewrite of bash and zsh completions - Various fixes NEW in 1.99 (2.0 RC) (02/11/2011) ============= - Finnish translation by Jesse Jaara - Be consistent with the shell applet menu structure - New gpaste subcommand: raw-history to display history without numbers - Switch to GDbus - New images support (feedback appreciated) NEW in 1.6 (20/09/2011) ============= - Make hotkey work with legacy applet - New GPaste subcommand for upgrading facilities: gpaste daemon-reexec - Major autotools cleanup - Fix linkage of gpasted against X11 - Bugfixes - Espagnol translation by Antonio Trujillo NEW in 1.5 (11/09/2011) ============= - No trace of the applet at all with --disable-applet - No more "shutdown-on-exit" key, just use the prefs or the command line - Preparation for future images support - History file is now ~/.gpaste_history - Use AM_PROG_VALAC - New "gpaste get " command for subshell usage (And GetElement DBus method) - Get rid of AM_MAINTAINER_MODE - Add possibility to have a keyboard shortcut to display the history - Do not add to history the last selected item when re tracking for changes NEW in 1.4 (07/09/2011) ============= - pod2man is no more needed - Add ability not to save the history from one session to another - Fix segfault at daemon startup with invalid utf8 string NEW in 1.3.1 (03/09/2011) ============= - Nothing NEW in 1.3 (31/08/2011) ============= - New gpaste option: file/-f/--file , same as cat | gpaste - Adapt to new gnome-shell extension API NEW in 1.2 (10/07/2011) ============= - Avoid AM_GLIB_GNU_GETTEXT macro - Don't run configure in autogen.bash - Really restore tracking state at startup NEW in 1.1 (09/07/2011) ============= - Save whether we're tracking clipboard changes or not from a session to another - Only build gnome-shell applet by default - Launch and Quit DBus method are now Track(bool) - Start and Exit DBus signals are now Tracking(bool) NEW in 1.0 (05/07/2011) ============= - Switch to .tar.xz - Various bug fixes - Silence some warnings - Get rid of the History.changed signal - Rework internal Settings handling NEW in 0.99 (28/02/2011) ============= - Depend on gtk+ 3.0.0 - Really fix the segfault taht should have been fixed in 0.9 - Namespace refactoring - Libexec stuff is now installed into a gpaste subdir - Code cleanup - Explicit DBus API (with breakage) - Rename gpaste-{preferences -> settings} - New "exit" signal - "start" is now a signal - Build the gnome-shell native extension with --enable-extension - The daemon no longer exits, it just stop tracking clipboard changes - New DBus property: Active to see if the daemon is tracking - Fix an encoding issue - Quit is now Stop NEW in 0.9 (05/02/2011) ============= - Fix a segfault when trying to restore from an empty history into an empty clipboard at startup - Better output for empty history - gpaste version - gpaste applet to spawn the applet - gpaste-applet and gpaste-preferences are now installed into libexecdir - gpaste add foo is now an alias for gpaste foo (add foo to history) - Add gpaste preferences alias for gpaste-preferences - There can now only be one instance of the applet and daemon at a time - You can now avoid building the applet with --disable-applet - bash and zsh completions, manual NEW in 0.8 (03/02/2011) ============= - Fix behaviour of '\n' substitution with small string, and disable it with element-size = 0 - Change default values to adapt to new behaviours - Add ability to empty the history from the right clic on the applet or via "gpaste empty" - Do not display history when it is empty NEW in 0.7 (02/02/2011) ============= - The first element in history is now restored into clipboards if they are empty at startup - You can now shutdown the daemon with "gpaste quit" - A preference has been added for the applet to shutdown the daemon when exiting - A preference has been added to set a maximum size for each item when the applet displays them NEW in 0.6 (01/02/2011) ============= - Now, we store the settings and we connect to the change signal to each one of them instead of retrieving them every time - Fix a bug with the '_' character which was interpreted as an underlinement when displaying the history from the applet - Add ability to synchronize the primary selection and the clipboard NEW in 0.5 (01/02/2011) ============= First release ! Content: - gpasted: daemon with DBus interface - gpaste: CLI client for gpasted - gpaste-preferences: tool to edit preferences - gpaste-applet: tray icon for managing gpasted gpaste-3.42.6/README.md000066400000000000000000000036101421222064600143470ustar00rootroot00000000000000 Coverity Scan Build Status GPaste is a clipboard management system. See for more information about what clipboard managers are. Translators can use [weblate](https://hosted.weblate.org/projects/gpaste/gpaste/) to contribute. A library is available for development purposes: * `libgpaste` contains all the basic objects used by GPaste and allows you to manage preferences and the GPaste daemon. A default daemon named `gpaste-daemon` is provided, with seven keybindings: * show history * pop the item from the history * sync primary selection with clipboard * sync clipboard with primary selection * mark the active item as being a password * upload the active item to a pastebin service (using wgetpaste) * launch the graphical tool A simple CLI interface is provided: `gpaste-client`, with a subcommands: `gpaste-client ui` which makes the graphical tool pop. A native gnome-shell extension is provided. /!\ Don't forget to run `gpaste-client dr` aka `gpaste-client daemon-reexec` after upgrading GPaste to activate new functionalities ;) You can then run `gpaste-client daemon-version` to check the correct daemon is now running. Steps to install it after cloning (skip the `./autogen.sh` part if you're building it from a tarball): ./autogen.sh ./configure --sysconfdir=/etc make sudo make install sudo glib-compile-schemas /usr/share/glib-2.0/schemas/ You can see everything I'll post about GPaste [there](https://www.imagination-land.org/tags/GPaste.html). Latest release for GNOME 41 is: [GPaste 3.42.6](https://www.imagination-land.org/posts/2022-02-24-gpaste-3.42.6-released.html). Direct link to download: gpaste-3.42.6/THANKS000066400000000000000000000011061421222064600140010ustar00rootroot00000000000000Christian Kluge Christian Schendel Elder Marco Gary van der Merwe Heimen Stoffels Jan Alexander Steffens (heftig) Jesse Jaara Julien Durillon Jérémy Lal Louis Lukas Zapletal Mog Toni TC camporez renataogarcia whyoh gpaste-3.42.6/TODO000066400000000000000000000003041421222064600135550ustar00rootroot00000000000000general: wayland support properties all the way (when GProperty stuff lands) libgpaste-client: specify errors types when possible in g-i tests: split test, add interactive wrapper gpaste-3.42.6/autogen.sh000077500000000000000000000024001421222064600150650ustar00rootroot00000000000000#!/bin/bash set -euo pipefail autotools() { autoreconf -i -Wall } clean() { git clean -fdx autotools } scan_build_run() { scan-build --use-analyzer=/usr/bin/clang "${@}" } scan_build() { clean scan_build_run ./configure "${@}" scan_build_run make } static_analysis() { coverity-submit scan_build "${@}" } full() { static_analysis "${@}" clean ./configure "${@}" make make distcheck } run_action() { local action="${1}" shift local configure_args=( --prefix=/usr --sysconfdir=/etc --enable-appstream-util --enable-gnome-shell-extension --enable-introspection --enable-vala --enable-x-keybinder ) case "${action}" in configure-full|cf) ./configure "${configure_args[@]}" "${@}" ;; coverity|cov) coverity-submit ;; scan-build|sb) scan_build "${configure_args[@]}" "${@}" ;; static-analysis|sa) static_analysis "${configure_args[@]}" "${@}" ;; full) full "${configure_args[@]}" "${@}" ;; esac } main() { autotools [[ "${#}" == 0 ]] || run_action "${@}" } main "${@}" gpaste-3.42.6/configure.ac000066400000000000000000000173411421222064600153640ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou m4_define([gpaste_version], [3.42.6]) # Update gpaste_lt_version before each release (and only then) # The format is C:R:A (current revision age) # - If any interface has been added, ‘C:R:A’ becomes ‘C+1:0:A+1’. # - If any interface has been removed or modified, ‘C:R:A’ becomes ‘C+1:0:0’. # - Otherwise, ‘C:R:A’ becomes ‘C:R+1:A’. m4_define([gpaste_lt_version], [13:7:0]) # Build system requirements m4_define([autoconf_required], [2.69]) m4_define([automake_required], [1.15]) m4_define([libtool_required], [2.2.6]) m4_define([pkgconfig_required], [0.29]) # Glib and Gtk macros and dependencies m4_define([glib_major_required], [2]) m4_define([glib_minor_required], [70]) m4_define([glib_api_required], [G_ENCODE_VERSION(glib_major_required, glib_minor_required)]) m4_define([glib_required], [glib_major_required.glib_minor_required.0]) m4_define([gtk3_major_required], [3]) m4_define([gtk3_minor_required], [24]) m4_define([gtk3_api_required], [G_ENCODE_VERSION(gtk3_major_required, gtk3_minor_required)]) m4_define([gtk3_required], [gtk3_major_required.gtk3_minor_required.0]) m4_define([gtk4_major_required], [3]) m4_define([gtk4_minor_required], [94]) m4_define([gtk4_api_required], [G_ENCODE_VERSION(gtk4_major_required, gtk4_minor_required)]) m4_define([gtk4_required], [gtk4_major_required.gtk4_minor_required.0]) # Other dependencies m4_define([gdk_pixbuf_required], [2.38.0]) m4_define([gir_required], [1.58.0]) m4_define([gjs_required], [1.54.0]) m4_define([vala_required], [0.42]) AC_PREREQ(autoconf_required) AC_INIT([GPaste], [gpaste_version], [Marc-Antoine@Perennou.com], [gpaste]) AC_SUBST([PACKAGE_NAME]) AC_SUBST([PACKAGE_VERSION]) LIBGPASTE_LT_VERSION="gpaste_lt_version" AC_SUBST([LIBGPASTE_LT_VERSION]) AC_DEFINE_UNQUOTED([GLIB_VERSION_MIN_REQUIRED], [glib_api_required], [The lowest GLib API version supported]) AC_DEFINE_UNQUOTED([GLIB_VERSION_MAX_ALLOWED], [glib_api_required], [The highest GLib API version supported]) AC_ARG_WITH([gtk], AS_HELP_STRING([--with-gtk=3.0|4.0], [GTK API to user]), [], [with_gtk=3.0]) case "${with_gtk}" in 3.0) AC_DEFINE_UNQUOTED([GDK_VERSION_MIN_REQUIRED], [gtk3_api_required], [The lowest Gdk API version supported]) AC_DEFINE_UNQUOTED([GDK_VERSION_MAX_ALLOWED], [gtk3_api_required], [The highest Gdk API version supported]) GTK_REQUIRED=gtk3_required GTK_DEP="gtk+-3.0" GDK_DEP="gdk-3.0" GDK_X11_DEP="gdk-x11-3.0" ;; # 4.0) # AC_DEFINE_UNQUOTED([GDK_VERSION_MIN_REQUIRED], [gtk4_api_required], [The lowest Gdk API version supported]) # AC_DEFINE_UNQUOTED([GDK_VERSION_MAX_ALLOWED], [gtk4_api_required], [The highest Gdk API version supported]) # GTK_REQUIRED=gtk4_required # GTK_DEP="gtk+-4.0" # GDK_DEP="gtk+-4.0" # GDK_X11_DEP="gtk+-x11-4.0" # ;; *) AC_MSG_ERROR([Wrong gtk+ version specified: ${with_gtk}]) ;; esac AC_SUBST([GTK_API], "${with_gtk:0:1}") AC_DEFINE([G_PASTE_DEFAULT_HISTORY], ["history"], [The default hsitory name]) AC_DEFINE([G_PASTE_ICON_NAME], ["edit-paste"], [The name of the icon used by GPaste]) AC_DEFINE([G_PASTE_EXTENSION_NAME], ["GPaste@gnome-shell-extensions.gnome.org"], [The name of the GPaste extension]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([src/]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) AC_PREFIX_DEFAULT([/usr]) AC_USE_SYSTEM_EXTENSIONS AM_PROG_AR LT_PREREQ(libtool_required) LT_INIT([disable-static pic-only]) AM_INIT_AUTOMAKE(automake_required [subdir-objects check-news foreign no-dist-gzip dist-xz tar-ustar -Wall]) AM_MAINTAINER_MODE([enable]) AM_SILENT_RULES([yes]) AC_PROG_AWK AC_PROG_SED AC_PROG_MKDIR_P AC_PROG_LN_S AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_CPP AC_PROG_CC AC_PROG_CC_C99 AM_PROG_CC_C_O AC_C_INLINE AC_TYPE_MODE_T AC_FUNC_ALLOCA AC_CHECK_FUNCS([mkdir]) AC_CHECK_HEADER_STDBOOL G_PASTE_APPEND_CFLAGS G_PASTE_APPEND_LDFLAGS GETTEXT_PACKAGE=${PACKAGE_NAME} AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["${GETTEXT_PACKAGE}"], [Gettext Package]) AC_SUBST([GETTEXT_PACKAGE]) AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.7]) PKG_PREREQ(pkgconfig_required) PKG_PROG_PKG_CONFIG([pkgconfig_required]) PKG_INSTALLDIR PKG_CHECK_MODULES(GLIB, [glib-2.0 >= glib_required gobject-2.0 >= glib_required gio-2.0 >= glib_required]) PKG_CHECK_MODULES(GTK, [${GDK_DEP} >= ${GTK_REQUIRED} ${GTK_DEP} >= ${GTK_REQUIRED} pango]) PKG_CHECK_MODULES(GTK3, [gtk+-3.0 >= 3.24]) PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0 >= gdk_pixbuf_required]) PKG_CHECK_MODULES(X11, [x11 xi]) PKG_CHECK_MODULES(APPSTREAM, [appstream-glib]) AC_CHECK_HEADERS([X11/extensions/XInput2.h]) GLIB_GSETTINGS APPSTREAM_XML GOBJECT_INTROSPECTION_CHECK([gir_required]) VAPIGEN_CHECK([vala_required]) # For bus_services_dir in pkg-config PKG_CHECK_MODULES(DBUS, [dbus-1]) G_PASTE_WITH([controlcenterdir], [Gnome control-center keybindings directory], [`${PKG_CONFIG} --variable keysdir gnome-keybindings`]) G_PASTE_WITH([dbusservicesdir], [D-Bus system session directory], [`${PKG_CONFIG} --variable session_bus_services_dir dbus-1`]) G_PASTE_WITH([systemduserunitdir], [systemd user units directory], [`${PKG_CONFIG} --variable systemduserunitdir systemd`]) G_PASTE_ENABLE([bash-completion], [Disable the bash completion], [yes]) G_PASTE_ENABLE([gnome-shell-extension], [Disable gnome-shell extension], [yes]) G_PASTE_ENABLE([x-keybinder], [Disable the X keybinder], [yes]) G_PASTE_ENABLE([zsh-completion], [Disable the zsh completion], [yes]) AS_IF([test x${enable_gnome_shell_extension} = xyes], [ AS_IF([test x${enable_introspection} != xyes], [AC_MSG_ERROR([*** Introspection support is required to run the gnome-shell extension])]) PKG_CHECK_MODULES(JS_EXTENSION, [mutter-clutter-9 gjs-1.0 >= gjs_required]) ]) AS_IF([test x${enable_x_keybinder} = xyes], [ PKG_CHECK_MODULES(GDK_X11, [${GDK_X11_DEP} >= ${GTK_REQUIRED}]) AC_DEFINE([ENABLE_X_KEYBINDER], [1], [Whether the X keybinder is built]) ]) AS_IF([test x${enable_bash_completion} = xyes], [ G_PASTE_WITH([bashcompletiondir], [Bash completion directory], ['${datadir}/bash-completion/completions']) ]) AS_IF([test x${enable_zsh_completion} = xyes], [ G_PASTE_WITH([zshcompletiondir], [Zsh completion directory], ['${datadir}/zsh/site-functions']) ]) AC_CONFIG_FILES([ Makefile po/Makefile.in ]) AC_OUTPUT AC_MSG_RESULT([ ${PACKAGE_NAME} ${VERSION} =========== prefix: ${prefix} exec_prefix: ${exec_prefix} sysconfdir: ${sysconfdir} libdir: ${libdir} libexecdir: ${libexecdir} includedir: ${includedir} datarootdir: ${datarootdir} datadir: ${datadir} compiler: ${CC} cflags: ${CFLAGS} ldflags: ${LDFLAGS} gtk+ API: ${with_gtk} vapi generator: ${VAPIGEN} GObject Introspection: ${enable_introspection} Vapi: ${enable_vala} Gnome-Shell extension: ${enable_gnome_shell_extension} X keybinder support: ${enable_x_keybinder} Control Center dir: ${controlcenterdir} DBus user services dir: ${dbusservicesdir} systemd user units dir: ${systemduserunitdir} Bash completion: ${enable_bash_completion} Bash completion dir: ${bashcompletiondir} Zsh completion: ${enable_zsh_completion} Zsh completion dir: ${zshcompletiondir} ]) gpaste-3.42.6/data/000077500000000000000000000000001421222064600140015ustar00rootroot00000000000000gpaste-3.42.6/data/appstream.mk000066400000000000000000000011241421222064600163240ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou @APPSTREAM_XML_RULES@ appstream_in_files = \ %D%/appstream/org.gnome.GPaste.Ui.appdata.xml.in \ $(NULL) appstream_XML = $(appstream_in_files:.xml.in=.xml) SUFFIXES += .appdata.xml.in .appdata.xml .appdata.xml.in.appdata.xml: @ $(MKDIR_P) $(@D) $(AM_V_GEN) $(MSGFMT) --xml --template $< -o $@ -d $(top_builddir)/po/ EXTRA_DIST += \ $(appstream_in_files) \ $(NULL) CLEANFILES += \ $(appstream_XML) \ $(NULL) gpaste-3.42.6/data/appstream/000077500000000000000000000000001421222064600157755ustar00rootroot00000000000000gpaste-3.42.6/data/appstream/meson.build000066400000000000000000000003271421222064600201410ustar00rootroot00000000000000i18n.merge_file( input: 'org.gnome.GPaste.Ui.appdata.xml.in', po_dir: gpaste_po_dir, output: 'org.gnome.GPaste.Ui.appdata.xml', install: true, install_dir: join_paths(get_option('datadir'), 'metainfo'), ) gpaste-3.42.6/data/appstream/org.gnome.GPaste.Ui.appdata.xml.in000066400000000000000000000265761421222064600242060ustar00rootroot00000000000000 org.gnome.GPaste.Ui.desktop GPaste Manage your clipboard history Marc-Antoine Perennou BSD-2-Clause CC-BY-SA-3.0 GNOME

GPaste is a clipboard managing system allowing you to track and manage your clipboard history in a highly customizable way.

GPaste provides you with a graphical tool allowing you to manage everything easily.

http://www.imagination-land.org/tags/GPaste.html The main UI http://www.imagination-land.org/images/GPaste/3/Ui-1.png The settings UI http://www.imagination-land.org/images/GPaste/3/Ui-2.png The settings UI http://www.imagination-land.org/images/GPaste/3/Ui-3.png The settings UI http://www.imagination-land.org/images/GPaste/3/Ui-4.png Marc-Antoine@Perennou.com https://github.com/Keruspe/GPaste/issues https://paypal.me/keruspe/ https://github.com/Keruspe/GPaste/issues https://github.com/Keruspe/GPaste GPaste

This is a maintenance release. Changes:

  • fix the storage path for meson builds

This is a maintenance release. Changes:

  • fix some race conditions in history handling

This is a maintenance release. Changes:

  • better fix crash when there is no history yet

This is a maintenance release. Changes:

  • fix crash when there is no history yet
  • translations update

This is a maintenance release. Changes:

  • fix gnome-shell exntesion when the daemon restarts
  • translations update

This is a maintenance release. Changes:

  • Fix keybindings for wayland
  • translations update

First release for GNOME 41. Changes:

  • port to gnome-shell 41
  • translations update

This is a maintenance release. Changes:

  • translations update

This is a maintenance release. Changes:

  • fix a crash in memory usage checking

First release for GNOME 40. Changes:

  • port to gnome-shell 40
  • placeholder for gnome-shell prefs

This is a maintenance release. Changes:

  • fix X11 keybinder outside of GNOME

This is a maintenance release. Changes:

  • better handling and reporting of invalid uuids passed to gpaste-client
  • gpaste-client now has a --use-index argument for several subcommands to use index instead of uuid

This is a maintenance release. Changes:

  • fix the make-password keybinding
  • updated translations

This is a maintenance release. Changes:

  • gnome-shell extension warning fixes
  • updated translations

This is a maintenance release. Changes:

  • gnome-shell extension cosmetic updates

This is a maintenance release. Changes:

  • Disable images support by default (can be reenabled in preferences)
  • Search now includes passwords (using their names)
  • systemd integration enhancements

First release for GNOME 3.38. Changes:

  • Drop the Tracking DBus signal
  • Switch to uuids to identify items
  • Bump DBus interface to org.gnome.GPaste2
  • Update to gnome-shell 3.38.0

This is a maintenance release. Changes:

  • fix X11 keybinder outside of GNOME

This is a maintenance release. Changes:

  • gnome-shell extension cosmetic updates

This is a maintenance release. Changes:

  • Fix activating items using Ctrl-Number in gnome-shell

This is a maintenance release. Changes:

  • Fix keybinding regrab with gnome-shell

This is a maintenance release. Changes:

  • Fix keybinding grab with gnome-shell

First release for GNOME 3.36. Changes:

  • Update to gnome-shell 3.36.0

This is a maintenance release. Changes:

  • Fix activating items using Ctrl-Number in gnome-shell

This is a maintenance release. Changes:

  • Fix keybinding regrab with gnome-shell

This is a maintenance release. Changes:

  • Fix keybinding grab with gnome-shell

This is a maintenance release. Changes:

  • Compatibility with recent appstream-glib

First release for GNOME 3.34. Changes:

  • Update to gnome-shell 3.34.0

This is a maintenance release. Changes:

  • Compatibility with recent appstream-glib
  • Fix keybinding regrab with gnome-shell
  • Fix activating items using Ctrl-Number in gnome-shell
gpaste-3.42.6/data/completions.mk000066400000000000000000000004721421222064600166710ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou bashcompletion_DATA = %D%/completions/gpaste-client zshcompletion_DATA = %D%/completions/_gpaste-client EXTRA_DIST += \ $(bashcompletion_DATA) \ $(zshcompletion_DATA) \ $(NULL) gpaste-3.42.6/data/completions/000077500000000000000000000000001421222064600163355ustar00rootroot00000000000000gpaste-3.42.6/data/completions/_gpaste-client000066400000000000000000000076021421222064600211630ustar00rootroot00000000000000#compdef gpaste-client (( $+functions[_gpaste-client_complete_arguments] )) || _gpaste-client_complete_arguments() { local -a base_arguments file_arguments get_arguments history_arguments base_arguments=( '(-h --help)'{-h,--help}'[Display the help.]' '(-v --version)'{-v,--version}'[Display the version.]' ) file_arguments=( '*:file:_files' ) get_arguments=( '(-r --raw)'{-r,--raw}'[Display the raw item, not the display string.]' ) history_arguments=( '(-o --oneline)'{-o,--oneline}'[Display each item on one line.]' '(-e --reverse)'{-e,--reverse}'[Display the items in reverse order.]' '(-r --raw)'{-r,--raw}'[Display each item raw (without index).]' '(-z --zero)'{-z,--zero}'[Use a NUL character instead of a newline between each item.]' ) merge_arguments=( '(-d --decoration)'{-d,--decoration}'[Add the decoration at the beginning and end of each item before merging.]' '(-s --separator)'{-s,--separator}'[Add a separator between each item when merging.]' ) case "${1}" in base) _arguments -s : \ ${base_arguments} ${history_arguments} ;; file|f) _arguments -s : \ ${file_arguments} ;; get|g) _arguments -s : \ ${get_arguments} ;; history|h) _arguments -s : \ ${history_arguments} ;; merge|m) _arguments -s : \ ${merge_arguments} ;; esac } (( $+functions[_gpaste-client_complete_subcommands] )) || _gpaste-client_complete_subcommands() { local -a subcommands subcommands=( {add,a}:"Set text to clipboard" {add-password,ap}:"Add a name - password couple to the clipboard" "about:Display the about dialog" {backup-history,bh}:"Backup current history" {daemon-reexec,dr}:"Reexecute the daemon" {daemon-version,dv}:"Display the daemon version" {delete,del,d,remove,rm}:"Delete an element of the history" {delete-history,dh}:"Delete a history" {delete-password,dp}:"Delete a password" {empty,e}:"Empty the history" {file,f}:"Put content of file into clipboard" {get,g}:"Display an element of the history" {get-history,gh}:"Get the name of the current history" "help:Display the help" {history,h}:"Display the history with indexes" {history-size,hs}:"Display the size of the history" {list-histories,lh}:"List available histories" {merge,m}:"Merge various elements from history" {rename-password,rp}:"Rename a password" "replace:Replace the contents of an item" {select,set,s}:"Select an element of the history" {set-password,sp}:"Mark an item as being a password" {settings,preferences,p}:"Launch the configuration tool" {start,daemon,d}:"Start the daemon" {stop,quit,q}:"Shutdown the daemon" "show-history:Make the applet or extension display the history" {switch-history,sh}:"Switch to another history" "ui:Launch the graphical tool" {upload,u}:"Upload item to a pastebin service" {version,v}:"Display the version" {zero-history,zh}:"Display the history with NUL as separator" ) _describe -t commands 'gpaste-client subcommand' subcommands _gpaste-client_complete_arguments "base" } _gpaste-client() { if (( CURRENT > 2 )); then local cmd="${words[2]}" local ctx="gpaste-client" while (( CURRENT > 2 )); do ctx="${ctx}-${words[2]}" (( CURRENT-- )) shift words done curcontext="${curcontext%:*:*}:${ctx}" _gpaste-client_complete_arguments "${cmd}" else _gpaste-client_complete_subcommands fi } _gpaste-client "${@}" gpaste-3.42.6/data/completions/gpaste-client000066400000000000000000000022101421222064600210120ustar00rootroot00000000000000_gpaste-client() { local cur cur="${COMP_WORDS[${COMP_CWORD}]}" COMPREPLY=() if [[ ${COMP_CWORD} == 1 ]]; then local opts opts="about add add-password backup-history daemon daemon-reexec daemon-version delete delete-history --decoration -d delete-password empty file get get-history help --help -h history history-size list-histories merge --oneline -o preferences quit remove --raw -r rename-password replace --reverse -e select --separator -s set set-password settings show-history start stop switch-history upload ui version --version -v --zero -z" COMPREPLY=( $(compgen -W "${opts}" -- ${cur} ) ) elif [[ ${COMP_CWORD} == 2 ]]; then local action action="${COMP_WORDS[1]}" case "${action}" in file|f) COMPREPLY=( $(compgen -f ) ) ;; get|g) COMPREPLY=( compgen -W "--raw -r" -- ${cur} ) ;; history|h) COMPREPLY=( compgen -W "--oneline -o --raw -r --reverse -e --zero -z" -- ${cur} ) ;; esac fi } complete -F _gpaste-client gpaste-client gpaste-3.42.6/data/completions/meson.build000066400000000000000000000005041421222064600204760ustar00rootroot00000000000000if get_option('bash-completion') install_data( 'gpaste-client', install_dir: join_paths(get_option('datadir'), 'bash-completion', 'completions'), ) endif if get_option('zsh-completion') install_data( '_gpaste-client', install_dir: join_paths(get_option('datadir'), 'zsh', 'site-functions'), ) endif gpaste-3.42.6/data/control-center.mk000066400000000000000000000010611421222064600172660ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou controlcenter_DATA = \ %D%/control-center/42-gpaste.xml \ $(NULL) SUFFIXES += .control-center.xml.in .xml .control-center.xml.in.xml: @ $(MKDIR_P) $(@D) $(AM_V_GEN) $(SED) -e 's,[@]GETTEXT_PACKAGE[@],$(GETTEXT_PACKAGE),g' < $< > $@ EXTRA_DIST+= \ $(controlcenter_DATA:.xml=.control-center.xml.in) \ $(NULL) CLEANFILES+= \ $(controlcenter_DATA) \ $(NULL) gpaste-3.42.6/data/control-center/000077500000000000000000000000001421222064600167375ustar00rootroot00000000000000gpaste-3.42.6/data/control-center/42-gpaste.control-center.xml.in000066400000000000000000000017121421222064600245320ustar00rootroot00000000000000 gpaste-3.42.6/data/control-center/meson.build000066400000000000000000000002411421222064600210760ustar00rootroot00000000000000configure_file( input: '42-gpaste.control-center.xml.in', configuration: conf, output: '42-gpaste.xml', install: true, install_dir: keybindings_dir, ) gpaste-3.42.6/data/dbus.mk000066400000000000000000000011701421222064600152660ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou nodist_dbusservices_DATA = \ %D%/dbus/org.gnome.GPaste.service \ %D%/dbus/org.gnome.GPaste.Ui.service \ $(NULL) SUFFIXES += .service .dbus.in .dbus.in.service: @ $(MKDIR_P) $(@D) $(AM_V_GEN) $(SED) \ -e 's,[@]pkglibexecdir[@],$(pkglibexecdir),g' \ <$< >$@ EXTRA_DIST += \ $(nodist_dbusservices_DATA:.service=.dbus.in) \ $(NULL) CLEANFILES += \ $(nodist_dbusservices_DATA) \ $(NULL) gpaste-3.42.6/data/dbus/000077500000000000000000000000001421222064600147365ustar00rootroot00000000000000gpaste-3.42.6/data/dbus/meson.build000066400000000000000000000005231421222064600171000ustar00rootroot00000000000000configure_file( input: 'org.gnome.GPaste.Ui.dbus.in', configuration: conf, output: 'org.gnome.GPaste.Ui.service', install: true, install_dir: dbus_service_dir, ) configure_file( input: 'org.gnome.GPaste.dbus.in', configuration: conf, output: 'org.gnome.GPaste.service', install: true, install_dir: dbus_service_dir, ) gpaste-3.42.6/data/dbus/org.gnome.GPaste.Ui.dbus.in000066400000000000000000000002121421222064600216460ustar00rootroot00000000000000[D-BUS Service] Name=org.gnome.GPaste.Ui Exec=@pkglibexecdir@/gpaste-ui --gapplication-service SystemdService=org.gnome.GPaste.Ui.service gpaste-3.42.6/data/dbus/org.gnome.GPaste.dbus.in000066400000000000000000000001611421222064600212750ustar00rootroot00000000000000[D-BUS Service] Name=org.gnome.GPaste Exec=@pkglibexecdir@/gpaste-daemon SystemdService=org.gnome.GPaste.service gpaste-3.42.6/data/desktop.mk000066400000000000000000000020401421222064600157770ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou autostartdir = $(sysconfdir)/xdg/autostart applicationsdir = $(datadir)/applications gpaste_ui_desktop_file = %D%/desktop/org.gnome.GPaste.Ui.desktop all_desktop_files = \ $(gpaste_ui_desktop_file) \ $(NULL) nodist_autostart_DATA = \ $(NULL) nodist_applications_DATA = \ $(gpaste_ui_desktop_file) \ $(nodist_autostart_DATA) \ $(NULL) SUFFIXES += .desktop.in.in .desktop.in .desktop .desktop.in.in.desktop.in: @ $(MKDIR_P) $(@D) $(AM_V_GEN) $(SED) -e 's,[@]pkglibexecdir[@],$(pkglibexecdir),g' < $< > $@ .desktop.in.desktop: @ $(MKDIR_P) $(@D) $(AM_V_GEN) $(MSGFMT) --desktop --template $< -o $@ -d $(top_builddir)/po/ EXTRA_DIST += \ $(all_desktop_files:.desktop=.desktop.in.in) \ $(NULL) CLEANFILES += \ $(all_desktop_files) \ $(all_desktop_files:.desktop=.desktop.in) \ $(NULL) gpaste-3.42.6/data/desktop/000077500000000000000000000000001421222064600154525ustar00rootroot00000000000000gpaste-3.42.6/data/desktop/meson.build000066400000000000000000000005771421222064600176250ustar00rootroot00000000000000untranslated_desktop_file = configure_file( input: 'org.gnome.GPaste.Ui.desktop.in.in', configuration: conf, output: 'org.gnome.GPaste.Ui.desktop.in', ) i18n.merge_file( input: untranslated_desktop_file, po_dir: gpaste_po_dir, type: 'desktop', output: 'org.gnome.GPaste.Ui.desktop', install: true, install_dir: join_paths(get_option('datadir'), 'applications'), ) gpaste-3.42.6/data/desktop/org.gnome.GPaste.Ui.desktop.in.in000066400000000000000000000004601421222064600235100ustar00rootroot00000000000000[Desktop Entry] Type=Application Name=GPaste Comment=Manage your clipboard history Keywords=Clipboard;Manager;Settings;Preferences;Configuration; Icon=edit-paste Exec=@pkglibexecdir@/gpaste-ui DBusActivatable=true Terminal=false Categories=GTK;GNOME;Settings;X-GNOME-PersonalSettings; StartupNotify=true gpaste-3.42.6/data/gsettings.mk000066400000000000000000000015551421222064600163470ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou gpaste_gschema_file = %D%/gsettings/org.gnome.GPaste.gschema.xml gschemas_compiled = %D%/gsettings/gschemas.compiled gsettings_SCHEMAS = \ $(gpaste_gschema_file) \ $(NULL) @GSETTINGS_RULES@ $(gpaste_gschema_file:.xml=.valid): $(gpaste_gschema_file) @ $(MKDIR_P) $(@D) $(gschemas_compiled): $(gsettings_SCHEMAS:.xml=.valid) $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --targetdir=$(srcdir) . SUFFIXES += .gschema.xml.in .gschema.xml .gschema.xml.in.gschema.xml: @ $(MKDIR_P) $(@D) $(AM_V_GEN) $(SED) -e 's,[@]GETTEXT_PACKAGE[@],$(GETTEXT_PACKAGE),g' < $< > $@ EXTRA_DIST += \ $(gpaste_gschema_file:.xml=.xml.in) \ $(NULL) CLEANFILES += \ $(gpaste_gschema_file) \ $(gschemas_compiled) \ $(NULL) gpaste-3.42.6/data/gsettings/000077500000000000000000000000001421222064600160105ustar00rootroot00000000000000gpaste-3.42.6/data/gsettings/meson.build000066400000000000000000000003311421222064600201470ustar00rootroot00000000000000configure_file( input: 'org.gnome.GPaste.gschema.xml.in', configuration: conf, output: 'org.gnome.GPaste.gschema.xml', install: true, install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas'), ) gpaste-3.42.6/data/gsettings/org.gnome.GPaste.gschema.xml.in000066400000000000000000000172251421222064600236310ustar00rootroot00000000000000 60 Max size of an element when displaying it The extra stuff of that element will be replaced by "…", and newlines by " " when displaying from the applet, 0 to disable. false Do we detect and replace growing lines in history? By default, selecting "Here is", then "Here is an example" will create two entries in the history. With this feature enabled, the first one will be replaced by the second one. 'history' The name of the current history The default name is "history" false Do we save the images copied to history, or only text? By default, we're saving only text true Do we close the UI after selecting an item? By default, we close it '<Ctrl><Alt>G' The keyboard shortcut to launch the graphical interface By default, hitting ctrl + alt + g does that ("<Ctrl><Alt>G"). An empty string here disables this functionnality. '<Ctrl><Alt>S' The keyboard shortcut to mark the active item as being a password By default, hitting ctrl + alt + s will mark the active item as being a password ("<Ctrl><Alt>S"). An empty string here disables this functionnality. 20 Max displayed history size Maximum number of items displayed in the history 100 Max history size Maximum number of items in history 30 Max memory usage (MB) Maximum amount of memory used to store contents 1048575 Max text item size Maximum size of a text item. Anything out of this boundary is ignored. 1 Min text item size Minimum size of a text item. Anything out of this boundary is ignored. '<Ctrl><Alt>V' The keyboard shortcut to delete the first element in history By default, hitting ctrl + alt + v does that ("<Ctrl><Alt>V"). An empty string here disables this functionnality. false Does the primary selection affects history? By default, only clipboard (ctrl+c) affects history. true Do we save all versions of selected rich text (e.g. html) or just the plain text version? By default, we're saving all true Do we save the history from one session to another? By default, we're saving it '<Ctrl><Alt>H' The keyboard shortcut to display the menu By default, hitting ctrl + alt + h displays the menu ("<Ctrl><Alt>H"). An empty string here disables this functionnality. '<Ctrl><Alt>O' The keyboard shortcut to sync the clipboard to the primary selection By default, hitting ctrl + alt + o syncs them ("<Ctrl><Alt>P"). An empty string here disables this functionnality. '<Ctrl><Alt>P' The keyboard shortcut to sync the primary selection to the clipboard By default, hitting ctrl + alt + p syncs them ("<Ctrl><Alt>P"). An empty string here disables this functionnality. false Are the primary selection and the clipboard synchronized? By default, the primary selection and the clipboard are independent. true Do we track the clipboard changes? By default, we're tracking those changes. false Do we sync the daemon state with the gnome-shell extension's one? (disable the daemon when disabling the extension) By default, the daemon state keeps unchanged false Do we trim the textual items before adding them to history? Trimming means removing all trailing and ending spaces. By default, we're letting them as-is. '<Ctrl><Alt>U' The keyboard shortcut to upload the first element in history to a pastebin service By default, hitting ctrl + alt + u does that ("<Ctrl><Alt>U"). An empty string here disables this functionnality. true Do we prompt for confirmation when emptying a history? By default, we do as it's a destructive action gpaste-3.42.6/data/meson.build000066400000000000000000000007741421222064600161530ustar00rootroot00000000000000subdir('appstream') subdir('completions') subdir('control-center') subdir('dbus') subdir('desktop') subdir('gsettings') if get_option('gnome-shell') subdir('search-provider') endif if get_option('systemd') subdir('systemd') endif pkg = import('pkgconfig') pkg.generate( libgpaste, name: 'libgpaste', filebase: 'gpaste-' + apiversion, subdirs: 'gpaste', description: 'Library to handle and communicate with GPaste', requires: [ gdk_pixbuf_dep, gio_dep, glib_dep, gobject_dep, gtk_dep ], ) gpaste-3.42.6/data/pkg-config.mk000066400000000000000000000011541421222064600163570ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou SUFFIXES += .pc.in .pc .pc.in.pc: @ $(MKDIR_P) $(@D) $(AM_V_GEN) $(SED) \ -e 's,[@]libdir[@],$(libdir),g' \ -e 's,[@]includedir[@],$(includedir),g' \ -e 's,[@]VERSION[@],$(VERSION),g' \ < $< > $@ nodist_pkgconfig_DATA = \ %D%/pkg-config/gpaste-1.0.pc \ $(NULL) EXTRA_DIST += \ $(nodist_pkgconfig_DATA:.pc=.pc.in) \ $(NULL) CLEANFILES += \ $(nodist_pkgconfig_DATA) \ $(NULL) gpaste-3.42.6/data/pkg-config/000077500000000000000000000000001421222064600160255ustar00rootroot00000000000000gpaste-3.42.6/data/pkg-config/gpaste-1.0.pc.in000066400000000000000000000004001421222064600205270ustar00rootroot00000000000000libdir=@libdir@ includedir=@includedir@ Name: libgpaste Description: Library to handle and communicate with GPaste Version: @VERSION@ Requires: gdk-pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gtk+-3.0 Cflags: -I${includedir}/gpaste Libs: -L${libdir} -lgpaste gpaste-3.42.6/data/search-provider.mk000066400000000000000000000005351421222064600174320ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou searchproviderdir= $(datadir)/gnome-shell/search-providers/ if ENABLE_GNOME_SHELL_EXTENSION dist_searchprovider_DATA = \ %D%/search-provider/org.gnome.GPaste.search-provider.ini \ $(NULL) endif gpaste-3.42.6/data/search-provider/000077500000000000000000000000001421222064600170765ustar00rootroot00000000000000gpaste-3.42.6/data/search-provider/meson.build000066400000000000000000000002161421222064600212370ustar00rootroot00000000000000install_data( 'org.gnome.GPaste.search-provider.ini', install_dir: join_paths(get_option('datadir'), 'gnome-shell', 'search-providers'), )gpaste-3.42.6/data/search-provider/org.gnome.GPaste.search-provider.ini000066400000000000000000000002151421222064600257460ustar00rootroot00000000000000[Shell Search Provider] DesktopId=org.gnome.GPaste.Ui.desktop BusName=org.gnome.GPaste ObjectPath=/org/gnome/GPaste/SearchProvider Version=2 gpaste-3.42.6/data/systemd.mk000066400000000000000000000012311421222064600160170ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou nodist_systemduserunit_DATA = \ %D%/systemd/org.gnome.GPaste.service \ %D%/systemd/org.gnome.GPaste.Ui.service \ $(NULL) SUFFIXES += .service .systemd.in .systemd.in.service: @ $(MKDIR_P) $(@D) $(AM_V_GEN) $(SED) \ -e 's,[@]pkglibexecdir[@],$(pkglibexecdir),g' \ <$< >$@ EXTRA_DIST += \ $(nodist_systemduserunit_DATA:.service=.systemd.in) \ $(NULL) CLEANFILES += \ $(nodist_systemduserunit_DATA) \ $(NULL) gpaste-3.42.6/data/systemd/000077500000000000000000000000001421222064600154715ustar00rootroot00000000000000gpaste-3.42.6/data/systemd/meson.build000066400000000000000000000005631421222064600176370ustar00rootroot00000000000000configure_file( input: 'org.gnome.GPaste.Ui.systemd.in', configuration: conf, output: 'org.gnome.GPaste.Ui.service', install: get_option('systemd'), install_dir: userunit_dir, ) configure_file( input: 'org.gnome.GPaste.systemd.in', configuration: conf, output: 'org.gnome.GPaste.service', install: get_option('systemd'), install_dir: userunit_dir, ) gpaste-3.42.6/data/systemd/org.gnome.GPaste.Ui.systemd.in000066400000000000000000000002251421222064600231400ustar00rootroot00000000000000[Unit] Description=GPaste user interface [Service] Type=dbus BusName=org.gnome.GPaste.Ui ExecStart=@pkglibexecdir@/gpaste-ui --gapplication-service gpaste-3.42.6/data/systemd/org.gnome.GPaste.systemd.in000066400000000000000000000003431421222064600225650ustar00rootroot00000000000000[Unit] Description=GPaste daemon PartOf=graphical-session.target After=graphical-session.target [Service] Type=dbus BusName=org.gnome.GPaste ExecStart=@pkglibexecdir@/gpaste-daemon [Install] WantedBy=graphical-session.target gpaste-3.42.6/m4/000077500000000000000000000000001421222064600134105ustar00rootroot00000000000000gpaste-3.42.6/m4/.gitignore000066400000000000000000000000201421222064600153700ustar00rootroot00000000000000*.m4 !gpaste.m4 gpaste-3.42.6/m4/gpaste.m4000066400000000000000000000070001421222064600151320ustar00rootroot00000000000000dnl This file is part of GPaste. dnl dnl Copyright (c) 2010-2018, Marc-Antoine Perennou dnl G_PASTE_WITH([directory], [help string], [default value]) dnl Check if we override a directory and define it AC_DEFUN([_G_PASTE_WITH], [ AC_ARG_WITH([$1], AS_HELP_STRING([--with-$1=DIR], [$2]), [], [with_$4=$3]) AC_SUBST([$1], [$with_$4]) ]) AC_DEFUN([G_PASTE_WITH], [_G_PASTE_WITH([$1],[$2],[$3],AS_TR_SH([$1]))]) dnl G_PASTE_ENABLE([feature], [help string], [default value]) dnl Check if we enable a feature and define it AC_DEFUN([_G_PASTE_ENABLE], [ AC_ARG_ENABLE([$1], AS_HELP_STRING([--$5-$1], [$2]), [], [enable_$4=$3]) AM_CONDITIONAL(AS_TR_CPP(ENABLE_$1), [test x$enable_$4 = xyes]) ]) AC_DEFUN([G_PASTE_ENABLE], [_G_PASTE_ENABLE([$1],[$2],[$3],AS_TR_SH([$1]),m4_if([$3],[no],[enable],[disable]))]) dnl G_PASTE_APPEND_CFLAGS dnl Check if CFLAGS are supported by $CC and add them AC_DEFUN([_G_PASTE_APPEND_CFLAG], [ ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" AC_MSG_CHECKING([if $CC supports $1 cflag]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([int foo;])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]);CFLAGS="$ac_save_CFLAGS"]) ]) AC_DEFUN([_G_PASTE_APPEND_CFLAGS], [ for cflag in $1; do _G_PASTE_APPEND_CFLAG([$cflag]) done ]) AC_DEFUN([G_PASTE_APPEND_CFLAGS], [ _G_PASTE_APPEND_CFLAGS([ \ -pipe \ -DANOTHER_BRICK_IN_THE \ -Wall \ -W \ -Wextra \ -Wvla \ -Wundef \ -Wformat=2 \ -Wlogical-op \ -Wlogical-op-parentheses \ -Wsign-compare \ -Wformat-security \ -Wmissing-include-dirs \ -Wformat-nonliteral \ -Wold-style-definition \ -Wpointer-arith \ -Winit-self \ -Wfloat-equal \ -Wmissing-prototypes \ -Wstrict-prototypes \ -Wredundant-decls \ -Wmissing-declarations \ -Wmissing-noreturn \ -Wshadow \ -Wendif-labels \ -Wcast-align \ -Wstrict-aliasing=2 \ -Wwrite-strings \ -Wno-unknown-warning-option \ -Wno-float-equal \ -Werror=overflow \ -Wp,-D_FORTIFY_SOURCE=2 \ -ffast-math \ -fno-common \ -fdiagnostics-show-option \ -fno-strict-aliasing \ -fvisibility=hidden \ -ffunction-sections \ -fdata-sections \ ]) ]) dnl G_PASTE_APPEND_LDFLAGS dnl Check if LDFLAGS are supported by $CC and add them AC_DEFUN([_G_PASTE_APPEND_LDFLAG], [ ac_save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $1" AC_MSG_CHECKING([if $CC supports $1 ldflag]) AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 1; }])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]);LDFLAGS="$ac_save_LDFLAGS"]) ]) AC_DEFUN([_G_PASTE_APPEND_LDFLAGS], [ for ldflag in $1; do _G_PASTE_APPEND_LDFLAG([$ldflag]) done ]) AC_DEFUN([G_PASTE_APPEND_LDFLAGS], [ _G_PASTE_APPEND_LDFLAGS([ \ -Wl,--as-needed \ -Wl,--gc-sections \ ]) ]) gpaste-3.42.6/man/000077500000000000000000000000001421222064600136435ustar00rootroot00000000000000gpaste-3.42.6/man/1.mk000066400000000000000000000002641421222064600143360ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou dist_man_MANS = \ %D%/1/gpaste-client.1 \ $(NULL) gpaste-3.42.6/man/1/000077500000000000000000000000001421222064600140035ustar00rootroot00000000000000gpaste-3.42.6/man/1/gpaste-client.1000066400000000000000000000071031421222064600166250ustar00rootroot00000000000000.\" This file is part of GPaste. .\" .\" Copyright (c) 2010-2018, Marc-Antoine Perennou .TH GPASTE-CLIENT 1 .SH NAME GPaste \- A lightweight clipboard manager for the Gnome desktop .SH "SYNOPSIS" .B [command |] gpaste-client [options...] .SH "DESCRIPTION" GPaste is a modular clipboard management system with a fully DBus-based daemon, a \s-1CLI\s0 client and a gtk+ tray icon. .SH "COMMANDS" .TP .B gpaste-client [history] Display the history with indexes .br .TP .B gpaste-client history-size Display this size of the history .br .TP .B gpaste-client get-history Get the name of the current history .br .TP .B gpaste-client backup-history Backup the current history .br .TP .B gpaste-client switch-history Switch to another history .br .TP .B gpaste-client delete-history Delete a history .br .TP .B gpaste-client list-histories List available histories .br .TP .B gpaste-client add Add the text into the history .br .TP .B gpaste-client add-password Add the name \- password couple to the history .br .TP .B gpaste-client delete-password Delete the password .br .TP .B gpaste-client set-password Mark the item matching from the history as being a password named .br .TP .B gpaste-client rename-password Rename the password .br .TP .B gpaste-client get Get the item matching from the history .br .TP .B gpaste-client select Put the item matching from the history into the clipboard .br .TP .B gpaste-client replace Replace the contents of the item matching from the history with the provided one .br .TP .B gpaste-client merge [--decoration|-d ] [--separator|-s ] Merge the items matching the uuids from the history and put the result in the clipboard .br If foo bar and baz are respectively uuids 5cb227f9-857d-490b-8ea1-f5f33f59f04e b4a7aa02-ef9a-4c29-b951-ebbdb4ed279b and 99da883b-0544-4cb4-92dd-733420a9db6d in history and you run .br gpaste-client merge \-d '"' \-s ',' 5cb227f9-857d-490b-8ea1-f5f33f59f04e b4a7aa02-ef9a-4c29-b951-ebbdb4ed279b 99da883b-0544-4cb4-92dd-733420a9db6d .br You will end up with "foo","bar","baz" in your clipboard .br .TP .B gpaste-client delete Delete the item matching from the history .br .TP .B gpaste-client file Put the content of the file at into the clipboard .br .TP .B command | gpaste-client Put the output of the command into the history .br .TP .B gpaste-client empty Empty the history .br .TP .B gpaste-client start Start tracking clipboard changes .br .TP .B gpaste-client stop Stop tracking clipboard changes .br .TP .B gpaste-client upload Upload the item matching to a pastebin service .br .TP .B gpaste-client ui Launch the graphical tool .br .TP .B gpaste-client daemon-reexec Reexecute the daemon, for example after upgrading GPaste .br .TP .B gpaste-client settings Launch the configuration tool .br .TP .B gpaste-client version Display the version .br .TP .B gpaste-client daemon-version Display the daemon version .br .TP .B gpaste-client help Display the help .br .TP .B gpaste-client about Display the about dialog .br .TP .B gpaste-client show-history Make the applet or extension display the history .br .SH "OPTIONS" .TP .B --use-index Use the item index instead of its uuid .br .TP .B --oneline Display each item on one line, without new lines .br .TP .B --raw Display the item raw (without index) .br .TP .B --reverse Display the items in reverse order .br .TP .B --zero Use NUL character instead of new lines between each item .br gpaste-3.42.6/man/1/meson.build000066400000000000000000000000361421222064600161440ustar00rootroot00000000000000install_man('gpaste-client.1')gpaste-3.42.6/man/meson.build000066400000000000000000000000131421222064600157770ustar00rootroot00000000000000subdir('1')gpaste-3.42.6/meson.build000066400000000000000000000064221421222064600152360ustar00rootroot00000000000000project('GPaste', 'c', version: '3.42.6', meson_version: '>=0.50.0', ) apiversion = '1.0' gpaste_soversion = '13.0.7' glib_req='>=2.70.0' gdk_pixbuf_req='>=2.38.0' gjs_req='>=1.54.0' gtk3_req='>=3.24.0' mutter_clutter_req='>=40.0' appstream_dep = dependency('appstream-glib') gdk_dep = dependency('gdk-3.0', version: gtk3_req) gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req) gio_dep = dependency('gio-2.0', version: glib_req) glib_dep = dependency('glib-2.0', version: glib_req) gobject_dep = dependency('gobject-2.0', version: glib_req) gtk_dep = dependency('gtk+-3.0', version: gtk3_req) gtk3_dep = dependency('gtk+-3.0', version: '>=3.24') pango_dep = dependency('pango') # Don't make dbus/gnome-control-center a build dependency if so desired. # They're still required at runtime though. dbus_service_dir = get_option('dbus-services-dir') if dbus_service_dir == '' dbus_service_dir = dependency('dbus-1').get_pkgconfig_variable('session_bus_services_dir') endif keybindings_dir = get_option('control-center-keybindings-dir') if keybindings_dir == '' keybindings_dir = dependency('gnome-keybindings').get_pkgconfig_variable('keysdir') endif libgpaste_deps = [ gdk_dep, gdk_pixbuf_dep, glib_dep, gtk_dep ] if get_option('introspection') mutter_clutter_dep = dependency('mutter-clutter-9', version: mutter_clutter_req) gjs_dep = dependency('gjs-1.0', version: gjs_req) endif userunit_dir = get_option('systemd-user-unit-dir') if userunit_dir == '' if get_option('systemd') userunit_dir = dependency('systemd').get_pkgconfig_variable('systemduserunitdir') endif endif if get_option('vapi') and not get_option('introspection') error('GIR generation has to be enabled via -Dintrospection=true to build vala bindings!') endif if get_option('x-keybinder') add_project_arguments( '-DENABLE_X_KEYBINDER=1', language: 'c', ) gdk_x11_dep = dependency('gdk-x11-3.0', version: gtk3_req) x11_dep = dependency('x11') xi_dep = dependency('xi') libgpaste_deps += [ gdk_x11_dep, xi_dep, x11_dep ] endif add_project_arguments( '-DG_LOG_DOMAIN="GPaste"', '-DG_LOG_USE_STRUCTURED=1', '-DG_PASTE_COMPILATION', '-DG_PASTE_DEFAULT_HISTORY="history"', '-DG_PASTE_EXTENSION_NAME="GPaste@gnome-shell-extensions.gnome.org"', '-DG_PASTE_ICON_NAME="edit-paste"', '-DGDK_DISABLE_DEPRECATED', '-DGETTEXT_PACKAGE="GPaste"', '-DGTK_API=3', '-DGTK_DISABLE_DEPRECATED', '-DLOCALEDIR="' + join_paths(get_option('prefix'), get_option('datadir'), 'locale') + '"', '-DPACKAGE="gpaste"', '-DPACKAGE_NAME="GPaste"', '-DPACKAGE_STRING="GPaste ' + meson.project_version() +'"', '-DPACKAGE_VERSION="' + meson.project_version() + '"', '-DPKGLIBEXECDIR="' + join_paths(get_option('prefix'), get_option('libexecdir')) +'"', '-DVERSION="' + meson.project_version() + '"', language: 'c', ) conf = configuration_data() # Used later on to configure services&gnome-shell extension conf.set('GETTEXT_PACKAGE', 'GPaste') conf.set('pkglibexecdir', join_paths(get_option('prefix'), get_option('libexecdir'), 'gpaste')) conf.set('version', meson.project_version()) conf.set('gettext_domain', 'GPaste') gnome = import('gnome') i18n = import('i18n') gpaste_po_dir = join_paths(meson.current_source_dir(), 'po') subdir('man') subdir('po') subdir('src') subdir('data') subdir('tests') gpaste-3.42.6/meson.mk000066400000000000000000000020321421222064600145370ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2019, Marc-Antoine Perennou EXTRA_DIST += \ meson.build \ meson_options.txt \ data/dbus/meson.build \ data/desktop/meson.build \ data/control-center/meson.build \ data/appstream/meson.build \ data/completions/meson.build \ data/search-provider/meson.build \ data/systemd/meson.build \ data/gsettings/meson.build \ data/meson.build \ man/1/meson.build \ man/meson.build \ po/meson.build \ src/daemon/meson.build \ src/gnome-shell/meson.build \ src/libgpaste/meson.build \ src/ui/meson.build \ src/client/meson.build \ src/meson.build \ tests/gnome-shell-client/meson.build \ tests/meson.build \ $(NULL) gpaste-3.42.6/meson_options.txt000066400000000000000000000017631421222064600165340ustar00rootroot00000000000000option('bash-completion', type: 'boolean', value: true, description: 'install bash completion files') option('dbus-services-dir', type: 'string', value: '', description: 'path to the dbus services dir') option('introspection', type: 'boolean', value: true, description: 'build GIR data') option('control-center-keybindings-dir', type: 'string', value: '', description: 'path to where gnome-control-center stores its keybindings') option('gnome-shell', type: 'boolean', value: true, description: 'install the gnome-shell extension') option('systemd', type: 'boolean', value: true, description: 'install the systemd unit') option('systemd-user-unit-dir', type: 'string', value: '', description: 'path to where systemd stores its user units') option('vapi', type: 'boolean', value: true, description: 'build vala bindings') option('x-keybinder', type: 'boolean', value: true, description: 'build the x keybinder') option('zsh-completion', type: 'boolean', value: true, description: 'install zsh completion files') gpaste-3.42.6/po/000077500000000000000000000000001421222064600135065ustar00rootroot00000000000000gpaste-3.42.6/po/GPaste.pot000066400000000000000000000703061421222064600154230ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Marc-Antoine Perennou # This file is distributed under the same license as the gpaste package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: gpaste 3.42.6\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 msgid "print the history with UUIDs" msgstr "" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "" #: src/client/gpaste-client.c:173 msgid "password" msgstr "" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr "" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr "" #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr "" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr "" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "" #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "" #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "" #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "" gpaste-3.42.6/po/LINGUAS000066400000000000000000000001071421222064600145310ustar00rootroot00000000000000de es fr ja nl_NL pt_BR sv nb_NO ar it sl pl zh_Hant tr cs zh_CN fa ru gpaste-3.42.6/po/Makevars000066400000000000000000000066711421222064600152140ustar00rootroot00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = GPaste # 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 = Marc-Antoine Perennou # 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 = Marc-Antoine@Perennou.com # 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 = yes gpaste-3.42.6/po/POTFILES.in000066400000000000000000000121411421222064600152620ustar00rootroot00000000000000data/appstream/org.gnome.GPaste.Ui.appdata.xml.in data/control-center/42-gpaste.control-center.xml.in data/desktop/org.gnome.GPaste.Ui.desktop.in.in data/gsettings/org.gnome.GPaste.gschema.xml.in src/client/gpaste-client.c src/daemon/gpaste-daemon.c src/gnome-shell/extension.js src/libgpaste/client/gpaste-client.c src/libgpaste/client/gpaste-client.h src/libgpaste/client/gpaste-client-item.c src/libgpaste/client/gpaste-client-item.h src/libgpaste/core/gpaste-clipboard.c src/libgpaste/core/gpaste-clipboard.h src/libgpaste/core/gpaste-clipboards-manager.c src/libgpaste/core/gpaste-clipboards-manager.h src/libgpaste/core/gpaste-history.c src/libgpaste/core/gpaste-history.h src/libgpaste/core/gpaste-image-item.c src/libgpaste/core/gpaste-image-item.h src/libgpaste/core/gpaste-item.c src/libgpaste/core/gpaste-item-enums.c src/libgpaste/core/gpaste-item-enums.h src/libgpaste/core/gpaste-item.h src/libgpaste/core/gpaste-password-item.c src/libgpaste/core/gpaste-password-item.h src/libgpaste/core/gpaste-special-atom.c src/libgpaste/core/gpaste-special-atom.h src/libgpaste/core/gpaste-text-item.c src/libgpaste/core/gpaste-text-item.h src/libgpaste/core/gpaste-update-enums.c src/libgpaste/core/gpaste-update-enums.h src/libgpaste/core/gpaste-uris-item.c src/libgpaste/core/gpaste-uris-item.h src/libgpaste/daemon/gpaste-bus.c src/libgpaste/daemon/gpaste-bus.h src/libgpaste/daemon/gpaste-bus-object.c src/libgpaste/daemon/gpaste-bus-object.h src/libgpaste/daemon/gpaste-daemon.c src/libgpaste/daemon/gpaste-daemon.h src/libgpaste/daemon/gpaste-search-provider.c src/libgpaste/daemon/gpaste-search-provider.h src/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.c src/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.h src/libgpaste/gpaste-gdbus-defines.h src/libgpaste/gpaste-gdbus-macros.h src/libgpaste/gpaste-gsettings-keys.h src/libgpaste/gpaste-gtk-compat.h src/libgpaste/gpaste.h src/libgpaste/gpaste-macros.h src/libgpaste/io/gpaste-file-backend.c src/libgpaste/io/gpaste-file-backend.h src/libgpaste/io/gpaste-storage-backend.c src/libgpaste/io/gpaste-storage-backend.h src/libgpaste/keybinder/gpaste-keybinder.c src/libgpaste/keybinder/gpaste-keybinder.h src/libgpaste/keybinder/gpaste-keybinding.c src/libgpaste/keybinder/gpaste-keybinding.h src/libgpaste/keybinder/gpaste-make-password-keybinding.c src/libgpaste/keybinder/gpaste-make-password-keybinding.h src/libgpaste/keybinder/gpaste-pop-keybinding.c src/libgpaste/keybinder/gpaste-pop-keybinding.h src/libgpaste/keybinder/gpaste-show-history-keybinding.c src/libgpaste/keybinder/gpaste-show-history-keybinding.h src/libgpaste/keybinder/gpaste-sync-clipboard-to-primary-keybinding.c src/libgpaste/keybinder/gpaste-sync-clipboard-to-primary-keybinding.h src/libgpaste/keybinder/gpaste-sync-primary-to-clipboard-keybinding.c src/libgpaste/keybinder/gpaste-sync-primary-to-clipboard-keybinding.h src/libgpaste/keybinder/gpaste-ui-keybinding.c src/libgpaste/keybinder/gpaste-ui-keybinding.h src/libgpaste/keybinder/gpaste-upload-keybinding.c src/libgpaste/keybinder/gpaste-upload-keybinding.h src/libgpaste/screensaver-client/gpaste-screensaver-client.c src/libgpaste/screensaver-client/gpaste-screensaver-client.h src/libgpaste/settings/gpaste-settings.c src/libgpaste/settings/gpaste-settings.h src/libgpaste/settings-ui/gpaste-settings-ui-panel.c src/libgpaste/settings-ui/gpaste-settings-ui-panel.h src/libgpaste/settings-ui/gpaste-settings-ui-stack.c src/libgpaste/settings-ui/gpaste-settings-ui-stack.h src/libgpaste/settings-ui/gpaste-settings-ui-widget.c src/libgpaste/settings-ui/gpaste-settings-ui-widget.h src/libgpaste/util/gpaste-util.c src/libgpaste/util/gpaste-util.h src/ui/gpaste-ui.c src/ui/gpaste-ui-about.c src/ui/gpaste-ui-about.h src/ui/gpaste-ui-backup-history.c src/ui/gpaste-ui-backup-history.h src/ui/gpaste-ui-delete-history.c src/ui/gpaste-ui-delete-history.h src/ui/gpaste-ui-delete-item.c src/ui/gpaste-ui-delete-item.h src/ui/gpaste-ui-edit-item.c src/ui/gpaste-ui-edit-item.h src/ui/gpaste-ui-empty-history.c src/ui/gpaste-ui-empty-history.h src/ui/gpaste-ui-empty-item.c src/ui/gpaste-ui-empty-item.h src/ui/gpaste-ui-header.c src/ui/gpaste-ui-header.h src/ui/gpaste-ui-history-action.c src/ui/gpaste-ui-history-action.h src/ui/gpaste-ui-history-actions.c src/ui/gpaste-ui-history-actions.h src/ui/gpaste-ui-history.c src/ui/gpaste-ui-history.h src/ui/gpaste-ui-item-action.c src/ui/gpaste-ui-item-action.h src/ui/gpaste-ui-item.c src/ui/gpaste-ui-item.h src/ui/gpaste-ui-item-skeleton.c src/ui/gpaste-ui-item-skeleton.h src/ui/gpaste-ui-new-item.c src/ui/gpaste-ui-new-item.h src/ui/gpaste-ui-panel.c src/ui/gpaste-ui-panel.h src/ui/gpaste-ui-panel-history.c src/ui/gpaste-ui-panel-history.h src/ui/gpaste-ui-reexec.c src/ui/gpaste-ui-reexec.h src/ui/gpaste-ui-search-bar.c src/ui/gpaste-ui-search-bar.h src/ui/gpaste-ui-search.c src/ui/gpaste-ui-search.h src/ui/gpaste-ui-settings.c src/ui/gpaste-ui-settings.h src/ui/gpaste-ui-shortcuts-window.c src/ui/gpaste-ui-shortcuts-window.h src/ui/gpaste-ui-switch.c src/ui/gpaste-ui-switch.h src/ui/gpaste-ui-upload-item.c src/ui/gpaste-ui-upload-item.h src/ui/gpaste-ui-window.c src/ui/gpaste-ui-window.h tests/gnome-shell-client/test-gnome-shell-client.c gpaste-3.42.6/po/POTFILES.skip000066400000000000000000000003411421222064600156210ustar00rootroot00000000000000data/appstream/org.gnome.GPaste.Ui.appdata.xml data/control-center/42-gpaste.control-center.xml data/desktop/org.gnome.GPaste.Ui.desktop data/desktop/org.gnome.GPaste.Ui.desktop.in data/gsettings/org.gnome.GPaste.gschema.xml gpaste-3.42.6/po/ar.po000066400000000000000000000702551421222064600144610ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Marc-Antoine Perennou # This file is distributed under the same license as the gpaste package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: gpaste 3.38.3\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 msgid "print the history with UUIDs" msgstr "" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "" #: src/client/gpaste-client.c:173 msgid "password" msgstr "" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr "" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr "" #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr "" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr "" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "" #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "" #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "" #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "" gpaste-3.42.6/po/cs.po000066400000000000000000000721511421222064600144610ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Marc-Antoine Perennou # This file is distributed under the same license as the gpaste package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: gpaste 3.40.2\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2021-07-31 22:33+0000\n" "Last-Translator: MUF cz \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-Generator: Weblate 4.8-dev\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 #, fuzzy msgid "Manage your clipboard history" msgstr "Upravit historii schránky" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" "GPaste vám poskytuje grafický nástroj, který vám umožní vše snadno spravovat." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 #, fuzzy msgid "The main UI" msgstr "Hlavní UI" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "Nastavení UI" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "Toto je udržované vydaní. Změny:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 #, fuzzy #| msgid "First release for GNOME 40. Changes:" msgid "First release for GNOME 41. Changes:" msgstr "Prvni vydaní pro GNOME 40. Změny:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 #, fuzzy #| msgid "port to gnome-shell 40" msgid "port to gnome-shell 41" msgstr "port do gnome-shel 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "oppravena selhaní kontroly využití paměti" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "Prvni vydaní pro GNOME 40. Změny:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "port do gnome-shel 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 #, fuzzy msgid "placeholder for gnome-shell prefs" msgstr "zástupný symbol pro předvolby gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 #, fuzzy msgid "fix X11 keybinder outside of GNOME" msgstr "oprava klávesnice X11 mimo prostředí GNOME" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "lepší zpracování a hlášení neplatných uuid předaných do gpaste-client." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" "gpaste-client má nyní argument --use-index pro několik dílčích příkazů, " "které používají index místo uuid." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 msgid "print the history with UUIDs" msgstr "" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "" #: src/client/gpaste-client.c:173 msgid "password" msgstr "" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr "" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr "" #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr "" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr "" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "" #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "" #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "" #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "" gpaste-3.42.6/po/de.po000066400000000000000000001200241421222064600144350ustar00rootroot00000000000000# German translations for GPaste package. # Copyright (C) 2013-2015 Listed translators # This file is distributed under the same license as the GPaste package. # Christian Schendel , 2013. # msgid "" msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2022-01-27 11:55+0000\n" "Last-Translator: Jules Kreuer \n" "Language-Team: German \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-Generator: Weblate 4.11-dev\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "Verwalten Sie Ihren Zwischenablageverlauf" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" "GPaste ist ein Verwaltungssystem für die Zwischenablage, dass es erlaubt die " "Chronik der Zwischenablage auf eine sehr flexible Art zu verfolgen und zu " "verwalten." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" "GPaste stellt eine graphische Oberfläche bereit, die es eine einfache " "Verwaltung ermöglicht." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "Die Hauptbenutzeroberfläche" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "Die Benutzeroberfläche für Einstellungen" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "Dies ist eine Wartungsfreigabe. Änderungen:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "Übersetzungen aktualisiert" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 #, fuzzy #| msgid "gnome-shell extension cosmetic updates" msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "kosmetische Aktualisierungen für die Gnome-Shell-Erweiterung" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "Repariere die Tastenkürzel-Akquise mit gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "Erstes Release für GNOME 3.38. Änderungen:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 #, fuzzy #| msgid "Update to gnome-shell 3.34.0" msgid "port to gnome-shell 41" msgstr "Aktualisierung auf gnome-shell 3.34.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "Behebe Absturz bei Überprüfung des Speicherverbrauchs" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 #, fuzzy #| msgid "First release for GNOME 3.38. Changes:" msgid "First release for GNOME 40. Changes:" msgstr "Erstes Release für GNOME 3.38. Änderungen:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "Aktualisierung auf gnome-shell 3.34.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "Platzhalter für gnome-shell einstellungen" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "Behebe X11 Tastenbindung außerhalb von GNOME" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" "Bessere Handhabung von ungültigen UUIDs die dem gpaste-client übergeben " "werden" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" "gpaste-client hat jetzt ein --use-index Argument für mehrere Unterbefehle, " "um index statt UUID zu verwenden" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "Behebung der make-password-Tastenbindung" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "Übersetzungen aktualisiert" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "gnome-shell erweiterung warnung behoben" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "kosmetische Aktualisierungen für die Gnome-Shell-Erweiterung" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" "Deaktiviere die Unterstützung für Bilder standardmäßig (kann in den " "Einstellungen wiederhergestellt werden)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "Die Suche bezieht nun auch Passwörter ein (über deren Namen)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "Verbesserungen hinsichtlich der systemd-Integration" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "Erstes Release für GNOME 3.38. Änderungen:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "Verwerfe das Tracking DBus-Signal" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "Wechsel zu UUIDs, um Elemente zu identifizieren" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "Upgrade DBus-Interface zu org.gnome.GPaste2" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "Update auf gnome-shell 3.38.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "Repariere die Aktivierung von Elementen via Ctrl+Nummer in gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "Repariere die Tastenkürzel-Akquise mit gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "Repariere die Tastenkürzel-Akquise mit gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "Erstes Release für GNOME 3.36. Änderungen:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "Update auf gnome-shell 3.36.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "Kompatibilität mit der aktuellen appstream-glib" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "Erstes Release für GNOME 3.34. Änderungen:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "Aktualisierung auf gnome-shell 3.34.0" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "Starte das graphische Werkzeug" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "Das aktive Element als Kennwort kennzeichnen" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "Lösche den ausgewählten Eintrag aus der Chronik" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "Chronik anzeigen" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "Zwischenablage mit der Auswahl synchronisieren" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "Auswahl mit der Zwischenablage synchronisieren" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 #, fuzzy msgid "Upload the active item to a pastebin service" msgstr "Lösche den ten Eintrag aus der Chronik" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "Maximale Größe des anzuzeigenden Eintrages" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" "Die zusätzlichen Dinge dieses Elementes werden durch \"…\" ersetzt. Das " "Aplet stellt Zeilenumbüche als \" \" dar. 0 schaltet das Verhalten ab." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "Werden länger werdende Zeilen in der Chronik entdeckt und ersetzt?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" "In der Standardeinstellung ergeben „Dies ist“ und danach „Dies ist ein " "Beispiel“ zwei Einträge in der Chronik. Wenn diese Einstellung aktiviert " "ist, wird der erste Eintrag durch den zweiten ersetzt." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "Name der Aktuellen Chronik" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "Der Standard-Name lautet \"history\"" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "Werden auch Bilder oder nur Text in die Chronik kopiert?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "Standardmäßig wird nur der Text gespeichert" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 #, fuzzy msgid "Do we close the UI after selecting an item?" msgstr "Beeinflusst die Auswahl die Chronik?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "Der Standard ist ja" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 #, fuzzy msgid "The keyboard shortcut to launch the graphical interface" msgstr "Tastenkürzel um Menüleisten zu öffnen" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 #, fuzzy msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" "Die Vorgabe ist Strg + Alt + v (\"<Strg><Alt>V\"). Ein leeres " "Feld schaltet diese Funktion ab." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 #, fuzzy msgid "The keyboard shortcut to mark the active item as being a password" msgstr "Tastenkürzel um den ersten Eintrag in der Chronik zu löschen" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 #, fuzzy msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" "Standardmäßig wird das Menü durch Strg + Alt - h (\"<Strg><Alt>H" "\") angezeigt. Ein leeres Feld schaltet diese Funktion ab." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "Anzahl der anzuzeigenden Einträge" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "Die maximale Anzahl der anzuzeigenden Einträge in der Chronik" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "Maximale Größe der Chronik" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "Maximale Anzahl der Einträge in der Chronik" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "Maximal zugewiesener Speicher (MB)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "Maximaler Speicherverbrauch für Inhalte" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "Maximale Textlänge" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "Maximale Textlänge. Alles außerhalb dieses Wertes wird ignoriert." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "Minimale Textlänge" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "Minimale Textlänge. Alles außerhalb dieses Wertes wird ignoriert." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "Tastenkürzel um den ersten Eintrag in der Chronik zu löschen" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 #, fuzzy msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" "Die Vorgabe ist Strg + Alt + v (\"<Strg><Alt>V\"). Ein leeres " "Feld schaltet diese Funktion ab." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "Beeinflusst die Auswahl die Chronik?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "Standardmäßig beinflusst nur die Zwischenablage (Strg+c) die Chronik." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "Der Standard ist ja" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "Wird die Chronik von einer Sitzung zur anderen gespeichert?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "Der Standard ist ja" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "Tastenkürzel um Menüleisten zu öffnen" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 #, fuzzy msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" "Standardmäßig wird das Menü durch Strg + Alt - h (\"<Strg><Alt>H" "\") angezeigt. Ein leeres Feld schaltet diese Funktion ab." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "Tastenkürzel um Zwischenablage mit der Auswahl synchronisieren" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 #, fuzzy msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Die Vorgabe ist Strg + Alt + o (\"<Strg><Alt>O\"). Ein leeres " "Feld schaltet diese Funktion ab." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "Tastenkürzel um Auswahl mit der Zwischenablage synchronisieren" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 #, fuzzy msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Die Vorgabe ist Strg + Alt + p (\"<Strg><Alt>P\"). Ein leeres " "Feld schaltet diese Funktion ab." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "ist die Auswahl und die Zwischenablage synchron?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "" "Standardmäßig ist die Auswahl und die Zwischenablage unabhängig voneinander." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "Werden Änderungen an der Zwischenablage verfolgt?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "Standardmäßig werden sie verfolgt." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" "Wird der Zustand des Daemons mit der gnome-shell-extension synchronisiert? " "(Daemon wird zusammen mit der Erweiterung beendet)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "Standardmäßig bleibt der Daemon unberührt" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "Werden Texte getrimmt, bevor sie in die Chronik aufgenommen werden?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" "Trimmen bedeutet das Entfernen von Leerzeichen am Anfang und Ende. " "Standardmäßig werden sie so belassen wie sie sind." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 #, fuzzy msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "Tastenkürzel um den ersten Eintrag in der Chronik zu löschen" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 #, fuzzy msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" "Die Vorgabe ist Strg + Alt + v (\"<Strg><Alt>V\"). Ein leeres " "Feld schaltet diese Funktion ab." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "Standardmäßig bleibt der Daemon unberührt" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "Konnte nicht gestartet werden" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "Verwendung:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 #, fuzzy #| msgid "print the history with indexes" msgid "print the history with UUIDs" msgstr "Chronik mit Index anzeigen" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 #, fuzzy msgid "print the size of the history" msgstr "Lösche den ten Eintrag aus der Chronik" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 #, fuzzy msgid "get the name of the current history" msgstr "Name der Aktuellen Chronik" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "Name" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "Aktuelle Chronik sichern" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "Zu einer anderen Chronik wechseln" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "Lösche eine Chronik" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "Verfügbare Chroniken anzeigen" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "Text" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "Den markierten Text in die Zwischenablage kopieren" #: src/client/gpaste-client.c:173 msgid "password" msgstr "" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "Auswahl mit der Zwischenablage synchronisieren" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 #, fuzzy msgid "old name" msgstr "Name" #: src/client/gpaste-client.c:175 #, fuzzy msgid "new name" msgstr "Name" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 #, fuzzy #| msgid "get the th item from the history" msgid "get the item from the history" msgstr "Hole den ten Eintrag aus der Chronik" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 #, fuzzy #| msgid "set the th item from the history to the clipboard" msgid "set the item from the history to the clipboard" msgstr "Setze den ten Eintrag aus der Chronik in die Zwischenablage" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "" #: src/client/gpaste-client.c:181 #, fuzzy msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "Setze den ten Eintrag aus der Chronik in die Zwischenablage" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 #, fuzzy msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "Setze den ten Eintrag aus der Chronik in die Zwischenablage" #: src/client/gpaste-client.c:185 #, fuzzy msgid "set the item from the history as a password named " msgstr "Setze den ten Eintrag aus der Chronik in die Zwischenablage" #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 #, fuzzy msgid "delete item from the history" msgstr "Hole den ten Eintrag aus der Chronik" #: src/client/gpaste-client.c:189 #, fuzzy msgid "delete the password from the history" msgstr "Hole den ten Eintrag aus der Chronik" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "Pfad" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "Kopiere den Inhalt der Datei in zur Zwischenablage" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "PROGRAMM" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "kopiert die Ausgabe von PROGRAMM in die Zwischenablage" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "Chronik leeren" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "Startet die Verfolgung von Änderungen an der Zwischenablage" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "Stoppt die Verfolgung von Änderungen an der Zwischenablage" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 #, fuzzy msgid "alias for stop" msgstr "Alias für stop" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "Startet den Daemon neu (Nach einem Update …)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "Konfigurationswerkzeug starten" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 #, fuzzy msgid "launch the graphical tool" msgstr "Konfigurationswerkzeug starten" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 #, fuzzy msgid "make the applet or extension display the history" msgstr "Die maximale Anzahl der anzuzeigenden Einträge in der Chronik" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 #, fuzzy msgid "upload the item to a pastebin service" msgstr "Lösche den ten Eintrag aus der Chronik" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "Programmversion anzeigen" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 #, fuzzy msgid "display the daemon version" msgstr "Programmversion anzeigen" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "Diesen Hilfetext anzeigen" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 #, fuzzy msgid "display the about dialog" msgstr "Programmversion anzeigen" #: src/client/gpaste-client.c:222 #, fuzzy, c-format msgid "Convenience options:" msgstr "Chronik anzeigen:" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "" #: src/client/gpaste-client.c:228 #, fuzzy, c-format msgid "Display options:" msgstr "Chronik anzeigen:" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 #, fuzzy msgid "display each item on only one line" msgstr "Programmversion anzeigen" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 #, fuzzy msgid "display the items in reverse order" msgstr "Programmversion anzeigen" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "" #: src/client/gpaste-client.c:240 #, fuzzy, c-format msgid "Merge options:" msgstr "Chronik anzeigen:" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "Daemon wurde erfolgreich neu gestartet\n" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "" #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "Verbindung zum GPaste daemon fehlgeschlagen" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "Stopp-Signal wurde empfangen. Programm wird beendet" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "DBus-Name konnte nicht bestimmt werden." #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "%d. %m. %y - %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[Bild, %d x %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[Dateien] " #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "Initialisierung der Gtk-Anwendung fehlgeschlagen" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "Verfolge Änderungen in der Zwischenablage" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "Die Gnome-Shell-Erweiterung aktivieren" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "Synchronisiere Daemon mit der Erweiterung" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "Auswahl beeinflusst Chronik" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "Synchronisiere Zwischenablage mit Auswahl" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "Bilder unterstützen" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "Objekte trimmen" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "Länger werdende Zeilen entdecken" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "Chronik speichern" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "Maximale Größe des anzuzeigenden Eintrages" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "Maximale Textlänge" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "Minimale Textlänge" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "Allgemeine Optionen" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "Einstellungen zur Chronik" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "Tastaturkürzel" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "Wechseln zu" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "Löschen" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 #, fuzzy msgid "Empty" msgstr "(Leer)" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "Ordner für die Chronik konnte nicht angelegt werden" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "GPaste-Daemon-Einstellungen" #: src/ui/gpaste-ui.c:106 #, fuzzy msgid "Keyboard Shortcuts" msgstr "Tastaturkürzel" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "Beenden" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "Über" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "Backup" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "Möchten Sie diesen Verlauf wirklich löschen?" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "Bearbeiten" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(Leer)" #: src/ui/gpaste-ui-empty-item.c:60 #, fuzzy msgid "(Couldn't connect to GPaste daemon)" msgstr "Verbindung zum GPaste daemon fehlgeschlagen" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "Möchten Sie den Daemon wirklich neu starten?" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "" "Möchten Sie wirklich aufhören, Änderungen in der Zwischenablage zu verfolgen?" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "" #~ msgid "number" #~ msgstr "Nummer" #~ msgid "delete th item of the history" #~ msgstr "Lösche den ten Eintrag aus der Chronik" #, fuzzy #~ msgid "upload the th item to a pastebin service" #~ msgstr "Lösche den ten Eintrag aus der Chronik" #~ msgid "launch the applet" #~ msgstr "Applet starten" #, fuzzy #~ msgid "launch the unity application indicator" #~ msgstr "Konfigurationswerkzeug starten" #~ msgid "GPaste Applet" #~ msgstr "GPaste-Applet" #~ msgid "Tray icon to manage GPaste" #~ msgstr "Icon im Benachrichtigungsfeld um GPaste zu konfigurieren" #~ msgid "" #~ "GPaste provides you with an applet, in the form of a status icon which " #~ "will give you access to your history in your tray area." #~ msgstr "" #~ "GPaste stellt ein Applet in Form eines Status-Icons bereit, das Zugriff " #~ "auf die Chronik im Benachrichtigungsfeld ermöglicht." #, fuzzy #~ msgid "GPaste AppIndicator" #~ msgstr "GPaste-Applet" #, fuzzy #~ msgid "Unity application indicator to manage GPaste" #~ msgstr "Icon im Benachrichtigungsfeld um GPaste zu konfigurieren" #~ msgid "" #~ "GPaste provides you with an application indicator for unity which will " #~ "give you access to your history in your indicator area." #~ msgstr "" #~ "GPaste stellt einen Applikations-Indikator für Unity bereit, der Zugriff " #~ "auf die Chronik im Indikator-Feld ermöglicht." #, fuzzy #~ msgid "The AppIndicator menu" #~ msgstr "GPaste-Applet" #~ msgid "Max displayed history size: " #~ msgstr "Anzahl der anzuzeigenden Einträge:" #~ msgid "Max history size: " #~ msgstr "Maximale Größe der Chronik:" #~ msgid "Max memory usage (MB): " #~ msgstr "Maximaler Speicherverbrauch (MB):" #~ msgid "Empty history" #~ msgstr "Chronik leeren" #~ msgid "Backup history as: " #~ msgstr "Aktuelle Chronik sichern als:" #~ msgid "Ok" #~ msgstr "OK" #~ msgid "Histories" #~ msgstr "Chroniken" #~ msgid "Could not register DBus service." #~ msgstr "DBus-Service konnte nicht registriert werden." #, fuzzy #~ msgid "Manage GPaste" #~ msgstr "GPaste-Daemon-Einstellungen" #~ msgid "GPaste daemon settings" #~ msgstr "GPaste-Daemon-Einstellungen" #~ msgid "Manage GPaste settings" #~ msgstr "GPaste-Daemon-Einstellungen" #~ msgid "" #~ "GPaste provides you with a settings utility allowing you to customize its " #~ "behaviour as expected." #~ msgstr "" #~ "GPaste stellt ein Einstellungswerkzeug bereit, das es ermöglicht sein " #~ "Verhalten nach den eigenen Vorstellungen anzupassen." #~ msgid "Manage the GPaste daemon settings" #~ msgstr "GPaste-Daemon-Einstellungen" #, fuzzy #~ msgid "Stop tracking changes" #~ msgstr "Stoppt die Verfolgung von Änderungen an der Zwischenablage" #~ msgid "Track changes" #~ msgstr "Änderungen überwachen" #, fuzzy #~ msgid "print the history without newlines" #~ msgstr "Chronik mit Index anzeigen" #, fuzzy #~ msgid "print the history (raw) without indexes" #~ msgstr "Chronik ohne Index anzeigen" #~ msgid "print the history with NUL as separator" #~ msgstr "Zeige Chronik mit NUL als Trennzeichen" #, fuzzy #~ msgid "get the th item from the history (raw)" #~ msgstr "Hole den ten Eintrag aus der Chronik" #~ msgid "Couldn't spawn gpaste-app-indicator.\n" #~ msgstr "GPaste-Applet konnte nicht gestartet werden.\n" gpaste-3.42.6/po/es.po000066400000000000000000001157101421222064600144620ustar00rootroot00000000000000# Spanish translations for GPaste package. # Copyright (C) 2011-2015 Listed translators # This file is distributed under the same license as the GPaste package. # Antonio Trujillo , 2011. # msgid "" msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2021-11-10 16:51+0000\n" "Last-Translator: Carlos Sesma \n" "Language-Team: Spanish \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-Generator: Weblate 4.9.1-dev\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "Gestione el histórico de su portapapeles" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" "GPaste es un sistema de gestión del portapapeles que le permite dar " "seguimiento al histórico del portapapeles de una manera altamente " "personalizable." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" "GPaste le brinda una herramienta gráfica para gestionarlo todo de manera " "sencilla." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "La interfaz principal" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "La interfaz de configuración" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "Esta es una versión de mantenimiento. Cambios:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 #, fuzzy #| msgid "updated translations" msgid "translations update" msgstr "traducciones actualizadas" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 #, fuzzy #| msgid "gnome-shell extension cosmetic updates" msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "Actualizaciones superficiales a la extensión para GNOME Shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "Se arregla la captación de los vínculos de teclado para wayland" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "Primera versión para GNOME 41. Cambios:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "Migrado a gnome-shell 41" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "corrige un cierre inesperado durante la comprobación de uso de memoria" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "Primera versión para GNOME 40. Cambios:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "Migrado a gnome-shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "arreglado el bindeo de tecla fuera de GNOME con X11" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "mejorado el reporte de uuids pasados a gpaste-client" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "arreglado el enlace de makepassword" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "traducciones actualizadas" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "arreglos de avisos en la extensión para GNOME Shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "Actualizaciones superficiales a la extensión para GNOME Shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" "Se desactiva la compatibilidad con imágenes de manera predeterminada (puede " "reactivarse en la configuración)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "La búsqueda ahora incluye contraseñas (utilizando sus nombres)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "Mejoras en la integración con systemd" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "Primera versión para GNOME 3.38. Cambios:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "Se desecha la señal Tracking de DBus" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "Se cambia a utilizar UUID para identificar elementos" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "Se actualiza la interfaz de DBus a org.gnome.GPaste2" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "Actualización a gnome-shell 3.38.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "Se corrige la activación de elementos con Ctrl+número en GNOME Shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "Se arregla la recaptación de los vínculos de teclado en GNOME Shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "Se arregla la captación de los vínculos de teclado en GNOME Shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "Primera versión para GNOME 3.36. Cambios:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "Actualización a gnome-shell 3.36.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "Compatibilidad con appstream-glib recientes" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "Primera versión para GNOME 3.34. Cambios:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "Actualización a gnome-shell 3.34.0" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "Iniciar la herramienta gráfica" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "Marca elemento activo como contraseña" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "Eliminar el elemento activo del histórico" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "Mostrar el histórico" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "Sincronizar portapapeles con la selección principal" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "Sincronizar selección principal con el portapapeles" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "Cargar el elemento activo en un servicio «pastebin»" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "Portapapeles;Gestor;Configuración;Preferencias;Parámetros;" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "Tamaño máximo de un elemento al mostrarlo" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" "La parte sobrante del elemento se reemplazará por \"…\",y los saltos de " "línea por \" \" cuando se muestren en el applet,0 para desactivar." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "" "¿Cómo se detectan y sustituyen los renglones crecientes en el histórico?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "El nombre del histórico actual" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "El nombre por omision es \"history\"" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "De manera predeterminada se guarda solo el texto" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "¿Se debe cerrar la interfaz luego de seleccionar un elemento?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "De manera predeterminada se cierra" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "El atajo de teclado para iniciar la interfaz gráfica" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" "De manera predeterminada, oprimir Ctrl + Alt + G lo hace («G»). " "Una cadena vacía desactivaría esta funcionalidad." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "El atajo de teclado para marcar el elemento activo como contraseña" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 #, fuzzy msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" "Por omisión, pulsando ctrl + alt + h muestra el menú (\"<Ctrl><" "Alt>H\"). Una cadena vacía desactivaría esta funcionalidad." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "Tamaño máximo al mostrar" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "Número máximo de elementos mostrados en el historial" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "Tamaño máximo del historial" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "Número máximo de elementos en el historial" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "Uso de memoria máximo (MB)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "Cantidad máxima de memoria utilizada para almacenar contenido" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "Tamaño máximo de los elementos de texto" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" "Tamaño máxmimo de los elementos de texto. Se ignora lo que sobrepase este " "límite." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "Tamaño mínimo de los elementos de texto" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" "Tamaño mínimo de los elementos de texto. Se ignora lo que no llegue a este " "límite." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "Atajo de teclado para eliminar la primera entrada del historial" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 #, fuzzy msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" "Por omisión, pulsando ctrl + alt + v (\"<Ctrl><Alt>v\"). Una " "cadena vacía desactivaría esta funcionalidad." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "¿Afecta la selección principal al historial?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "Por omisión, solo el portapapeles (ctrl+c) afecta al historial." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 #, fuzzy msgid "By default, we're saving all" msgstr "Por omisión se guarda" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "¿Se guarda el historial de una sesión a otra?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "Por omisión se guarda" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "Atajo de teclado para mostrar el menú" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 #, fuzzy msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" "Por omisión, pulsando ctrl + alt + h muestra el menú (\"<Ctrl><" "Alt>H\"). Una cadena vacía desactivaría esta funcionalidad." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "De manera predeterminada, presionar Ctrl + Alt + O los sincroniza " "(«P»). Una cadena vacía aquí desactiva esta funcionalidad." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "" "El atajo de teclado para sincronizar la selección primaria con el " "portapapeles" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 #, fuzzy msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Por omisión, pulsando ctrl + alt + h muestra el menú (\"<Ctrl><" "Alt>H\"). Una cadena vacía desactivaría esta funcionalidad." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "¿Están sincronizadas la selección principal y el portapapeles?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "" "Por omisión, la selección principal y el portapapeles son independientes." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "¿Seguir los cambios en el portapapeles?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "Por omisión, se siguen esos cambios." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" "¿Sincronizar el estado del servicio con el de la extension? (deshabilitarel " "servicio cuando se deshabilite la extension)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "" "De manera predeterminada, el estado del demonio se mantiene sin cambios" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "¿Recortar elementos de texto antes de añadirlos al historial" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" "Recortar quiere decir eliminar los espacios antes del inicio y después del " "final. Por omision se dejan como están" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 #, fuzzy msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "Atajo de teclado para eliminar la primera entrada del historial" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 #, fuzzy msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" "Por omisión, pulsando ctrl + alt + v (\"<Ctrl><Alt>v\"). Una " "cadena vacía desactivaría esta funcionalidad." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "¿Quiere que se solicite confirmación al vaciar un histórico?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "De manera predeterminada se hace, dado que es una acción destructiva" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "No se pudo generar" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "Utilización:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 msgid "print the history with UUIDs" msgstr "mostrar el histórico con UUID" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "mostrar el tamaño del histórico" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "obtener el nombre del histórico actual" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "nombre" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "hacer copia de respaldo del histórico actual" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "cambiar a otro histórico" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "eliminar un histórico" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "enumerar los históricos disponibles" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "texto" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "enviar texto al portapapeles" #: src/client/gpaste-client.c:173 msgid "password" msgstr "contraseña" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "añadir el par nombre-contraseña al portapapeles" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "nombre anterior" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "nombre nuevo" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "cambiar el nombre de la contraseña" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "obtener el elemento del histórico" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 #, fuzzy #| msgid "set the th item from the history to the clipboard" msgid "set the item from the history to the clipboard" msgstr "enviar el elemento número del historial al portapapeles" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "" #: src/client/gpaste-client.c:181 #, fuzzy msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "enviar el elemento número del historial al portapapeles" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 #, fuzzy msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "enviar el elemento número del historial al portapapeles" #: src/client/gpaste-client.c:185 #, fuzzy msgid "set the item from the history as a password named " msgstr "enviar el elemento número del historial al portapapeles" #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 #, fuzzy msgid "delete item from the history" msgstr "obtener el elemento número del historial del portapapeles" #: src/client/gpaste-client.c:189 #, fuzzy msgid "delete the password from the history" msgstr "obtener el elemento número del historial del portapapeles" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "ruta" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "" " colocar el contenido del fichero indicado por en el portapapeles" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "loquesea" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "enviar la salida de al portapapeles" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "vaciar el historial" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "iniciar seguimiento de cambios en el portapapeles" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "detener seguimiento de cambios en el portapapeles" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "quit: alias de stop" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "vuelva a ejecutar el servicio (después de actualizar...)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "iniciar la herramienta de configuración" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 #, fuzzy msgid "launch the graphical tool" msgstr "iniciar la herramienta de configuración" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 #, fuzzy msgid "make the applet or extension display the history" msgstr "Número máximo de elementos mostrados en el historial" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 #, fuzzy msgid "upload the item to a pastebin service" msgstr "Eliminar el primer elemento del historial" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "mostrar la versión" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 #, fuzzy msgid "display the daemon version" msgstr "mostrar la versión" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "mostrar esta ayuda" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 #, fuzzy msgid "display the about dialog" msgstr "mostrar la versión" #: src/client/gpaste-client.c:222 #, fuzzy, c-format msgid "Convenience options:" msgstr "Mostrar el historial" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "" #: src/client/gpaste-client.c:228 #, fuzzy, c-format msgid "Display options:" msgstr "Mostrar el historial" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 #, fuzzy msgid "display each item on only one line" msgstr "mostrar la versión" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 #, fuzzy msgid "display the items in reverse order" msgstr "mostrar la versión" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "" #: src/client/gpaste-client.c:240 #, fuzzy, c-format msgid "Merge options:" msgstr "Mostrar el historial" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "Servicio reiniciado con éxito\n" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "" #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "No se pudo conectar al servicio GPaste" #: src/daemon/gpaste-daemon.c:33 #, fuzzy msgid "Stop signal received, exiting" msgstr "Recibida señal %d, saliendo\n" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "No se pudo obtener nombre en DBus" #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "%d/%m/%y %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[Imagen, %d × %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "Contraseña" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[Archivos] " #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "No se pudo registrar la aplicación GTK" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "ya está ejecutándose." #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "Seguimiento de cambios en el portapapeles" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "Sincronizar el estado del servicio con el de la _extensión" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "Selección principal afecta al historial" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "Sincronizar el portapapeles con selección principal" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "Recortar elementos" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "Guardar historial" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 #, fuzzy msgid "Max element size when displaying" msgstr "Tamaño máximo de los elementos al visualizarlos: " #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 #, fuzzy msgid "Max text item length" msgstr "Tamaño máximo de texto" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 #, fuzzy msgid "Min text item length" msgstr "Tamaño mínimo de texto" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "Comportamiento general" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "Ajustes del historial" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "Atajos de teclado " #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "Cambiar a" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "Suprimir" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 #, fuzzy msgid "Empty" msgstr "(Vacío)" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "No se pudo crear directorio de historial" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 #, fuzzy msgid "GPaste Settings" msgstr "Ajustes del servicio GPaste" #: src/ui/gpaste-ui.c:106 #, fuzzy msgid "Keyboard Shortcuts" msgstr "Atajos de teclado " #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "Salir" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "Copia de seguridad" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "" #: src/ui/gpaste-ui-delete-history.c:25 #, fuzzy msgid "Are you sure you want to delete this history?" msgstr "Atajo de teclado para eliminar la primera entrada del historial" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(Vacío)" #: src/ui/gpaste-ui-empty-item.c:60 #, fuzzy msgid "(Couldn't connect to GPaste daemon)" msgstr "No se pudo conectar al servicio GPaste" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 #, fuzzy msgid "Do you really want to restart the daemon?" msgstr "detener seguimiento de cambios en el portapapeles" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "" #: src/ui/gpaste-ui-switch.c:54 #, fuzzy msgid "Do you really want to stop tracking clipboard changes?" msgstr "detener seguimiento de cambios en el portapapeles" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "" #~ msgid "number" #~ msgstr "número" #~ msgid "delete th item of the history" #~ msgstr "suprimir el elemento número del historial" #, fuzzy #~ msgid "upload the th item to a pastebin service" #~ msgstr "Eliminar el primer elemento del historial" #~ msgid "launch the applet" #~ msgstr "iniciar el applet" #, fuzzy #~ msgid "launch the unity application indicator" #~ msgstr "iniciar la herramienta de configuración" #~ msgid "GPaste Applet" #~ msgstr "Applet GPaste" #~ msgid "Tray icon to manage GPaste" #~ msgstr "Icono de notificación para GPaste" #, fuzzy #~ msgid "GPaste AppIndicator" #~ msgstr "Applet GPaste" #, fuzzy #~ msgid "Unity application indicator to manage GPaste" #~ msgstr "Icono de notificación para GPaste" #, fuzzy #~ msgid "The AppIndicator menu" #~ msgstr "Applet GPaste" #~ msgid "Max displayed history size: " #~ msgstr "Tamaño máximo a mostrar: " #~ msgid "Max history size: " #~ msgstr "Tamaño máximo del historial: " #~ msgid "Empty history" #~ msgstr "Vaciar historial" #~ msgid "Backup history as: " #~ msgstr "Respaldar historial como: " #~ msgid "Ok" #~ msgstr "Ok" #~ msgid "Histories" #~ msgstr "Histórico" #~ msgid "Could not register DBus service." #~ msgstr "No se pudo registrar el servicio DBus" #, fuzzy #~ msgid "Manage GPaste" #~ msgstr "Gestionar los ajustes del servicio GPaste" #~ msgid "GPaste daemon settings" #~ msgstr "Ajustes del servicio GPaste" #, fuzzy #~ msgid "Manage GPaste settings" #~ msgstr "Gestionar los ajustes del servicio GPaste" #~ msgid "Manage the GPaste daemon settings" #~ msgstr "Gestionar los ajustes del servicio GPaste" #, fuzzy #~ msgid "Stop tracking changes" #~ msgstr "detener seguimiento de cambios en el portapapeles" #~ msgid "Track changes" #~ msgstr "Seguimiento de cambios" #, fuzzy #~ msgid "print the history without newlines" #~ msgstr "imprimir el historial con números de indice" #, fuzzy #~ msgid "print the history (raw) without indexes" #~ msgstr "imprimir el historial sin índices" #~ msgid "print the history with NUL as separator" #~ msgstr "imprimir el historial con NUL como separador" #, fuzzy #~ msgid "get the th item from the history (raw)" #~ msgstr "obtener el elemento número del historial del portapapeles" #, fuzzy #~ msgid "Couldn't spawn gpaste-app-indicator.\n" #~ msgstr "No se pudo iniciar el applet de gpaste.\n" gpaste-3.42.6/po/fa.po000066400000000000000000000702551421222064600144450ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Marc-Antoine Perennou # This file is distributed under the same license as the gpaste package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: gpaste 3.42.1\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: fa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 msgid "print the history with UUIDs" msgstr "" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "" #: src/client/gpaste-client.c:173 msgid "password" msgstr "" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr "" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr "" #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr "" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr "" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "" #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "" #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "" #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "" gpaste-3.42.6/po/fr.po000066400000000000000000001142031421222064600144560ustar00rootroot00000000000000# French translations for GPaste package. # Copyright (C) 2010-2018 Listed translators # This file is distributed under the same license as the GPaste package. # Marc-Antoine Perennou , 2011. # msgid "" msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2021-10-23 08:38+0000\n" "Last-Translator: Olivier FAURAX \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-Generator: Weblate 4.9-dev\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "Gérez l'historique de votre presse-papier" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" "GPaste est un outil de gestion du presse-papier qui vous permet de suivre et " "de manipuler votre historique de presse-papier de façon très configurable." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" "GPaste vous fournit un outil graphique vous permettant de tout gérer " "simplement." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "L'interface principale" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "L'interface de préférences" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "Ceci est une mise à jour de maintenance. Changements :" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "Mise à jour des traductions" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 #, fuzzy #| msgid "gnome-shell extension cosmetic updates" msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "Mises à jour cosmétiques de l'extension gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 #, fuzzy #| msgid "Fix keybinding grab with gnome-shell" msgid "Fix keybindings for wayland" msgstr "Correction des raccourcis clavier dans gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "Première mise à jour pour GNOME 41. Changements :" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "port vers gnome-shell version 41" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "" "Correction d'un crash dans la vérification de l'utilisation de la mémoire" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "Première mise à jour pour GNOME 40. Changements :" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "port vers gnome-shell version 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "espace réservé aux préférences gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "corriger le clavier X11 en dehors de GNOME" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" "meilleure gestion et remontée d'erreurs quand des uuids invalides sont " "passés à gpaste-client" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" "gpaste-client a maintenant un paramètre --use-index pour plusieurs sous-" "commandes pour utiliser l'index à la place de l'uuid" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "correction du raccourcis clavier pour créer un mot de passe" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "Mise à jour des traductions" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "Correction de warnings dans l'extension gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "Mises à jour cosmétiques de l'extension gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" "Désactivation de la prise en charge des images par défaut (peut être " "réactivée dans les préférences)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "" "La recherche inclut maintenant les mots de passe (en utilisant leurs noms)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "Amélioration de l'intégration avec systemd" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "Première mise à jour pour GNOME 3.38. Changements :" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "Suppression du signal DBus Tracking" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "Utilisation d'uuids pour identifier les éléments" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "Mise à jour de l'intrface DBus en org.gnome.GPaste2" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "Mise à jour de gnome-shell en verison 3.38.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "" "Correction de l'activation d'un élément avec Ctrl-Nombre dans gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "Correction de la modification des raccourcis clavier dans gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "Correction des raccourcis clavier dans gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "Première mise à jour pour GNOME 3.36. Changements :" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "Mise à jour de gnome-shell en verison 3.36.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "Compatibilité avec les versions récentes d'appstream-glib" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "Première mise à jour pour GNOME 3.34. Changements :" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "Mise à jour de gnome-shell version 3.34.0" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "@GETTEXT_PACKAGE@" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "Lancer l'interface graphique" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "Marquer l'élément actif comme étant un mot de passe" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "Supprimer l'élément actif de l'historique" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "Afficher l'historique" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "Synchroniser le presse-papier avec la sélection primaire" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "Synchroniser la sélection primaire avec le presse-papier" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "Téléverser l'élément actif vers un sevice type pastebin" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "Presse-Papier;Gestionnaire;Réglages;Préférences;Configuration;" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "Taille maximale d'un élément quand on l'affiche" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" "La partie de l'élément excédant la taille authorisée sera remplacée par \"…" "\", et les sauts de lignes par \" \" quand on affiche depuis l'applet, 0 " "pour désativer." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "" "Doit-on détecter et remplacer les lignes grandissantes dans l'historique ?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" "Par défaut, selectionner \"Ceci est\", puis \"Ceci est un exemple\" va créer " "deux entrées dans l'historique. Avec cette fonctionnalité activée, la " "première sera remplacé par la deuxième." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "Le nom de l'historique actuel" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "Le nom par défaut est \"history\"" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "" "Les images copiées doivent-elles être ajoutées à l'historique, ou seulement " "le texte ?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "Par défaut, on ne sauvegarde que le texte" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "Ferme-t-on l'interface après avoir sélectionné un élément ?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "Par défaut, on la ferme" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "Le raccourcis clavier pour lancer l'interface graphique" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" "Par défaut, appuyer sur ctrl + alt + g le fait (\"G\"). Une " "chaîne vide désactive cette fonctionnalité." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "" "Le raccourcis clavier pour marquer l'élement actif comme étant un mot de " "passe" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" "Par défaut, appuyer sur ctrl + alt + s affiche le menu (\"S\"). " "Une chaîne vide désactive cette fonctionnalité." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "Taille maximale de l'historique affiché" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "Nombre maximum d'éléments affichés dans l'historique" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "Taille maximale de l'historique" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "Nombre maximum d'éléments dans l'historique" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "Utilisation mémoire maximale (MO)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "Quantité maximale de mémoire utilisée pour stcoker du contenu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "Taille maximale d'un élément textuel" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" "Taille maximale d'un élément textuel. Tout élément hors de ces limites est " "ignoré." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "Taille minimale d'un élément textuel" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" "Taille minimale d'un élément textuel. Tout élément hors de ces limites est " "ignoré." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "" "Le raccourcis clavier pour supprimer le premier élément de l'historique" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" "Par défaut, appuyer sur ctrl + alt + v le fait (\"V\"). Une " "chaîne vide désactive cette fonctionnalité." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "La selection primaire doit-elle affecter l'historique ?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "Par défaut, seulement le presse-papier (ctrl+c) affecte l'historique." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" "Faut-il sauvegarder toutes les versions d'un texte riche (html) selectionné, " "ou juste le texte brut ?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "Par défaut, on sauvegarde tout" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "Sauvegarde-t-on l'historique d'une session à l'autre ?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "Par défaut, on le sauvegarde" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "Le raccourcis clavier pour afficher l'historique" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" "Par défaut, appuyer sur ctrl + alt + h affiche le menu (\"H\"). " "Une chaîne vide désactive cette fonctionnalité." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "" "Le raccourcis clavier pour synchroniser le presse-papier avec la sélection " "primaire" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Par défaut, appuyer sur ctrl + alt + o les synchronise (\"O\"). " "Une chaîne vide désactive cette fonctionnalité." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "" "Le raccourcis clavier pour synchroniser la sélection primaire avec le presse-" "papier" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Par défaut, appuyer sur ctrl + alt + p les synchronise (\"P\"). " "Une chaîne vide désactive cette fonctionnalité." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "" "La sélection primaire et le presse-papier doivent-ils être synchronisés ?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "" "Par défaut, la sélection primaire et le presse-papier sont indépendents." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "Suit-on les changements du presse-papier ?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "Par défaut, on suit ces changements." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" "Doit-on synchroniser l'état du démon avec celui de l'extension gnome-shell ? " "(le désactiver quand on la désactive)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "Par défaut, l'état du démon reste inchangé" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "" "Doit-on tronquer les éléments textuels avant de les ajouter à l'historique ?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" "Tronquer signifie supprimer tous les espaces au début et à la fin. Par " "défaut, on laisse les éléments tels-quels." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" "Le raccourcis clavier pour téléverser le premier élément de l'historique " "vers un service de type pastebin" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" "Par défaut, appuyer sur ctrl + alt + u le fait (\"U\"). Une " "chaîne vide désactive cette fonctionnalité." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "Faut-il demander confirmation avant de vider un historique ?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "Par défaut, on le fait car c'est une action destructrice" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "Impossible de lancer" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "Mode d'emploi :\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 msgid "print the history with UUIDs" msgstr "afficher l'historique avec les UUID" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "affiche la taille de l'historique" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "afficher le nom de l'historique courant" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "nom" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "sauvegarde l'historique actuel" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "passer à un autre historique" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "supprime un historique" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "liste les historiques disponibles" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "texte" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "met le texte dans le presse-papier" #: src/client/gpaste-client.c:173 msgid "password" msgstr "mot de passe" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "ajouter le couple nom - mot de passe au presse-papier" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "ancien nom" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "nouveau nom" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "renommer le mot de passe" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "renvoie l'élément de l'historique" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr "met l'élément de l'historique dans le presse-papier" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "contenu" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "" "remplace le contenu de l'élément de l'historique par celui fourni" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" "fusionne les éléments identifées par ces UUID de l'historique et met le " "résultat dans le presse-papier" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr "" "marque l'élément de l'historique comme étant un mot de passe nommé " "" #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr "supprime l'élément de l'historique" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "supprime le mot de passe nommé de l'historique" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "chemin" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "place le contenu du fichier situé à ce chemin dans le presse-papier" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "quelquechose" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "met la sortie de quelquechose dans le presse-papier" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "vide l'historique" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "suivre les changements du presse-papier" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "arrêter de suivre les changements du presse-papier" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "alias pour stop" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "reexecuter le démon (après une mise à jour...)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "lance l'outil de configuration" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "lance l'interface graphique" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "forcer l'applet ou l'extension à afficher l'historique" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr "Téléverser l'élément vers un sevice type pastebin" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "affiche la version" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "affiche la version du démon" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "affiche cette aide" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "affiche le dialogue d'à propos" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "Options pratiques :" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "utiliser l'index au lieu de l'UUID" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "Options d'affichage :" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "affiche chaque élément sur seulement une ligne" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "affiche chaque élément brut (sans numéro de ligne)" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "affiche les éléments dans l'ordre inverse" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "" "utilise un caractère NUL au lieu des sauts de ligne entre chaque élément" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "Options de fusion :" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "chaîne" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" "ajoute la décoration au début et à la fin de chaque élément avant de les " "fusionner" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "ajoute le séparateur entre chaque élément à la fusion" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "Démon redémaré avec succès\n" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "Impossible d'ajouter de la donnée non unicode en tant que texte." #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "Impossible de se connecter au démon GPaste" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "Signal d'arrêt reçu" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "Impossible d'acquérir le nom DBus." #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "%d/%m/%y %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[Image, %d x %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "Mot de passe" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[Fichiers] " #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "Impossible d'inscrire l'application gtk au registre" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "tourne déjà." #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "Suivre les changements du presse-papier" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "Fermer l'interface à la selection" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "Activer l'extension gnome-shell" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "Synchroniser l'état du démon avec celui de l'extension" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "La sélection primaire affecte l'historique" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "Synchroniser le presse-papier avec la sélection primaire" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "Support des images" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "Tronquer les éléments (éliminer les espaces au début et à la fin)" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "Détecter les lignes grandissantes" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "Sauvegarder l'historique" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "Taille maximale d'un élément quand on l'affiche" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "Taille maximale d'un élément textuel" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "Taille minimale d'un élément textuel" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "Comportement général" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "Préférences de l'historique" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "Raccourcis clavier" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "Passer à" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "Supprimer" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "Annuler" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "Vider" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "Voulez-vous vraiment vider l'historique ?" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "Impossible de créer le dossier d'historique" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "Préférences du démon GPaste" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "Raccourcis clavier" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "À propos de GPaste" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "Quitter" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "À propos" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "Copier" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "Sous quel nom voulez-vous copier cet historique ?" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "Voulez-vous vraiment supprimer cet historique ?" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "Modifier" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "(Aucun résultat)" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(Vide)" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "(Impossible de se connecter au démon GPaste)" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "Nouveau" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "Redémarer" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "Voulez-vous vraiment redémarer le démon ?" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "Redémarer le démon" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "Recherche" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "Général" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "Arrêter" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "" "Voulez-vous vraiment arrêter de suivre les changements du presse-papier ?" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "Publier" gpaste-3.42.6/po/it.po000066400000000000000000001134271421222064600144720ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Marc-Antoine Perennou # This file is distributed under the same license as the gpaste package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: gpaste 3.38.4\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2022-02-03 14:58+0000\n" "Last-Translator: wiselynx \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-Generator: Weblate 4.11-dev\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "Gestisci la cronologia degli appunti" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" "GPaste è un sistema per la gestione degli appunti che permette di tracciare " "e gestire la cronologia degli appunti in modo altamente personalizzabile." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" "GPaste ti fornisce uno strumento grafico per gestire tutto agevolmente." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "L'interfaccia utente principale" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "L'interfaccia utente delle impostazioni" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "Questa è una versione di manutenzione. Cambiamenti:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "aggiornamento traduzioni" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "Correzione per l'estensione gnome-shell all'avvio del demone" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "Correzione tasti di scelta rapida per wayland" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "Prima versione per GNOME 41. Cambiamenti:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "Portabilità a gnome-shell 41" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "" "Correzione di un crash durante il controllo dell'utilizzo della memoria" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "Prima versione per GNOME 40. Cambiamenti:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "Portabilità a gnome-shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "segnaposto per le preferenze di gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "correzione tasti di X11 al di fuori di GNOME" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" "migliore gestione e segnalazione degli uuid invalidi passati a gpaste-client" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" "gpaste-client ora ha un argomento --use-index per diversi sottocomandi per " "usare index invece di uuid" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "correzione per la scorciatoia da tastiera make-password" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "traduzioni aggiornate" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "correzione per gli avvisi dell'estensione gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "aggiornamenti cosmetici dell'estensione gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" "Disabilita il supporto alle immagini per impostazione predefinita (può " "essere riattivato nelle preferenze)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "La ricerca ora include le password (usando il loro nome)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "miglioramenti nell'integrazione con systemd" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "Prima versione per GNOME 3.38. Cambiamenti:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "Abbandona il segnale Tracking DBus" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "Passa ad identificare gli oggetti tramite uuid" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "Passa interfaccia DBus a org.gnome.GPaste2" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "Aggiorna a gnome-shell 3.38.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "" "Correzione per l'attivazione degli elementi con Ctrl-Numero in gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "Correzione ricattura scorciatoie da tastiera in gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "Correzione cattura scorciatoie da tastiera in gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "Prima versione per GNOME 3.36. Cambiamenti:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "Aggiornamento a gnome-shell 3.36.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "Compatibilità con appstream-glib recente" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "Prima versione per GNOME 3.34. Cambiamenti:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "Aggiornamento a gnome-shell 3.34.0" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "@GETTEXT_PACKAGE@" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "Lancia lo strumento grafico" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "Segna l'elemento attivo come password" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "Elimina l'elemento attivo dalla cronologia" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "Mostra la cronologia" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "Sincronizza gli appunti alla selezione primaria" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "Sincronizza la selezione primaria agli appunti" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "Esegui l'upload dell'elemento attivo ad un servizio pastebin" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "Appunti;Manager;Impostazioni;Preferenze;Configurazione;" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "Dimensione massima di un elemento quando viene visualizzato" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" "La roba extra di quell'elemento sarà rimpiazzata da \"...\", ed i ritorni a " "capo da \" \" nella visualizzazione dall'applet, 0 per disabilitare." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "Rilevare e sostituire le linee in aumento nella cronologia?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" "Per impostazione predefinita, selezionando \"Ecco un\", poi \"Ecco un esempio" "\" verranno create due voci nella cronologia. Quando questa funzione è " "attiva, la prima voce verrà rimpiazzata dalla seconda." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "Il nome della cronologia corrente" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "Il nome predefinito è \"cronologia\"" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "Salvare le immagine copiate nella cronologia, o solo il testo?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "Per impostazione predefinita, viene salvato solo il testo" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "Chiudiamo l'interfaccia utente dopo aver selezionato un elemento?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "Per impostazione predefinita, viene chiusa" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "La scorciatoia da tastiera per lanciare l'interfaccia grafica" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" "Per impostazione predefinita, ciò avviene premendo ctrl + alt + g " "(\"G\"). Una stringa vuota disabilita questa funzionalità." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "La scorciatoia da tastiera per segnare l'elemento attivo come password" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" "Per impostazione predefinita, premere ctrl + alt + s segna l'elemento attivo " "come password (\"S\"). Una stringa vuota disabilita questa " "funzionalità." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "Dimensione massima della cronologia visualizzata" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "Numero massimo di elementi mostrati nella cronologia" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "Dimensione massima della cronologia" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "Numero massimo di elementi nella cronologia" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "Memoria massima utilizzata (MB)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "Quantitativo massimo di memoria usato per memorizzare i contenuti" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "Dimensione massima degli elementi di testo" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" "Dimensione massima di un elemento di testo. Qualsiasi cosa oltre questo " "limite viene ignorata." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "Dimensione minima degli elementi di testo" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" "Dimensione minima di un elemento di testo. Qualsiasi cosa fuori da questo " "limite viene ignorata." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "" "Scorciatoia da tastiera per cancellare il primo elemento nella cronologia" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" "Per impostazione predefinita, ciò avviene premendo ctrl + alt + v " "(\"V\"). Una stringa vuota disabilita questa funzionalità." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "La selezione primaria ha effetto sulla cronologia?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "" "Per impostazione predefinita, solo gli appunti (ctrl+c) hanno effetto sulla " "cronologia." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" "Salviamo tutte le versioni del rich text (ad es. html) selezionato o solo la " "versione plain text?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "Per impostazione predefinita, viene salvato tutto" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "Salvare la cronologia da una sessione all'altra?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "Per impostazione predefinita, viene salvato" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "La scorciatoia da tastiera per visualizzare il menu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" "Per impostazione predefinita, premere ctrl + alt + h mostra il menu " "(\"H\"). Una stringa vuota disabilita questa funzionalità." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "" "La scorciatoia da tastiera per sincronizzare dagli appunti alla selezione " "primaria" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Per impostazione predefinita, premere ctrl + alt + o li sincronizza " "(\"P\"). Una stringa vuota disabilita questa funzionalità." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "" "La scorciatoia da tastiera per sincronizzare dalla selezione primaria agli " "appunti" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Per impostazione predefinita, premere ctrl + alt + p li sincronizza " "(\"P\"). Una stringa vuota disabilita questa funzionalità." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "La selezione primaria e gli appunti sono sincronizzati?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "" "Per impostazione predefinita, la selezione primaria e gli appunti sono " "indipendenti." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "Tracciamo i cambiamenti negli appunti?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "Per impostazione predefinita, questi cambiamenti sono tracciati." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" "Sincronizziamo lo stato del demone con quello della estensione gnome-shell? " "(il demone viene disabilitato quando viene disabilitata l'estensione)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "Per impostazione predefinita, lo stato del demone rimane inalterato" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "Tagliare gli elementi testuali prima di aggiungerli alla cronologia?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" "Accorciare significa rimuovere tutta la spaziatura iniziale e finale. Per " "impostazione predefinita, viene lasciata com'è." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" "Scorciatoia da tastiera per caricare il primo elemento nella cronologia in " "un servizio pastebin" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" "Per impostazione predefinita, ciò avviene premendo ctrl + alt + u " "(\"U\"). Una stringa vuota disabilita questa funzionalità." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "Chiedere conferma prima di svuotare la cronologia?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "" "Per impostazione predefinita, viene chiesta poiché si tratta di un'azione " "distruttiva" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "Impossibile generare" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "Utilizzo:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 msgid "print the history with UUIDs" msgstr "stampa cronologia con UUID" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "stampa la dimensione della cronologia" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "ottieni il nome della cronologia corrente" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "nome" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "Backup della cronologia corrente" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "Passa a un'altra cronologia" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "Cancella una cronologia" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "elenca gli storici disponibili" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "testo" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "imposta il testo negli appunti" #: src/client/gpaste-client.c:173 msgid "password" msgstr "password" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "aggiungi la coppia nome - password agli appunti" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "vecchio nome" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "nuovo nome" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "rinomina la password" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "ottieni elemento dalla cronologia" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr "imposta elemento dalla cronologia agli appunti" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "contenuti" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "" "sostituisci il contenuto dell'elemento nella cronologia con quello " "fornito" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" "unisci gli elementi che corrispondono agli UUID nella cronologia e incolla " "il risultato negli appunti" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr "" "imposta elemento nella cronologia come password denominata " #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr "cancella l'elemento dalla cronologia" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "cancella la password dalla cronologia" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "percorso" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "inserisci il contenuto del file negli appunti" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "qualunque" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "imposta l'output di qualunque cosa negli appunti" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "svuota la cronologia" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "inizia a tracciare i cambiamenti negli appunti" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "smetti di tracciare i cambiamenti negli appunti" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "alias per stop" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "riesegui il demone (dopo un aggiornamento...)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "lancia lo strumento di configurazione" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "lancia lo strumento grafico" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "Fai in modo che l'applet o l'estensione mostrino la cronologia" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr "esegui l'upload dell'elemento ad un servizio pastebin" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "mostra la versione" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "mostra la versione del demone" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "mostra questo help" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "visualizza la finestra di dialogo Informazioni" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "Opzioni di convenienza:" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "usa indice dell'elemento invece del suo UUID" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "Mostra le opzioni:" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "mostra ogni elemento su un'unica riga" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "mostra ogni elemento in formato grezzo (senza numeri di linea)" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "mostra gli elementi in ordine inverso" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "uns un carattere NUL invece di un a capo tra ogni elemento" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "Opzioni unione:" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "stringa" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" "aggiungi la decorazione data all'inizio e alla fine di ogni elemento prima " "di unire" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "aggiungi tra ogni elemento il separatore indicato quando unisci" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "Demone rieseguito con successo\n" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "Impossibile aggiungere dati non utf8 come testo." #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "Impossibile connettersi al demone GPaste" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "Segnale di arresto ricevuto, uscita" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "Impossibile acquisire un nome DBus." #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "%d/%m/%y %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[Immagine, %d x %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "Password" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[File] " #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "Impossibile registrare l'applicazione gtk" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "è già in esecuzione." #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "Traccia i cambiamenti negli appunti" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "Chiudi l'interfaccia utente sulla selezione" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "Abilita l'estensione gnome-shell" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "Sincronizza lo stato del demone con quello dell'estensione" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "La selezione primaria influenza la cronologia" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "Sincronizza gli appunti con la selezione primaria" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "Supporto per le immagini" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "Accorcia gli elementi" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "Rileva linee in aumento" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "Salva cronologia" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "Dimensione massima degli elementi in visualizzazione" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "Lunghezza massima degli elementi di testo" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "Lunghezza minima degli elementi di testo" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "Comportamento generale" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "Impostazioni cronologia" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "Scorciatoie da tastiera" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "Passa a" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "Cancella" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "Annulla" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "Svuota" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "Vuoi davvero vuotare la cronologia?" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "Impossibile creare la directory della cronologia" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "Impostazioni di GPaste" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "Scorciatoie da Tastiera" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "Su GPaste" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "Esci" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "Informazioni" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "Backup" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "Con quale nome desideri eseguire il backup di questa cronologia?" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "Cancellare questa cronologia?" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "Modifica" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "(Nessun risultato)" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(Vuoto)" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "(Impossibile connettersi al demone GPaste)" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "Nuovo" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "Riavvia" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "Vuoi davvero riavviare il demone?" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "Riavvia il demone" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "Cerca" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "Generale" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "Arresta" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "Vuoi davvero smettere di tracciare i cambiamenti degli appunti?" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "Upload" gpaste-3.42.6/po/ja.po000066400000000000000000001066431421222064600144520ustar00rootroot00000000000000# Japanese translations for GPaste package. # Copyright (C) 2020 Listed translators # This file is distributed under the same license as the GPaste package. # Peniel Vargas , 2020. # msgid "" msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2020-04-10 21:57-0400\n" "Last-Translator: Peniel Vargas \n" "Language-Team: Japanese\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.2.4\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 #, fuzzy #| msgid "About GPaste" msgid "GPaste" msgstr "GPaste について" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 #, fuzzy #| msgid "GPaste Settings" msgid "The settings UI" msgstr "GPaste の設定" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 #, fuzzy #| msgid "Enable the gnome-shell extension" msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "GNOME Shell 拡張機能を有効化する" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 #, fuzzy #| msgid "Enable the gnome-shell extension" msgid "gnome-shell extension warning fixes" msgstr "GNOME Shell 拡張機能を有効化する" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 #, fuzzy #| msgid "Enable the gnome-shell extension" msgid "gnome-shell extension cosmetic updates" msgstr "GNOME Shell 拡張機能を有効化する" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "GUI ツールを起動する" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "アクティブな項目をパスワードとしてマークする" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "履歴からアクティブな項目を削除する" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "履歴を表示する" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "クリップボードからプライマリー選択に同期する" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "プライマリー選択からクリップボードに同期する" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "Pastebin にアクティブな項目をアップロードする" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 #, fuzzy #| msgid "Max element size when displaying" msgid "Max size of an element when displaying it" msgstr "表示時の要素の最大サイズ" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 #, fuzzy #| msgid "get the name of the current history" msgid "The name of the current history" msgstr "現在の履歴の名前を取得する" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 #, fuzzy #| msgid "delete a history" msgid "The default name is \"history\"" msgstr "履歴を削除する" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 #, fuzzy #| msgid "Mark the active item as being a password" msgid "The keyboard shortcut to mark the active item as being a password" msgstr "アクティブな項目をパスワードとしてマークする" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "表示される履歴の最大数" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 #, fuzzy #| msgid "make the applet or extension display the history" msgid "Maximum number of items displayed in the history" msgstr "アプレットまたは拡張機能に履歴を表示させる" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "履歴の最大数" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "メモリの最大使用量 (MB)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 #, fuzzy #| msgid "Max text item length" msgid "Max text item size" msgstr "テキストの最大の長さ" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 #, fuzzy #| msgid "Min text item length" msgid "Min text item size" msgstr "テキストの最小の長さ" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 #, fuzzy #| msgid "Are you sure you want to delete this history?" msgid "The keyboard shortcut to delete the first element in history" msgstr "この履歴を削除してもよろしいですか?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 #, fuzzy #| msgid "Primary selection affects history" msgid "Does the primary selection affects history?" msgstr "プライマリー選択を履歴に反映させる" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 #, fuzzy #| msgid "Sync the clipboard to the primary selection" msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "クリップボードからプライマリー選択に同期する" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 #, fuzzy #| msgid "Sync the primary selection to the clipboard" msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "プライマリー選択からクリップボードに同期する" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 #, fuzzy #| msgid "Sync the primary selection to the clipboard" msgid "Are the primary selection and the clipboard synchronized?" msgstr "プライマリー選択からクリップボードに同期する" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 #, fuzzy #| msgid "Sync the primary selection to the clipboard" msgid "By default, the primary selection and the clipboard are independent." msgstr "プライマリー選択からクリップボードに同期する" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 #, fuzzy #| msgid "Track clipboard changes" msgid "Do we track the clipboard changes?" msgstr "クリップボードの変更を追跡する" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 #, fuzzy #| msgid "upload the item matching to a pastebin service" msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr " に一致する項目を Pastebin にアップロードする" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "spawn できませんでした" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "使い方:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 #, fuzzy #| msgid "print the history with indexes" msgid "print the history with UUIDs" msgstr "インデックス付きの履歴を表示する" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "履歴の大きさを表示する" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "現在の履歴の名前を取得する" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "名前" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "現在の履歴をバックアップする" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "他の履歴に切り替える" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "履歴を削除する" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "利用可能な履歴を一覧表示する" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "テキスト" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "テキストをクリップボードに追加する" #: src/client/gpaste-client.c:173 msgid "password" msgstr "パスワード" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "クリップボードに名前とパスワードの組み合わせを追加する" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "古い名前" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "新しい名前" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "パスワードの名前を変更する" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 #, fuzzy #| msgid "set the item matching this id from the history to the clipboard" msgid "get the item from the history" msgstr "この ID に一致する項目を履歴からクリップボードに設定する" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 #, fuzzy #| msgid "set the item matching this id from the history to the clipboard" msgid "set the item from the history to the clipboard" msgstr "この ID に一致する項目を履歴からクリップボードに設定する" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "内容" #: src/client/gpaste-client.c:181 #, fuzzy #| msgid "" #| "replace the contents of the item matching from the history with " #| "the provided one" msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "履歴の に一致する項目の内容を指定した項目で置き換える" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 #, fuzzy #| msgid "" #| "merge the th items from the history and add put the result in the " #| "clipboard" msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "履歴の <数字> 番目の項目をマージして、結果をクリップボードに追加する" #: src/client/gpaste-client.c:185 #, fuzzy #| msgid "set the th item from the history as a password named " msgid "set the item from the history as a password named " msgstr "履歴の <数字> 番目の項目を <名前> という名前のパスワードとして設定する" #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 #, fuzzy #| msgid "delete the password from the history" msgid "delete item from the history" msgstr "履歴からパスワード <名前> を削除する" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "履歴からパスワード <名前> を削除する" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "パス" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "<パス> にあるファイルの内容をクリップボードに追加" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "プログラム" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "プログラムの出力をクリップボードに設定する" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "履歴を空にする" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "クリップボードの変更の追跡を開始する" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "クリップボードの変更の追跡を停止する" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "gpaste stop と同じ" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "デーモンを再実行する (アップグレード後...)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "設定ツールを起動する" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "GUI ツールを起動する" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "アプレットまたは拡張機能に履歴を表示させる" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 #, fuzzy #| msgid "upload the item matching to a pastebin service" msgid "upload the item to a pastebin service" msgstr " に一致する項目を Pastebin にアップロードする" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "バージョンを表示する" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "デーモンのバージョンを表示する" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "ヘルプを表示する" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "GPaste についてのダイアログを表示する" #: src/client/gpaste-client.c:222 #, fuzzy, c-format #| msgid "Merge options:" msgid "Convenience options:" msgstr "マージオプション:" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "表示オプション:" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "各項目を一行に表示する" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "各項目を表示する (行番号なし)" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "項目を逆順で表示する" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "各項目の区切りに改行ではなくヌル文字を使用する" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "マージオプション:" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "文字列" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "マージする前に各項目の最初と最後に指定した文字列を追加する" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "マージする時に各項目の間に指定された区切り記号を追加する" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "デーモンを正常に再実行しました\n" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "UTF-8 以外のデータはテキストとして追加できません。" #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "GPaste デーモンに接続できませんでした" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "停止シグナルを受信し、終了します" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "DBus 名を取得できませんでした。" #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "%y/%m/%d %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[画像, %d x %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "パスワード" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[ファイル] " #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "GTK アプリケーションの登録に失敗しました" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "はすでに実行しています。" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "クリップボードの変更を追跡する" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "選択時に UI を閉じる" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "GNOME Shell 拡張機能を有効化する" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "デーモンの状態を拡張機能の状態と同期する" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "プライマリー選択を履歴に反映させる" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "クリップボードをプライマリー選択と同期する" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "画像のサポート" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "項目をトリムする" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "ハイフンなどの線の増加を検出する" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "履歴を保存する" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "表示時の要素の最大サイズ" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "テキストの最大の長さ" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "テキストの最小の長さ" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "挙動全般" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "履歴設定" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "キーボードショートカット" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "切り替え" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "削除" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "キャンセル" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "空にする" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "本当に履歴を空にしますか?" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "履歴ディレクトリを作成できませんでした" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "GPaste の設定" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "キーボードショートカット" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "GPaste について" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "終了" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "GPaste について" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "バックアップ" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "この履歴をどのような名前でバックアップしますか?" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "この履歴を削除してもよろしいですか?" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "編集" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "(検索結果はありません)" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(履歴は空です)" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "(GPaste デーモンに接続できませんでした)" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "新規" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "再起動" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "本当にデーモンを再起動しますか?" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "デーモンを再起動する" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "検索" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "全般" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "停止" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "本当にクリップボードの変更の追跡を停止しますか?" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "アップロード" #~ msgid "number" #~ msgstr "数字" #~ msgid "get the th item from the history" #~ msgstr "履歴の <数字> 番目の項目を取得する" #~ msgid "delete th item of the history" #~ msgstr "履歴の <数字> 番目の項目を削除する" gpaste-3.42.6/po/meson.build000066400000000000000000000000551421222064600156500ustar00rootroot00000000000000i18n.gettext( 'GPaste', preset: 'glib', )gpaste-3.42.6/po/nb_NO.po000066400000000000000000001125131421222064600150440ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Marc-Antoine Perennou # This file is distributed under the same license as the gpaste package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: gpaste 3.38.2\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2021-05-06 00:50+0000\n" "Last-Translator: Allan Nordhøy \n" "Language-Team: Norwegian Bokmål \n" "Language: nb_NO\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-Generator: Weblate 4.7-dev\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "Håndter din utklippstavlehistorikk" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" "GPaste er et utklippstavlehåndteringssystem som lar deg holde øye med og " "behandle din utklippshistorikk på veldig tilpasset vis." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" "GPaste gir det et grafisk verktøy som lar deg håndtere alt veldig enkelt." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "Hovedgrensesnittet" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "Innstillingsgrensesnittet" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "Dette er en vedlikeholdsutgivelse. Endringer:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 #, fuzzy #| msgid "updated translations" msgid "translations update" msgstr "oppdaterte oversettelser" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 #, fuzzy #| msgid "gnome-shell extension cosmetic updates" msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "kosmetiske oppdateringer i gnome-shell-utvidelsen" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 #, fuzzy msgid "Fix keybindings for wayland" msgstr "Fiks opphenting av tastaturhurtigsekvens med gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 #, fuzzy #| msgid "First release for GNOME 40. Changes:" msgid "First release for GNOME 41. Changes:" msgstr "Første utgave for GNOME 40. Endringer:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 #, fuzzy #| msgid "port to gnome-shell 40" msgid "port to gnome-shell 41" msgstr "portet til gnome-shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "fikset krasj i sjekk av minnebruk" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "Første utgave for GNOME 40. Endringer:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "portet til gnome-shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 #, fuzzy msgid "placeholder for gnome-shell prefs" msgstr "plassholder for GNOME-Shell-innstillinger" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "fikset X11-tastaturbindinger utenfor GNOME" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" "bedre håndtering og rapportering av ugyldige UUID-er sendt til gpaste-client" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" "gpaste-client har nå et --use-index -argument for flere underkommandoer for " "bruke av indeks istedenfor UUID" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "fikset make-password -tastaturbinding" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "oppdaterte oversettelser" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "advarselsfikser i gnome-shell-utvidelsen" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "kosmetiske oppdateringer i gnome-shell-utvidelsen" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 #, fuzzy msgid "Disable images support by default (can be reenabled in preferences)" msgstr "Skru av bildestøtte (kan skrus på igjen i innstillingene)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 #, fuzzy msgid "Search now includes passwords (using their names)" msgstr "Søk inneholder nå passord (ved bruk av navnene deres)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "forbedringer i systemd-integrasjon" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "Første utgave for GNOME 3.38. Endringer:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 #, fuzzy msgid "Drop the Tracking DBus signal" msgstr "Ikke bruk sporingssymbolet fra D-Bus" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 #, fuzzy msgid "Switch to uuids to identify items" msgstr "Byttet til UUID-er for å identifisere elementer" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 #, fuzzy msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "Oppgradering av D-Bus-grensesnitt til org.gnome.GPaste2" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "Oppgradering til gnome-shell 3.38.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 #, fuzzy msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "Fiks aktivering av elementer ved bruk av Ctrl+nummer i gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 #, fuzzy msgid "Fix keybinding regrab with gnome-shell" msgstr "Fiks av ny opphenting av tastaturhurtigsekvens med gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 #, fuzzy msgid "Fix keybinding grab with gnome-shell" msgstr "Fiks opphenting av tastaturhurtigsekvens med gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "Første utgave for GNOME 3.36. Endringer:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "Oppgradering til gnome-shell 3.36.0." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "Kompabilitet med nyere appstream-glib" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "Første utgave for GNOME 3.34. Endringer:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "Oppgradering til gnome-shell 3.34.0" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "@GETTEXT_PACKAGE@" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "Start det grafiske verktøyet" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "Maker aktivt element som passord" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "Slett aktivt element fra historikk" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "Vis historikken" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 #, fuzzy msgid "Sync the clipboard to the primary selection" msgstr "Synkroniser utklippstavle til primærmarkering" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 #, fuzzy msgid "Sync the primary selection to the clipboard" msgstr "Synkroniser primær markering til utklippstavle" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 #, fuzzy msgid "Upload the active item to a pastebin service" msgstr "Last opp aktivt element til en innlimingsnett-tjeneste" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "Utklippstavle:håndtering;innstillinger;oppsett;clipboard;" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "Maks. størrelse for vist element" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 #, fuzzy msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" "Ekstra del av elementet vil erstatet av \"…\", og linjeskiftet med \" \" ved " "visning fra miniprogrammet. 0 for å skru av." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 #, fuzzy msgid "Do we detect and replace growing lines in history?" msgstr "Oppdag og erstatt voksende linjer i historikken?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 #, fuzzy msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" "Valg av \"Her er\", og så \"Her er det et eksempel\" vil opprette to " "oppføringer i historikken som forvalg. Når dette er påslått, vil den første " "erstattes av den andre." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "Navn på nåværende historikk" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 #, fuzzy msgid "The default name is \"history\"" msgstr "Forvalgt navn er \"historikk\"" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 #, fuzzy msgid "Do we save the images copied to history, or only text?" msgstr "Lagre bilder kopiert til historikk, eller kun tekst?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 #, fuzzy msgid "By default, we're saving only text" msgstr "Som forvalg lagres kun tekst" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "Lukk grensesnitt etter valg av element?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 #, fuzzy msgid "By default, we close it" msgstr "Som forvalg lukkes det" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "Tastatursnarvei for å starte grafisk grensesnitt" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 #, fuzzy msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" "Ctrl+Alt+G gjør dette som forvalg (\"Alt>G\"). La stå tom for å skru " "av." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 #, fuzzy msgid "The keyboard shortcut to mark the active item as being a password" msgstr "Tastatursnarveien for å markere aktivt element som passord" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 #, fuzzy msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" "Ctrl+Alt+S markerer aktivt element som passord som forvalg (\"S" "\"). La stå tom for å skru av." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "Maks. vist historikkstørrelse" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "Maksimalt antall viste elementer i historikken" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "Maks. historikkstørrelse" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "Maksimalt antall elementer i historikken" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "Maks. minnebruk (MB)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "Maksimal mengde minne brukt til lagring av innhold" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "Maks. tekstelementstørrelse" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" "Maksimal størrelse for hvert tekstelement. Alt som overskrider denne grensen " "vil overses." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "Maks. tekstelementstørrelse" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 #, fuzzy msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" "Minimumsstørrelse for hvert tekstelement. Alt som er mindre enn dette vil " "bli ignorert." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "Tastatursnarvei for å slette første element i historikken" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 #, fuzzy msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" "Ctrl+Alt+V gjør dette som forvalg (\"V\"). La stå tom for å skru " "av." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 #, fuzzy msgid "Does the primary selection affects history?" msgstr "Skal det primære utvalget innvirkning på historikken?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 #, fuzzy msgid "By default, only clipboard (ctrl+c) affects history." msgstr "" "Som forvalg har kun utklippstavlen (Ctrl+C) innvirkning på historikken." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 #, fuzzy msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" "Skal alle versjoner av formatert tekst lagres (f.eks. HTML), eller kun " "klartekstversjonen?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "Som forvalg lagres alt" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 #, fuzzy msgid "Do we save the history from one session to another?" msgstr "Skal historikk lagres fra én økt til en annen?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 #, fuzzy msgid "By default, we're saving it" msgstr "Som forvalg lagres det" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "Tastatursnarvei for visning av menyen" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 #, fuzzy msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" "Ctrl+Alt+H skjuler menyen som forvalg (\">Ctrl>Alt>H\". La stå tom for å " "skru av." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "" "Tastatursnarvei for å synkronisere utklippstavlen til det primære utvalget" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 #, fuzzy msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Ctrl+Alt+O synkroniserer dem som forvalg (\"P\"). La stå tom for " "å skru av." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 #, fuzzy msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "" "Tastatursnarvei for å skru av synkronisering av det primære utvalget til " "utklippstavlen" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 #, fuzzy msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Ctrl+Alt+P synkroniserer dem som forvalg (\"P\"). La stå tom for " "å skru av." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "Er det primære utvalget og utklippstavlen synkronisert?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "Det primære utvalget og utklippstavlen er uavhengige som forvalg." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 #, fuzzy msgid "Do we track the clipboard changes?" msgstr "Skal endringer i utklippstavlen spores?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 #, fuzzy msgid "By default, we're tracking those changes." msgstr "Disse spores som forvalg." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 #, fuzzy msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" "Skal nissetilstanden synkroniseres med den i gnome-shell-utvidelsen? (skru " "av nissen når du skrur av utvidelsen)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 #, fuzzy msgid "By default, the daemon state keeps unchanged" msgstr "Som forvalg endres ikke nissetilstanden" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 #, fuzzy msgid "Do we trim the textual items before adding them to history?" msgstr "Skal tekstelementer beskjæres før de legges til i historikken?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 #, fuzzy msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" "Beskjæring betyr fjerning av alle etterfølgende og påfølgende mellomrom. Som " "forvalg lagres dette som det er." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 #, fuzzy msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" "Tastatursnarveien for å laste opp det første elementer i historikken til en " "innlimingnett-tjeneste" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 #, fuzzy msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" "Som forvalg gjør Ctrl+Alt+U dette (\"U\"). La stå tom for å skru " "av." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 #, fuzzy msgid "Do we prompt for confirmation when emptying a history?" msgstr "Sprør om bekreftelse ved tømming av historikk?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 #, fuzzy msgid "By default, we do as it's a destructive action" msgstr "" "Dette spørsmålet blir stilt som forvalg, siden det er en destruktiv handling" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 #, fuzzy msgid "Couldn't spawn" msgstr "Kunne ikke starte" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "Bruk:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 #, fuzzy msgid "print the history with UUIDs" msgstr "skriv ut historikken med indekser" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 #, fuzzy msgid "print the size of the history" msgstr "skriv ut størrelsen på historikken" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 #, fuzzy msgid "get the name of the current history" msgstr "hent navnet for nåværende historikk" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "navn" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "sikkerhetskopier nåværende historikk" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "bytt til annen historikk" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "slett en historikk" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 #, fuzzy msgid "list available histories" msgstr "list opp tilgjengelige historikker" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "tekst" #: src/client/gpaste-client.c:171 #, fuzzy msgid "set text to clipboard" msgstr "sett tekst til utklippstavle" #: src/client/gpaste-client.c:173 msgid "password" msgstr "passord" #: src/client/gpaste-client.c:173 #, fuzzy msgid "add the name - password couple to the clipboard" msgstr "Legg til navnet og passordet i utklippstavlen" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "gammelt navn" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "nytt navn" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "gi passordet et nytt navn" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 #, fuzzy msgid "get the item from the history" msgstr "hent elementet fra historikken" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 #, fuzzy msgid "set the item from the history to the clipboard" msgstr "sett elementet fra historikken til utklippstavlen" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "innhold" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "erstatt innholdet av elementet fra historikken med det forrige" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 #, fuzzy msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" "flett elementene som samsvarer med UUID-ene fra historikken og legg til " "resultatet i utklippstavlen" #: src/client/gpaste-client.c:185 #, fuzzy msgid "set the item from the history as a password named " msgstr "sett elementet fra historikken som et passord ved navn " #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 #, fuzzy msgid "delete item from the history" msgstr "slett elementet fra historikken" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "slett passordet fra historikken" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "sti" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "hent innholdet fra filen i til utklippstavlen" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "hva som helst" #: src/client/gpaste-client.c:193 #, fuzzy msgid "set the output of whatever to clipboard" msgstr "sett utdata for hva som helst til utklippstavlen" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 #, fuzzy msgid "empty the history" msgstr "tøm historikk" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "begynn å spore endringer i utklippstavlen" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "stopp sporing av endringer i utklippstavlen" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "alias for stopp" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 #, fuzzy msgid "reexecute the daemon (after upgrading...)" msgstr "kjør nissen igjen (etter oppgradering…)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "start oppsettsverktøyet" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "start det grafiske verktøyet" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 #, fuzzy msgid "make the applet or extension display the history" msgstr "la miniprogrammet og utvidelsen vise historikken" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 #, fuzzy msgid "upload the item to a pastebin service" msgstr "last opp elementet til en innlimingsnett-tjeneste" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "vis versjonsinfo" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "vis nisseversjonen" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "vis denne hjelpen" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 #, fuzzy msgid "display the about dialog" msgstr "Vis \"Om\"" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "Beleilighetsvalg:" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "bruk indeks for element istedenfor dets UUID" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "Visningsvalg:" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "vis hvert element på hver sin linje" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "vis hvert element som det er (uten linjenummer)" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 #, fuzzy msgid "display the items in reverse order" msgstr "vis elementene i omvendt rekkefølge" #. Translators: help for --zero #: src/client/gpaste-client.c:237 #, fuzzy msgid "use a NUL character instead of a new line betweean each item" msgstr "bruk et NULL-tegn istedenfor linjeskift mellom hvert element" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "Flettevalg:" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "streng" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" "legg til gitt dekorasjon i begynnelsen og slutten av hvert element før " "fletting" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "legg til gitt inndeler mellom hvert element ved fletting" #: src/client/gpaste-client.c:342 #, fuzzy, c-format msgid "Successfully reexecuted the daemon\n" msgstr "Nisse startet på ny\n" #: src/client/gpaste-client.c:491 #, fuzzy msgid "Cannot add non utf8 data as text." msgstr "Kan ikke legge til data som ikke er UTF-8 som tekst." #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "Kunne ikke koble til GPaste-nisse igjen" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "Stopp-signal mottatt, avslutter" #: src/daemon/gpaste-daemon.c:70 #, fuzzy msgid "Could not acquire DBus name." msgstr "Fikk ikke tak i D-Bus-navn." #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 #, fuzzy msgid "%m/%d/%y %T" msgstr "%d. %m. %y - %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[Bilde, %d x %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "Passord" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[Filer] " #: src/libgpaste/gpaste-macros.h:98 #, fuzzy msgid "Failed to register the gtk application" msgstr "Klarte ikke å registrere GTK-programmet" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "kjører allerede." #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "Spor endringer i utklippstavlen" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 #, fuzzy msgid "Close UI on select" msgstr "Lukk grensesnitt ved markering" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 #, fuzzy msgid "Enable the gnome-shell extension" msgstr "Skru på gnome-shell-utvidelsen" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 #, fuzzy msgid "Sync the daemon state with the extension's one" msgstr "Synkroniser nissetilstanden med utvidelsens" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 #, fuzzy msgid "Primary selection affects history" msgstr "Primærutvalget har innvirkning på historikk" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 #, fuzzy msgid "Synchronize clipboard with primary selection" msgstr "Synkroniser utklippstavle med det primære utvalget" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 #, fuzzy msgid "Images support" msgstr "Bildestøtte" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "Beskjær elementer" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "Oppdag voksende linjer" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "Lagre historikk" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 #, fuzzy msgid "Max element size when displaying" msgstr "Maks. elementstørrelse ved visning" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "Maks. tekstelementslengde" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "Min. tekstelementslengde" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "Generell oppførsel" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "Historikkinnstillinger" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "Tastatursnarveier" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "Bytt til" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "Slett" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "Avbryt" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "Tom" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "Ønsker du virkelig å tømme historikken?" #: src/libgpaste/util/gpaste-util.c:719 #, fuzzy msgid "Could not create history dir" msgstr "Kunne ikke opprette historikkmappe" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "GPaste-innstillinger" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "Tastatursnarveier" #: src/ui/gpaste-ui.c:107 #, fuzzy msgid "About GPaste" msgstr "Om" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "Avslutt" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "Om" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 #, fuzzy msgid "Backup" msgstr "Sikkerhetskopi" #: src/ui/gpaste-ui-backup-history.c:47 #, fuzzy msgid "Under which name do you want to backup this history?" msgstr "Hvilket navn ønsker du å bruke for sikkerhetskopiering av historikken?" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "Er du sikker på at du ønsker å slette denne historikken?" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "Rediger" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "(Resultatløst)" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(Tom)" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "(Kunne ikke koble til GPaste-nisse)" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "Ny" #: src/ui/gpaste-ui-reexec.c:29 #, fuzzy msgid "Restart" msgstr "Start på ny" #: src/ui/gpaste-ui-reexec.c:29 #, fuzzy msgid "Do you really want to restart the daemon?" msgstr "Ønsker du virkelig å starte nissen på ny?" #: src/ui/gpaste-ui-reexec.c:55 #, fuzzy msgid "Restart the daemon" msgstr "Start nissen på ny" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "Søk" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "Generelt" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "Stopp" #: src/ui/gpaste-ui-switch.c:54 #, fuzzy msgid "Do you really want to stop tracking clipboard changes?" msgstr "Ønsker du virkelig å slutte å spore utklippstavleendringer?" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "Last opp" gpaste-3.42.6/po/nl_NL.po000066400000000000000000001167021421222064600150570ustar00rootroot00000000000000# Dutch translations for GPaste package. # Copyright (C) 2013-2015 Listed translators # This file is distributed under the same license as the GPaste package. # Heimen Stoffels , 2017. # msgid "" msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2017-03-17 17:38+0100\n" "Last-Translator: Heimen Stoffels \n" "Language-Team: Vistaus \n" "Language: nl_NL\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-Generator: Poedit 1.8.11\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "Beheer uw klembordgeschiedenis" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" "GPaste is een klembordbeheersysteem dat u in staat stelt uw " "klembordgeschiedenis bij te houden en te beheren. Dit alles is zeer " "aanpasbaar." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" "GPaste geeft u een grafisch hulpmiddel dat u in staat stelt om alles " "gemakkelijk te beheren." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "Hoofdvenster" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "Instellingenvenster" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 #, fuzzy #| msgid "Enable the gnome-shell extension" msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "GNOME Shell-extensie inschakelen" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 #, fuzzy #| msgid "Enable the gnome-shell extension" msgid "gnome-shell extension warning fixes" msgstr "GNOME Shell-extensie inschakelen" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 #, fuzzy #| msgid "Enable the gnome-shell extension" msgid "gnome-shell extension cosmetic updates" msgstr "GNOME Shell-extensie inschakelen" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "Grafisch venster openen" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "Actief item markeren als wachtwoord" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "Actief item verwijderen uit geschiedenis" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "Geschiedenis weergeven" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "Klembord synchroniseren met primaire selectie" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "Primaire selectie synchroniseren met klembord" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "Actief item uploaden naar een pastebin-dienst" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "Klembord;Beheer;Instellingen;Voorkeuren;Configuratie;" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "Maximale grootte van een weergegeven element" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" "De extra elementinformatie zal vervangen worden door \"...\" en nieuwe " "regels door \" \" wanneer weergegeven vanuit de applet. 0 om uit te " "schakelen." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "Groeiende regels detecteren en vervangen in geschiedenis?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" "Het selecteren van \"Hier is\", daarna \"Hier is een voorbeeld\" zal twee " "items creëren in de geschiedenis. Als deze functie is ingeschakeld, zal de " "eerste worden vervangen door de tweede." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "Naam van de huidige geschiedenis" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "De standaard naam is \"geschiedenis\"" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "Gekopieerde afbeeldingen opslaan de geschiedenis of alleen tekst?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 #, fuzzy #| msgid "By default, we're saving both" msgid "By default, we're saving only text" msgstr "Standaard worden beiden opgeslagen" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "Venster sluiten na het selecteren van een item?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "Standaard wordt het gesloten" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "Sneltoets om het grafische venster te openen" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" "Ctrl + Alt + G opent het grafische venster (\"G\"). Dit leeglaten " "schakelt de functionaliteit uit." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "Sneltoets om het actieve item te markeren als een wachtwoord" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" "Ctrl + Alt + S markeert het actieve item als een wachtwoord (\"S" "\"). Dit leeglaten schakelt de functionaliteit uit." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "Maximaal weergegeven geschiedenisgrootte" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "Maximaal aantal weer te geven items in de geschiedenis" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "Maximale geschiedenisgrootte" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "Maximaal aantal items in de geschiedenis" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "Maximaal geheugengebruik (MB)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "Maximaal te gebruiken geheugen om inhoud op te slaan" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "Maximale tekstitem-grootte" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" "Maximale grootte van een tekstitem. Alle tekst die deze grens overschrijdt " "wordt genegeerd." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "Minimale tekstitemgrootte" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" "Minimale grootte van een tekstitem. Alle tekst die deze grens overschrijdt " "wordt genegeerd." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "Sneltoets om het eerste element in de geschiedenis te verwijderen" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" "Ctrl + Alt + V verwijdert het eerste element in de geschiedenis " "(\"V\"). Dit leeglaten schakelt de functionaliteit uit." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "Moet de primaire selectie de geschiedenis beïnvloeden?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "Standaard beïnvloedt alleen het klembord (Ctrl + C) de geschiedenis." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 #, fuzzy msgid "By default, we're saving all" msgstr "Standaard wordt het opgeslagen" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "" "Moet de geschiedenis worden opgeslagen van de ene sessie naar de andere?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "Standaard wordt het opgeslagen" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "Sneltoets om het menu te weergeven" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" "Ctrl + Alt + H opent het menu (\"H\"). Dit leeglaten schakelt de " "functionaliteit uit." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "Sneltoets om het klembord te synchroniseren naar de primaire selectie" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Ctrl + Alt + O synchroniseert (\"O\"). Dit leeglaten schakelt de " "functionaliteit uit." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "Sneltoets om de primaire selectie te synchroniseren met het klembord" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Ctrl + Alt + P synchroniseert (\"P\"). Dit leeglaten schakelt de " "functionaliteit uit." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "Moeten de primaire selectie en het klembord worden gesynchroniseerd?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "" "Standaard werken de primaire selectie en het klembord onafhankelijk van " "elkaar." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "Moeten klembordwijzigingen worden bijgehouden?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "Standaard worden die bijgehouden." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" "Moet de daemon-staat gesynchroniseerd worden met die van de GNOME Shell-" "uitbreiding? (schakel de daemon uit wanneer de uitbreiding wordt " "uitgeschakeld)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "Standaard blijft de daemon-staat ongewijzigd" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "" "Moeten de tekstitems worden getrimd voordat ze worden toegevoegd aan de " "geschiedenis?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" "Trimmen houdt in dat alle spaties vóór en ná de tekst worden verwijderd. " "Standaard wordt er niet getrimd." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" "Sneltoets om het eerste element in de geschiedenis te uploaden naar een " "pastebin-dienst" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" "Ctrl + Alt + U wordt gebruikt om te uploaden (\"U\"). Dit " "leeglaten schakelt de functionaliteit uit." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 #, fuzzy msgid "By default, we do as it's a destructive action" msgstr "Standaard blijft de daemon-staat ongewijzigd" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "Het oproepen is mislukt" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "Gebruik:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 #, fuzzy #| msgid "print the history with indexes" msgid "print the history with UUIDs" msgstr "geschiedenis met indexen weergeven" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "geschiedenisgrootte weergeven" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "naam verkrijgen van de huidige geschiedenis" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "naam" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "huidige geschiedenis back-uppen" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "overschakelen naar andere geschiedenis" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "een geschiedenis verwijderen" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "beschikbare geschiedenissen opsommen" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "tekst" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "verstuur tekst naar klembord" #: src/client/gpaste-client.c:173 msgid "password" msgstr "Wachtwoord" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "voeg de naam - wachtwoord-set toe aan het klembord" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "oude naam" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "nieuwe naam" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "wachtwoordnaam wijzigen" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 #, fuzzy #| msgid "get the th item from the history" msgid "get the item from the history" msgstr "verkrijg item uit de geschiedenis" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 #, fuzzy #| msgid "set the th item from the history to the clipboard" msgid "set the item from the history to the clipboard" msgstr "stelt item uit de geschiedenis in op het klembord" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "inhoud" #: src/client/gpaste-client.c:181 #, fuzzy #| msgid "" #| "replace the contents of the th item from the history with the " #| "provided one" msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "" "vervang de inhoud van item uit de geschiedenis door het opgegeven " "item" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 #, fuzzy #| msgid "" #| "merge the th items from the history and add put the result in the " #| "clipboard" msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" "voeg de items uit de geschiedenis samen en plaats het resultaat op " "het klembord" #: src/client/gpaste-client.c:185 #, fuzzy #| msgid "set the th item from the history as a password named " msgid "set the item from the history as a password named " msgstr "" "stelt item uit de geschiedenis in als een wachtwoord genaamd " #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 #, fuzzy #| msgid "delete the password from the history" msgid "delete item from the history" msgstr "verwijdert wachtwoord uit de geschiedenis" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "verwijdert wachtwoord uit de geschiedenis" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "pad" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "plaats de inhoud van het bestand uit op het klembord" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "wat dan ook" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "stelt de uitvoer van wat dan ook in op het klembord" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "geschiedenis legen" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "begin met het bijhouden van klembordwijzigingen" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "begin met het bijhouden van klembordwijzigingen" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "alias voor stop" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "de daemon herstarten (na upgraden...)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "start het configuratievenster" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "start het grafische venster" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "" "zorgt ervoor dat het applet of de uitbreiding de geschiedenis weergeeft" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 #, fuzzy #| msgid "Upload the active item to a pastebin service" msgid "upload the item to a pastebin service" msgstr "Actief item uploaden naar een pastebin-dienst" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "applicatieversie weergeven" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "daemon-versie weergeven" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "deze hulptekst weergeven" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "het over-venster weergeven" #: src/client/gpaste-client.c:222 #, fuzzy, c-format #| msgid "Merge options:" msgid "Convenience options:" msgstr "Samenvoegingsopties" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "Weergave-opties:" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "elk item slechts op één regel weergeven" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "elk item 'kaal' weergeven (zonder regelnummers)" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 #, fuzzy msgid "display the items in reverse order" msgstr "daemon-versie weergeven" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "tussen elk item een NUL-teken gebruiken i.p.v. een nieuwe regel" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "Samenvoegingsopties" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "string" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" "voeg de opgegeven decoratie aan het begin en eind van elk item alvorens het " "samen te voegen" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "" "voeg de opgegeven scheidingslijn toe tussen elk item tijdens het samenvoegen" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "De daemon is sucessvol herstart\n" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "Het toevoegen van utf8-gegevens als tekst is mislukt." #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "Het verbinden met de GPaste-daemon is mislukt" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "Het stopsignaal is ontvangen; bezig met afsluiten" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "Het ophalen van de DBus-naam is mislukt." #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "%m/%d/%y %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[Afbeelding, %d x %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "Wachtwoord" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[Bestanden]" #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "Het registreren van de GTK-applicatie is mislukt" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "draait al." #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "Klembordwijzigingen bijhouden" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "Venster sluiten na selecteren" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "GNOME Shell-extensie inschakelen" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "Daemon-staat synchroniseren met die van de uitbreiding" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "Primaire selectie beïnvloedt geschiedenis" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "Klembord synchroniseren met primaire selectie" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "Afbeeldingsondersteuning" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "Items trimmen" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "Groeiende regels detecteren" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "Geschiedenis opslaan" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "Maximale elementgrootte tijdens weergave" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "Maximale tekstitemlengte:" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "Minimale tekstitemlengte:" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "Algemeen" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "Geschiedenis-instellingen" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "Sneltoetsen" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "Overschakelen naar" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "Verwijderen" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "Annuleren" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "Legen" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "Weet u zeker dat u de geschiedenis wilt legen?" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "Het creëren van de geschiedenismap is mislukt" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "GPaste-instellingen" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "Sneltoetsen" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "Over GPaste" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "Afsluiten" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "Over" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "Back-uppen" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "Onder welke naam wilt u de geschiedenis opslaan?" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "Weet u zeker dat u de geschiedenis wilt verwijderen?" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "Bewerken" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "(Geen resultaat)" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(Leeg)" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "(Het verbinden met de GPaste-daemon is mislukt)" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "Nieuw" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "Herstarten" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "Weet u zeker dat u de daemon wilt herstarten?" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "Daemon herstarten" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "Zoeken" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "Algemeen" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "Stoppen" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "Weet u zeker dat u het bijhouden van klembordwijzigingen wilt stoppen?" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "Uploaden" #~ msgid "number" #~ msgstr "nummer" #~ msgid "delete th item of the history" #~ msgstr "verwijdert item uit de geschiedenis" #~ msgid "upload the th item to a pastebin service" #~ msgstr "upload item naar een pastebin-dienst" #~ msgid "edit-paste" #~ msgstr "bewerken-plakken" #~ msgid "launch the applet" #~ msgstr "Applet starten" #~ msgid "launch the unity application indicator" #~ msgstr "Unity applicatie-indicator starten" #~ msgid "GPaste Applet" #~ msgstr "GPaste-applet" #~ msgid "Tray icon to manage GPaste" #~ msgstr "Systeemvakpictogram om GPaste te beheren" #~ msgid "" #~ "GPaste provides you with an applet, in the form of a status icon which " #~ "will give you access to your history in your tray area." #~ msgstr "" #~ "GPaste bevat een applet in de vorm van een statuspictogram. Dit geeft u " #~ "toegang tot uw geschiedenis vanuit uw systeemvak.\t" #~ msgid "GPaste AppIndicator" #~ msgstr "GPaste applicatie-indicator" #~ msgid "Unity application indicator to manage GPaste" #~ msgstr "Unity applicatie-indicator om GPaste te beheren" #~ msgid "" #~ "GPaste provides you with an application indicator for unity which will " #~ "give you access to your history in your indicator area." #~ msgstr "" #~ "GPaste bevat een indicator voor Unity. Dit geeft u toegang tot uw " #~ "geschiedenis vanuit uw indicatorvak." #~ msgid "The AppIndicator menu" #~ msgstr "Het AppIndicator-menu" #~ msgid "Max displayed history size: " #~ msgstr "Maximaal weergegeven geschiedenisgrootte:" #~ msgid "Max history size: " #~ msgstr "Maximale geschiedenisgrootte:" #~ msgid "Max memory usage (MB): " #~ msgstr "Maximaal geheugengebruik (MB):" #~ msgid "Empty history" #~ msgstr "Geschiedenis wissen" #~ msgid "Backup history as: " #~ msgstr "Geschiedenis back-uppen als:" #~ msgid "Ok" #~ msgstr "Oké" #~ msgid "Histories" #~ msgstr "Geschiedenissen" #~ msgid "Could not register DBus service." #~ msgstr "Het registreren van de DBus-dienst is mislukt." #~ msgid "Manage GPaste" #~ msgstr "GPaste beheren" #~ msgid "GPaste daemon settings" #~ msgstr "GPaste-daemon-instellingen" #~ msgid "Manage GPaste settings" #~ msgstr "GPaste-instellingen beheren" #~ msgid "" #~ "GPaste provides you with a settings utility allowing you to customize its " #~ "behaviour as expected." #~ msgstr "" #~ "GPaste bevat een instellingenvenster waarmee u het applicatiegedrag kunt " #~ "instellen." #~ msgid "Manage the GPaste daemon settings" #~ msgstr "GPaste-Daemon-Einstellungen" #~ msgid "Stop tracking changes" #~ msgstr "Stoppen met bijhouden van wijzigingen" #~ msgid "Track changes" #~ msgstr "Wijzigingen bijhouden" #~ msgid "print the history without newlines" #~ msgstr "geschiedenis printen zonder nieuweregels" #~ msgid "print the history (raw) without indexes" #~ msgstr "geschiedenis printen zonder indexen (zonder opmaak)" #~ msgid "print the history with NUL as separator" #~ msgstr "geschiedenis printen met NUL als scheidingslijn" #~ msgid "get the th item from the history (raw)" #~ msgstr "verkrijg item uit de geschiedenis (zonder opmaak)" #~ msgid "Couldn't spawn gpaste-app-indicator.\n" #~ msgstr "Het starten van de GPaste-appindicator is mislukt.\n" gpaste-3.42.6/po/pl.po000066400000000000000000001122331421222064600144630ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Marc-Antoine Perennou # This file is distributed under the same license as the gpaste package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: gpaste 3.40.2\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2021-05-30 16:32+0000\n" "Last-Translator: F4 Developer \n" "Language-Team: Polish \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-Generator: Weblate 4.7-dev\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "Zarządzaj historią swojego schowka" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" "GPaste jest systemem zarządzania schowkiem, pozwalającym na śledzenie i " "zarządzanie historią schowka w wysoko konfigurowalny sposób." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" "GPaste zapewnia Ci narzędzie graficzne, które pozwala Ci wszystkim łatwo " "zarządzać." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "Główny interfejs użytkownika" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "Interfejs ustawień" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "To wydanie konserwacyjne. Zmiany:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 #, fuzzy #| msgid "updated translations" msgid "translations update" msgstr "zaktualizowano tłumaczenia" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 #, fuzzy #| msgid "gnome-shell extension cosmetic updates" msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "poprawki kosmetyczne rozszerzenia dla gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 #, fuzzy #| msgid "First release for GNOME 40. Changes:" msgid "First release for GNOME 41. Changes:" msgstr "Pierwsze wydanie na GNOME 40. Zmiany:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 #, fuzzy #| msgid "port to gnome-shell 40" msgid "port to gnome-shell 41" msgstr "port na gnome-shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "naprawiono błąd w sprawdzeniu wykorzystania pamięci" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "Pierwsze wydanie na GNOME 40. Zmiany:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "port na gnome-shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "placeholder dla preferencji gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "poprawiono keybinder X11 poza GNOME" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" "lepsza obsługa i zgłaszanie nieprawidłowych unikalnych identyfikatorów " "przekazywanych do gpaste-client" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" "gpaste-client obsługuje teraz argument --use-index dla użycia kilku " "subkomend zamiast unikalnego identyfikatora" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "poprawka dla skrótu klawiszowego \"stwórz hasło\"" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "zaktualizowano tłumaczenia" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "poprawki w ostrzeżeniach rozszerzenia gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "poprawki kosmetyczne rozszerzenia dla gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" "Domyślnie wyłącz wsparcie dla zdjęć (może zostać ponownie włączone w " "preferencjach)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "Wyszukiwanie uwzględnia teraz hasła (używając ich nazw)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "poprawki w integracji z systemd" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "Pierwsze wydanie dla GNOME 3.38. Zmiany:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "Wyłącz śledzenie sygnału DBus" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "Przełącz na unikalne identyfikatory do identyfikacji elementów" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "Zaktualizowano do gnome-shell 3.38.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "Naprawiono aktywowanie elementów używając Ctrl+numer w gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 #, fuzzy msgid "Fix keybinding regrab with gnome-shell" msgstr "Naprawiono regrab skrótów klawiszowych w gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "Pierwsze wydanie na GNOME 3.36. Zmiany:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "Aktualizacja do gnome-shell 3.36.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "Kompatybilność z ostatnim appstream-glib" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "Pierwsze wydanie dla GNOME 3.34. Zmiany:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "Aktualizacja do gnome-shell 3.34.0" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "@GETTEXT_PACKAGE@" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "Uruchom narzędzie graficzne" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "Zaznacz aktywny element jako będący hasłem" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "Usuń aktywny element z historii" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "Pokaż historię" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "Synchronizuj schowek do pierwszego zaznaczenia" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "Synchronizuj pierwsze zaznaczenie do schowka" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "Wygraj aktywny element na pastebin" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "Schowek;Menadżer;Ustawienia;Preferencje;Konfiguracja;" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "Maksymalna długość elementu w trakcie wyświetlania" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" "Dodatkowe części tego elementu będą zastąpione przez \"…\", a nowe linie " "przez \" \" w trakcie wyświetlania z apletu, 0 aby wyłączyć." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 #, fuzzy msgid "Do we detect and replace growing lines in history?" msgstr "Do we detect and replace growing lines in history?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" "Domyślnie zaznaczanie \"Tutaj jest\", a potem \"Tutaj jest przykład\" " "stworzy dwa elementy w historii. Po włączeniu tej opcji, pierwszy zostanie " "zastąpiony przez drugi." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "Nazwa aktualnej historii" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "Domyślną nazwa to \"historia\"" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "Zapisywać skopiowane obrazy, czy tylko tekst?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "Domyślnie, zapisujemy tylko tekst" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "Zamykać interfejs użytkownika po zaznaczeniu elementu?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "Domyślnie zamykamy" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "Skrót klawiszowy do uruchomienia interfejsu graficznego" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" "Domyślnie jest to wywołane przez ctrl + alt + g (\" G\"). Pusty " "ciąg w tym miejscu wyłącza tę funkcjonalność." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "" "Skrót klawiszowy do zaznaczenia aktywnego elementu jako będącego hasłem" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" "Domyślnie jest to wywołane przez ctrl + alt + s (\"S\"). Pusty " "ciąg w tym miejscu wyłącza tę funkcjonalność." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "Maksymalna wielkość wyświetlanej historii" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "Maksymalna ilość elementów wyświetlanych w historii" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "Maksymalna wielkość historii" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "Maksymalna ilość elementów w historii" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "Maksymalne zużycie pamięci (MB)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "Maksymalna ilość pamięci używanej do przechowywania zawartości" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "Maksymalna długość elementu tekstowego" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" "Maksymalna długość elementu tekstowego. Wszystko co jest dłuższe, zostanie " "zignorowane." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "Minimalna długość elementu tekstowego" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" "Minimalna długość elementu tekstowego. Wszystko, co jest krótsze, zostanie " "zignorowane." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "Skrót klawiszowy do usunięcia pierwszego elementu w historii" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" "Domyślnie jest to wywołane przez ctrl + alt + v (\" V\"). Pusty " "ciąg w tym miejscu wyłącza tę funkcjonalność." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "Czy pierwsze zaznaczenie ma wpływ na historię?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "Domyślnie tylko kopiowanie (ctrl+c) ma wpływ na historię." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" "Zapisywać wszystkie wersje zaznaczonego bogatego tekstu (rich text, np. " "HTML), czy tylko zwykły tekst (plain text)?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "Domyślnie zapisujemy wszystkie" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "Zapisywać historię pomiędzy sesjami?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "Domyślnie zapisujemy" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "Skrót klawiszowy do wyświetlenia menu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" "Domyślnie jest to wywołane przez ctrl + alt + h (\" H\"). Pusty " "ciąg w tym miejscu wyłącza tę funkcjonalność." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "Skrót klawiszowy do synchronizacji schowka z pierwszym zaznaczeniem" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Domyślnie jest to wywołane przez ctrl + alt + o (\" O\"). Pusty " "ciąg w tym miejscu wyłącza tę funkcjonalność." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "Skrót klawiszowy do synchronizacji pierwszego zaznaczenia do schowka" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Domyślnie jest to wywołane przez ctrl + alt + p (\" P\"). Pusty " "ciąg w tym miejscu wyłącza tę funkcjonalność." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "Czy pierwsze zaznaczenie i schowek są zsynchronizowane?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "Domyślnie, pierwsze zaznaczenie i schowek są niezależne." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "Czy śledzić zmiany w schowku?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "Domyślnie śledzimy te zmiany." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" "Synchronizować status daemons z rozszerzeniem gnome-shella? (wyłącza daemona " "w momencie wyłączenia rozszerzenia)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "Domyślnie status daemona nie jest zmieniany" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "Czyścić elementy tekstowe przed dodawaniem ich do historii?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" "Czyszczenie oznacza usuwanie wszystkich spacji na początku i końcu tekstu. " "Domyślnie, zostawiamy je tak, jak są." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" "Skrót klawiszowy do wysyłania pierwszego elementu z historii na pastebin" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" "Domyślnie jest to wywołane przez ctrl + alt + u (\" U\"). Pusty " "ciąg w tym miejscu wyłącza tę funkcjonalność." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "Pytać o potwierdzenie przy czyszczeniu historii?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "Domyślnie robimy to, jako, że jest to akcja destruktywna" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "Nie można było utworzyć" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "Użycie:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 msgid "print the history with UUIDs" msgstr "wypisz historię z unikalnymi identyfikatorami" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "wypisz wielkość historii" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "wyświetl nazwę aktywnej historii" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "nazwa" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "kopia zapasowa aktywnej historii" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "przełącz na inną historię" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "usuń historię" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "wypisz dostępne historie" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "tekst" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "ustaw tekst do schowka" #: src/client/gpaste-client.c:173 msgid "password" msgstr "hasło" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "dodaj parę nazwa — hasło do schowka" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "stara nazwa" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "nowa nazwa" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "zmień nazwę hasła" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "wybierz element z identyfikatorem z historii" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr "ustaw element z identyfikatorem z historii do schowka" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "zawartość" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "" "zastąp zawartość elementu z identyfikatorem z historii tym podanym" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" "połącz elementy z podanymi identyfikatorami z historii i wstaw rezultat do " "schowka" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr "" "ustaw element z identyfikatorem z historii jako hasło nazwane " #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr "usuń element z identyfikatorem z historii" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "usuń hasło z identyfikatorem z historii" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "ścieżka" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "wstaw zawartość pliku pod <ścieżka> do schowka" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "cokolwiek" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "ustaw wyjście czegokolwiek do schowka" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "opróżnij historię" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "zacznij śledzić zmiany w schowku" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "przestań śledzić zmiany w schowku" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "alias dla stop" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "uruchom ponownie dameona (po aktualizacji...)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "uruchom narzędzie konfiguracyjne" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "uruchom narzędzie graficzne" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "spraw, żeby aplet lub rozszerzenie pokazywało historię" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr "wyślij element o identyfikatorze na pastebin" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "wyświetl wersję" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "wyświetl wersję daemona" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "wyświetl tę pomoc" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "wyświetl okienko \"o\"" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "użyj indeksu elementu zamiast jego identyfikatora" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "Opcje wyświetlania:" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "wyświetlaj każdy element w jednej linii" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "wyświetlaj każdy element w surowej formie (bez numerów linii)" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "wyświetlaj elementy w odwrotnej kolejności" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "uzyskaj znaku NUL zamiast nowej linii pomiędzy elementami" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "Ustawienia łączenia:" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "ciąg" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" "dodaj podaną dekorację na początek i na koniec każdego elementu przed " "łączeniem" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "dodaj podany separator pomiędzy elementami podczas łączenia" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "Pomyślnie uruchomiono ponownie daemon\n" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "Nie można dodać zawartości w innym kodowaniu niż utf8 jako tekst." #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "Nie można było połączyć się z daemonem GPaste" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "Otrzymano sygnał stop, wychodzenie" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "Nie można było pobrać nazwy DBus." #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "%d/%m/%y %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[Obraz, %d x %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "Hasło" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[Pliki] " #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "Nie można było zarejestrować aplikacji gtk" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "już jest uruchomiony." #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "Śledź zmiany schowka" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "Zamknij interfejs po zaznaczeniu" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "Włącz rozszerzenie gnome-shell" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "Synchronizuj status daemona ze statusem rozszerzenia" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "Pierwsze zaznaczenie ma wpływ na historię" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "Synchronizuj schowek z pierwszym zaznaczeniem" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "Wsparcie dla obrazów" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "Czyść elementy" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "Zapisz historię" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "Maksymalna wielkość elementu podczas wyświetlania" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "Maksymalna długość elementu tekstowego" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "Minimalna długość elementu tekstowego" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "Generalne zachowanie" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "Ustawienia historii" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "Skróty klawiszowe" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "Przełącz na" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "Usuń" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "Anuluj" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "Wyczyść" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "Czy na pewno chcesz wyczyścić historię?" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "Nie można było stworzyć folderu historii" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "Ustawienia GPaste" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "Skróty klawiszowe" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "O GPaste" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "Wyjdź" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "O nas" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "Kopia zapasowa" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "Pod jaką nazwą chcesz zrobić kopię zapasową tej historii?" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "Czy na pewno chcesz usunąć tę historię?" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "Edytuj" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "(Brak wyników)" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(Puste)" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "(Nie można było połączyć się z daemonem GPaste)" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "Nowy" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "Restart" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "Czy na pewno chcesz zrestartować daemona?" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "Zrestartuj daemona" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "Wyszukaj" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "Generalne" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "Stop" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "Na pewno chcesz przestać śledzić zmiany schowka?" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "Wyślij" gpaste-3.42.6/po/pt_BR.po000066400000000000000000001220721421222064600150600ustar00rootroot00000000000000# Brazilian Portuguese translation for GPaste package. # Copyright (C) 2012-2015 Listed translators # This file is distributed under the same license as the GPaste package. # Elder Marco , 2012. # msgid "" msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2021-11-27 10:52+0000\n" "Last-Translator: Rafael Fontenelle \n" "Language-Team: Portuguese (Brazil) \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-Generator: Weblate 4.10-dev\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "Gerencie seu histórico da área de transferência" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" "O GPaste é um sistema de gerenciamento de área de transferência que permite " "controlar e gerenciar seu histórico de uma maneira altamente personalizável." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" "O GPaste fornece uma ferramenta gráfica que permite gerenciar tudo " "facilmente." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "A UI principal" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "A UI de configurações" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "Este é um lançamento de manutenção. Alterações:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "atualização de traduções" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "corrige a extensão do gnome-shell quando o daemon é reiniciado" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "Corrige associações de teclas para o wayland" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "Primeiro lançamento para o GNOME 41. Alterações:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "port para gnome-shell 41" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "corrige uma falha na verificação do uso de memória" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "Primeiro lançamento para o GNOME 40. Alterações:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "port para gnome-shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "espaço reservado para preferências do gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "corrige associação de teclas X11 fora do GNOME" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" "melhor tratamento e relatório de uuids inválidos passados para gpaste-client" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" "gpaste-client agora tem um argumento --use-index para vários subcomandos " "para usar index em vez de uuid" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "corrige a associação de teclas do make-password" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "traduções atualizadas" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "correções de aviso de extensão do gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "atualizações cosméticas de extensão do gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" "Desabilita suporte a imagens por padrão (pode ser reabilitado nas " "preferências)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "A pesquisa agora inclui senhas (usando seus nomes)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "melhorias de integração systemd" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "Primeiro lançamento para GNOME 3.38. Alterações:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "Descara o sinal Tracking DBus" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "Alterna para uuids para identificar itens" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "Incrementa a interface DBus para org.gnome.GPaste2" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "Atualiza para o gnome-shell 3.38.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "Corrige itens de ativação usando Ctrl-Número no gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "Corrige nova captura de associação de teclas com gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "Corrige captura de associação de teclas com gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "Primeiro lançamento para o GNOME 3.36. Alterações:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "Atualização para o gnome-shell 3.36.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "Compatibilidade com appstream-glib recente" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "Primeiro lançamento para o GNOME 3.34. Alterações:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "Atualização para o gnome-shell 3.34.0" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "@GETTEXT_PACKAGE@" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "Inicia a ferramenta gráfica" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "Marca o item ativo como sendo uma senha" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "Apaga o item ativo do histórico" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "Mostra o histórico" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "Sincroniza a área de transferência com a seleção primária" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "Sincroniza a seleção primária com a área de transferência" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "Carrega o item ativo para um serviço de pastebin" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "" "Clipboard;Manager;Settings;Preferences;Configuration;Área de transferência;" "Gerenciador;Configurações;Preferências;" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "Tamanho máximo de um elemento ao exibir" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" "O restante desse elemento será substituído por \"…\", e novas linhas por \" " "\" quando for exibido no applet, 0 para desabilitar." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "Detectar e substituir linhas crescentes no histórico?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" "Por padrão, selecionando \"Aqui está\", e então \"Aqui está um exemplo\" irá " "criar duas entradas no histórico. Com esse recurso habilitado, o primeiro " "será substituído pelo segundo." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "O nome do histórico atual" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "O nome padrão é \"history\"" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "Salvar as imagens copiadas para o histórico ou somente o texto?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "Por padrão, apenas texto é salvo" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "Fechar a UI após selecionar um item?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "Por padrão, ela é fechada" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "O atalho do teclado para executar a interface gráfica" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" "Por padrão, a combinação de teclas ctrl + alt + g faz isso (\"G" "\"). Deixar vazio aqui desabilita essa funcionalidade." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "O atalho do teclado para marcar o item ativo como sendo uma senha" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" "Por padrão, a combinação de teclas ctrl + alt + s vai marcar o item ativo " "como sendo uma senha (\"S\"). Deixar vazio aqui desabilita essa " "funcionalidade." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "Tamanho máximo do histórico ao exibir" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "Número máximo de itens exibidos no histórico" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "Tamanho máximo do histórico" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "Número máximo de itens no histórico" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "Uso máximo de memória (MB)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "Quantidade máxima de memória utilizada para armazenamento" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "Tamanho máximo do item de texto" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" "Tamanho máximo de um item de texto. Qualquer coisa fora desse limite é " "ignorado." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "Tamanho mínimo do item de texto" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" "Tamanho mínimo de um item de texto. Qualquer coisa fora desse limite é " "ignorado." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "O atalho do teclado para apagar o primeiro elemento no histórico" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" "Por padrão, a combinação de teclas ctrl + alt + v faz isso (\"V" "\"). Deixar vazio aqui desabilita essa funcionalidade." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "Seleção primária afeta o histórico?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "" "Por padrão, somente a área de transferência (ctrl+c) afeta o histórico." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" "Salvamos todas as versões do text rico selecionado (por exemplo, html) ou " "apenas a versão em texto simples?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "Por padrão, tudo é salvo" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "Salvar o histórico entre uma sessão e outra?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "Por padrão, ele é salvo" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "O atalho do teclado para exibir o menu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" "Por padrão, a combinação de teclas ctrl + alt + h exibe o menu " "(\"H\"). Deixar vazio aqui desabilita essa funcionalidade." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "" "Atalho do teclado para sincronizar a área de transferência com a seleção " "primária" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Por padrão, teclando ctrl + alt + o faz a sincronização (\"P\"). " "Uma string vazia aqui desabilita essa funcionalidade." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "" "Atalho do teclado para sincronizar a seleção primária com a área de " "transferência" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Por padrão, teclando ctrl + alt + p faz a sincronização (\"P\"). " "Uma string vazia aqui desabilita essa funcionalidade." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "Seleção primária e a área de transferência estão sincronizadas?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "" "Por padrão, seleção primária e área de transferência são independentes." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "Monitorar as alterações na área de transferência?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "Por padrão, essas alterações são monitoradas." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" "Sincronizar o estado do daemon com a extensão do gnome-shell? (desabilitar o " "daemon quando desabilitar a extensão)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "Por padrão, o estado do daemon se mantém inalterado" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "Aparar itens textuais antes de adicioná-los ao histórico?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" "Aparar significa que espaços em branco antes e depois do texto serão " "removidos. Por padrão, é deixado como está." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" "O atalho do teclado para carregar o primeiro elemento do histórico para um " "serviço de pastebin" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" "Por padrão, a combinação de teclas ctrl + alt + u faz isso (\"U" "\"). Deixar vazio aqui desabilita essa funcionalidade." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "Solicitamos confirmação ao esvaziar um histórico?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "Por padrão, é feito por ser uma ação destrutiva" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "Não foi possível executar" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "Uso:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 msgid "print the history with UUIDs" msgstr "imprime o histórico com os UUIDs" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "imprime o tamanho do histórico" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "obtém o nome do histórico atual" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "nome" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "faz um backup do histórico atual" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "alterna para um outro histórico" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "apaga um histórico" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "lista os históricos disponíveis" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "texto" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "copia texto para a área de transferência" #: src/client/gpaste-client.c:173 msgid "password" msgstr "senha" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "adiciona o par nome - senha para a área de transferência" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "nome anterior" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "novo nome" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "define um novo nome para a senha" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "obtém o item do histórico" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr "define o item do histórico para a área de transferência" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "conteúdo" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "substitui o conteúdo do item do histórico com aquele fornecido" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" "mescla os itens correspondendo os UUIDs do histórico e coloca o resultado na " "área de transferência" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr "define o item do histórico como uma senha chamada " #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr "apaga o item do histórico" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "apaga a senha do histórico" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "caminho" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "coloca o conteúdo do arquivo em na área de transferência" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "qualquercomando" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "copia a saída de qualquercomando para a área de transferência" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "esvazia o histórico" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "inicia o monitoramento de alterações na área de transferência" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "pára o monitoramento de alterações na área de transferência" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "apelido para stop" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "reinicia o daemon (depois de uma atualização...)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "inicia a ferramenta de configuração" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "inicia a ferramenta gráfica" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "faz o applet ou a extensão exibir o histórico" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr "carrega o item para um serviço de pastebin" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "mostra a versão" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "mostra a versão do daemon" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "mostra esta ajuda" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "mostra o diálogo Sobre" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "Opções de conveniência:" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "use o índice do item em vez de seu UUID" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "Opções de exibição:" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "Mostra cada item em uma única linha" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "exibe cada item bruto (sem números nas linhas)" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "Exibe os itens na ordem inversa" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "" "utiliza um caractere NUL no lugar de um caractere de nova linha entre cada " "item" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "Opções de merge:" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "string" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" "adiciona a decoração dada ao início e ao fim de cada item antes de fazer o " "merge" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "adiciona o separador dado entre cada item durante o merge" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "O daemon foi reiniciado com sucesso\n" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "Não é possível adicionar dados não utf8 como texto." #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "Não foi possível se conectar ao daemon do GPaste" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "Sinal de parada recebido, saindo" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "Não foi possível obter um nome DBus." #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "%d/%m/%y %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[Imagem, %d x %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "Senha" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[Arquivos] " #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "Falha ao registrar a aplicação gtk" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "já está em execução." #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "Monitorar a área de transferência" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "Fechar a UI na seleção" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "Habilitar a extensão do gnome-shell" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "Sincronizar o estado do daemon com a extensão" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "Seleção primária afeta o histórico" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "Sincronizar área de transferência com a seleção primária" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "Suporte a Imagens" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "Aparar itens" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "Detectar linhas crescentes" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "Salvar histórico" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "Tamanho máximo do elemento ao exibir" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "Tamanho máximo do item de texto" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "Tamanho mínimo do item de texto" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "Comportamento geral" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "Configurações do histórico" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "Atalhos do teclado" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "Alternar para" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "Apagar" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "Cancelar" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "Esvaziar" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "Você quer mesmo esvaziar o histórico?" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "Não foi possível criar o diretório do histórico" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "Configurações do GPaste" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "Atalhos do teclado" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "Sobre de GPaste" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "Sair" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "Sobre" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "Backup" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "Com qual nome você deseja salvar este histórico?" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "Tem certeza que quer apagar este histórico?" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "Editar" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "(Nenhum resultado)" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(Vazio)" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "(Não foi possível se conectar ao daemon do GPaste)" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "Novo" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "Reiniciar" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "Você quer mesmo reiniciar o daemon?" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "Reiniciar o daemon" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "Pesquisar" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "Geral" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "Parar" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "" "Você quer mesmo parar o monitoramento de alterações na área de transferência?" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "Carregar" #~ msgid "number" #~ msgstr "número" #~ msgid "delete th item of the history" #~ msgstr "apaga o -ésimo item do histórico" #~ msgid "upload the th item to a pastebin service" #~ msgstr "" #~ "Apagar o primeiro item do histórico: carrega o -ésimo item para " #~ "um serviço de pastebin" #~ msgid "launch the applet" #~ msgstr "inicia o applet do GPaste" #~ msgid "launch the unity application indicator" #~ msgstr "inicia o aplicativo indicador do unity" #~ msgid "GPaste Applet" #~ msgstr "Applet do GPaste" #~ msgid "Tray icon to manage GPaste" #~ msgstr "Ícone da bandeja para gerenciar o GPaste" #~ msgid "" #~ "GPaste provides you with an applet, in the form of a status icon which " #~ "will give you access to your history in your tray area." #~ msgstr "" #~ "O GPaste fornece um applet na forma de um ícone de status, que dá acesso " #~ "ao seu histórico a partir da bandeja do sistema." #~ msgid "GPaste AppIndicator" #~ msgstr "Aplicativo Indicador do GPaste" #~ msgid "Unity application indicator to manage GPaste" #~ msgstr "Aplicativo indicador do Unity para gerenciar o GPaste" #~ msgid "" #~ "GPaste provides you with an application indicator for unity which will " #~ "give you access to your history in your indicator area." #~ msgstr "" #~ "O GPaste fornece um aplicativo indicador para o unity que dá acesso ao " #~ "seu histórico a partir da área de indicações." #, fuzzy #~ msgid "The AppIndicator menu" #~ msgstr "Aplicativo Indicador do GPaste" #~ msgid "Clipboard;Manager;" #~ msgstr "Clipboard;Manager;" #~ msgid "Max displayed history size: " #~ msgstr "Tamanho máximo do histórico ao exibir:" #~ msgid "Max history size: " #~ msgstr "Tamanho máximo do histórico:" #~ msgid "Max memory usage (MB): " #~ msgstr "Uso de memória (MB): " #~ msgid "is not installed" #~ msgstr "não está instalado" #~ msgid "Empty history" #~ msgstr "Esvaziar histórico" #~ msgid "Backup history as: " #~ msgstr "Backup do histórico como: " #~ msgid "Ok" #~ msgstr "Ok" #~ msgid "Histories" #~ msgstr "Históricos" #~ msgid "Could not register DBus service." #~ msgstr "Não foi possível registrar o serviço DBus." #~ msgid "GPaste user interface" #~ msgstr "Interface de usuário do GPaste" #~ msgid "GPaste graphical interface" #~ msgstr "Interface gráfica do GPaste" #~ msgid "Manage GPaste" #~ msgstr "Gerenciar o GPaste" #~ msgid "GPaste daemon settings" #~ msgstr "Configurações do daemon GPaste" #~ msgid "Manage GPaste settings" #~ msgstr "Gerenciar as configurações do GPaste" #~ msgid "" #~ "GPaste provides you with a settings utility allowing you to customize its " #~ "behaviour as expected." #~ msgstr "" #~ "O GPaste fornece um utilitário de configurações que permite personalizar " #~ "o comportamento da maneira como você espera." #~ msgid "Manage the GPaste daemon settings" #~ msgstr "Gerenciar as configurações do daemon GPaste" #~ msgid "Stop tracking changes" #~ msgstr "Parar o monitoramento" #~ msgid "Track changes" #~ msgstr "Monitorar a área de transferência" #, fuzzy #~ msgid "print the history without newlines" #~ msgstr "imprime o histórico com os índices" #~ msgid "print the history (raw) without indexes" #~ msgstr "imprime o histórico (cru), sem os índices" #~ msgid "print the history with NUL as separator" #~ msgstr "imprime o histórico com um NULO como separador" #~ msgid "get the th item from the history (raw)" #~ msgstr "obtém o n-ésimo item do histórico (cru)" #~ msgid "Couldn't spawn gpaste-app-indicator.\n" #~ msgstr "Não foi possível abrir o gpaste-app-indicator.\n" gpaste-3.42.6/po/ru.po000066400000000000000000001270071421222064600145030ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Marc-Antoine Perennou # This file is distributed under the same license as the gpaste package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: gpaste 3.42.2\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2021-11-27 10:52+0000\n" "Last-Translator: Gankov Andrey \n" "Language-Team: Russian \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-Generator: Weblate 4.10-dev\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "Управляйте историей буфера обмена" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" "GPaste - это система управления буфером обмена, позволяющая отслеживать и " "управлять историей буфера обмена с широкими возможностями настройки." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" "GPaste предоставляет вам графический инструмент, позволяющий легко управлять " "всем." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "Основной интерфейс" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "Настройки интерфейса" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "Это выпуск для обслуживания. Изменения:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "обновление переводов" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "исправлено расширение gnome-shell при перезапуске демона" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "Исправлены привязки клавиш для Wayland" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "Первый выпуск для GNOME 41. Изменения:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "переход на gnome-shell 41" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "исправление сбоя при проверке использования памяти" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "Первый выпуск для GNOME 40. Изменения:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "переход на gnome-shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "место для предварительных настроек gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "исправлена привязка клавиш X11 вне GNOME" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" "улучшена обработка и информирование о недопустимых uuids, переданных в " "gpaste-client" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" "gpaste-client теперь имеет аргумент --use-index в нескольких подкомандах для " "использования индекса вместо uuid" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "исправлена привязка клавиши для make-password" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "обновленные переводы" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "исправлены предупреждения в расширении для gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "косметические обновления в расширения gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" "По умолчанию отключена поддержка изображений (можно снова включить в " "настройках)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "Поиск теперь включает пароли (используя их имена)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "улучшения интеграции с systemd" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "Первый выпуск для GNOME 3.38. Изменения:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "Сброс сигнала DBus для отслеживания" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "Переход на uuids для идентификации предметов" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "Обновление интерфейса DBus до org.gnome.GPaste2" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "Обновление до gnome-shell 3.38.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "Исправлена активация элементов с помощью Ctrl+Номер в gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "Исправлена привязка клавиш regrab с помощью gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "Исправлен захват привязки клавиш с помощью gnome-shell" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "Первый выпуск для GNOME 3.36. Изменения:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "Обновление до gnome-shell 3.36.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "Совместимость с последними версиями appstream-glib" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "Первый выпуск для GNOME 3.34. Изменения:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "Обновление до gnome-shell 3.34.0" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "@GETTEXT_PACKAGE@" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "Запустить графический интерфейс" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "Пометить активный элемент как пароль" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "Удалить активный элемент из истории" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "Показать историю" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "Синхронизировать буфер обмена с основным выделением" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "Синхронизировать основное выделение с буфером обмена" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "Отправить активный элемент на сервис pastebin" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "Буфер обмена;Менеджер;Настройки;Предпочтения;Конфигурация;" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "Максимальный размер элемента при его отображении" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" "Лишнее в этом элементе будет заменено на \"...\", а новые строки на \" \" " "при отображении из апплета, 0 для отключения." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "Мы обнаруживаем и заменяем растущие линии в истории?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" "По умолчанию выделение \"Вот\", а затем \"Вот пример\" создаст две записи в " "истории. При включении этой функции первая запись будет заменена второй." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "Имя текущей истории" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "Имя по умолчанию - \"история\"" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "Сохраняем ли мы скопированные изображения в историю или только текст?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "По умолчанию мы сохраняем только текст" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "Закрываем ли мы пользовательский интерфейс после выбора элемента?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "По умолчанию мы закрываем его" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "Комбинация клавиш для запуска графического интерфейса" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" "По умолчанию нажатие ctrl + alt + g делает это («G»). Пустая " "строка здесь отключает эту функцию." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "Комбинация клавиш для пометки активного элемента как пароля" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" "По умолчанию нажатие ctrl + alt + s помечает активный элемент как пароль " "(«S»). Пустая строка здесь отключает эту функцию." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "Максимальный размер отображаемой истории" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "Максимальное количество элементов, отображаемых в истории" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "Максимальный размер истории" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "Максимальное количество элементов в истории" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "Максимальное использование памяти (МБ)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "Максимальный объем памяти, используемый для хранения содержимого" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "Максимальный размер текстового элемента" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" "Максимальный размер текстового элемента. Все, что выходит за пределы этой " "границы, игнорируется." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "Минимальный размер текстового элемента" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" "Минимальный размер текстового элемента. Все, что выходит за пределы этой " "границы, игнорируется." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "Комбинация клавиш для удаления первого элемента в истории" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" "По умолчанию нажатие ctrl + alt + v делает это («V»). Пустая " "строка здесь отключает эту функцию." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "Влияет ли первичное выделение на историю?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "По умолчанию только буфер обмена (ctrl+c) влияет на историю." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" "Сохраняем ли мы все версии выделенного форматированного текста (такого как " "html) или только версию с простым текстом?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "По умолчанию мы сохраняем все" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "Сохраняем ли мы историю между сеансами?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "По умолчанию мы ее сохраняем" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "Комбинация клавиш для отображения меню" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" "По умолчанию при нажатии ctrl + alt + h отображается меню («H»). " "Пустая строка здесь отключает эту функцию." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "" "Комбинация клавиш для синхронизации буфера обмена с основным выделением" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "По умолчанию нажатие ctrl + alt + o синхронизирует их («P»). " "Пустая строка здесь отключает эту функцию." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "" "Комбинация клавиш для синхронизации основного выделения с буфером обмена" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "По умолчанию нажатие ctrl + alt + p синхронизирует их («P»). " "Пустая строка здесь отключает эту функцию." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "Синхронизированы ли основное выделение и буфер обмена?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "По умолчанию основное выделение и буфер обмена являются независимыми." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "Отслеживаем ли мы изменения в буфере обмена?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "По умолчанию мы отслеживаем эти изменения." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" "Синхронизируем ли мы состояние демона с состоянием расширения gnome-shell? " "(отключение демона при отключении расширения)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "По умолчанию состояние демона остается неизменным" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "Обрезаем ли мы текстовые элементы, прежде чем добавить их в историю?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" "Обрезка означает удаление пробелов и символов перевода каретки в конце " "строки. По умолчанию мы оставляем их как есть." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" "Комбинация клавиш для отправки первого элемента истории на сервис pastebin" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" "По умолчанию нажатие ctrl + alt + u делает это («U»). Пустая " "строка здесь отключает эту функцию." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "Запрашиваем ли мы подтверждение при очистке истории?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "По умолчанию мы делаем это, поскольку это деструктивное действие" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "Не удалось создать" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "Использование:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 msgid "print the history with UUIDs" msgstr "выводить историю с UUID" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "выводить размер истории" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "получить имя текущей истории" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "имя" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "резервное копирование текущей истории" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "переключиться на другую историю" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "удалить историю" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "список доступных историй" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "текст" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "установить текст в буфер обмена" #: src/client/gpaste-client.c:173 msgid "password" msgstr "пароль" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "добавить пару имя - пароль в буфер обмена" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "старое имя" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "новое имя" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "переименовать пароль" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "получить элемент из истории" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr "установить элемент из истории в буфер обмена" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "содержание" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "" "заменить содержимое элемента из истории на предоставленный элемент" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" "объединить элементы, соответствующие UUID, из истории и поместить результат " "в буфер обмена" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr "установить элемент из истории в качестве пароля с именем " #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr "удалить элемент из истории" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "удалить пароль из истории" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "путь" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "поместить содержимое файла в буфер обмена" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "что угодно" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "установить вывод чего-либо в буфер обмена" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "очистить историю" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "начать отслеживать изменения в буфере обмена" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "прекратить отслеживать изменения в буфере обмена" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "псевдоним для остановки" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "перезапустить демон (после обновления ...)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "запустить инструмент настройки" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "запустить графический интерфейс" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "заставить апплет или расширение отображать историю" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr "загрузить элемент на сервис pastebin" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "показать версию" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "показать версию демона" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "показать эту справку" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "показать «О программе»" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "Настройки удобства:" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "использовать индекс элемента вместо его UUID" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "Параметры отображения:" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "отображать каждый элемент только в одной строке" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "отображать каждый элемент в необработанном виде (без номеров строк)" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "отображать элементы в обратном порядке" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "использовать символ NUL вместо новой строки между элементами" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "Параметры слияния:" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "строка" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" "добавить заданный декоратор в начало и конец каждого элемента перед слиянием" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "добавить заданный разделитель между элементами при слиянии" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "Успешный перезапуск демона\n" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "Невозможно добавить данные, отличные от utf8, в качестве текста." #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "Не удалось подключиться к демону GPaste" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "Получен сигнал остановки, выходим" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "Не удалось получить имя DBus." #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "%d.%m.%y %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[Изображение, %d x %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "Пароль" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[Файлы] " #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "Не удалось зарегистрировать приложение GTK" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "уже запущен." #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "Отслеживать изменения в буфере обмена" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "Закрывать интерфейс после выбора" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "Включить расширение gnome-shell" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "Синхронизировать состояние демона с состоянием расширения" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "Первичное выделение влияет на историю" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "Синхронизировать буфер обмена с первичным выделением" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "Поддержка изображений" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "Обрезать элементы" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "Обнаружение увеличивающихся строк" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "Сохранять историю" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "Максимальный размер элемента при отображении" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "Максимальная длина текстового элемента" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "Минимальная длина текстового элемента" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "Общее поведение" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "Настройки истории" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "Комбинации клавиш" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "Переключиться на" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "Удалить" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "Отмена" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "Пусто" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "Вы действительно хотите очистить историю?" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "Не удалось создать каталог истории" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "Настройки GPaste" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "Комбинации клавиш" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "О GPaste" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "Выход" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "О нас" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "Резервное копирование" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "Под каким именем вы хотите создать резервную копию этой истории?" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "Вы уверены, что хотите удалить эту историю?" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "Редактировать" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "(Нет результата)" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(Пусто)" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "(Не удалось подключиться к демону GPaste)" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "Новый" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "Перезапустить" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "Вы действительно хотите перезапустить демон?" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "Перезапустить демон" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "Поиск" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "Общие" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "Остановить" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "" "Вы действительно хотите остановить отслеживание изменений в буфере обмена?" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "Загрузить" gpaste-3.42.6/po/sl.po000066400000000000000000000723321421222064600144730ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Marc-Antoine Perennou # This file is distributed under the same license as the gpaste package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: gpaste 3.38.5\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2021-02-18 20:50+0000\n" "Last-Translator: Matej U \n" "Language-Team: Slovenian \n" "Language: sl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" "%100==4 ? 2 : 3;\n" "X-Generator: Weblate 4.5\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "Upravljanje z zgodovino odložišča" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "Glavni vmesnik" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "Vmesnik nastavitev" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "Nameščena je vzdrževalna različica s spremembami:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 #, fuzzy #| msgid "First release for GNOME 3.38. Changes:" msgid "First release for GNOME 41. Changes:" msgstr "Prva objava za GNOME 3.38. Spremembe:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 #, fuzzy #| msgid "First release for GNOME 3.38. Changes:" msgid "First release for GNOME 40. Changes:" msgstr "Prva objava za GNOME 3.38. Spremembe:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" "boljše upravljanje in poročanje o neveljavnih določilih UUID, poslanih na " "program gpaste-client" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "Prva objava za GNOME 3.38. Spremembe:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "Uporaba:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 #, fuzzy #| msgid "print the history with uuids" msgid "print the history with UUIDs" msgstr "izpiši zgodovino z določili UUID" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "izpiši velikost zgodovine" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "pridobi ime trenutne zgodovine" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "ime" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "ustvari kopijo trenutne zgodovine" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "preklopi na drugo zgodovino" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "izbriši zgodovino" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "izpiši razpoložljive zgodovine" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "besedilo" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "nastavi besedilo v odložišče" #: src/client/gpaste-client.c:173 msgid "password" msgstr "geslo" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "dodaj par ime/geslo v odložišče" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "staro ime" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "novo ime" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "preimenuj geslo" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr "" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr "" #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr "" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr "" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "" #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "" #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "Geslo" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[Datoteke] " #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "" gpaste-3.42.6/po/sv.po000066400000000000000000001105121421222064600144760ustar00rootroot00000000000000# Swedish translations for GPaste package. # Copyright (C) 2013-2015 Listed translators # This file is distributed under the same license as the GPaste package. # Åke Engelbrektson , 2017 # msgid "" msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2021-08-17 10:34+0000\n" "Last-Translator: Luna Jernberg \n" "Language-Team: Swedish \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-Generator: Weblate 4.8-dev\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "Hantera din urklippshistorik" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" "GPaste är ett system för urklippshantering, som låter dig övervaka och " "hantera din urklippshistorik på ett mycket anpassningsbart sätt." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" "GPaste är ett grafiskt verktyg som låter dig hantera allt på ett enkelt sätt." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "Primärt UI" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "Inställnings-UI" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 #, fuzzy #| msgid "updated translations" msgid "translations update" msgstr "uppdaterade översättningar" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 #, fuzzy #| msgid "Enable the gnome-shell extension" msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "Aktivera gnome-skaltillägget" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 #, fuzzy #| msgid "port to gnome-shell 40" msgid "port to gnome-shell 41" msgstr "port till gnome-shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "port till gnome-shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "uppdaterade översättningar" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 #, fuzzy #| msgid "Enable the gnome-shell extension" msgid "gnome-shell extension warning fixes" msgstr "Aktivera gnome-skaltillägget" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 #, fuzzy #| msgid "Enable the gnome-shell extension" msgid "gnome-shell extension cosmetic updates" msgstr "Aktivera gnome-skaltillägget" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "@GETTEXT_PACKAGE@" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "Starta det grafiska verktyget" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "Märk den aktiva posten som varande lösenord" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "Ta bort aktiv post från historiken" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "Visa historiken" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "Synkronisera urklipp med primär markering" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "Synkronisera primär markering med urklipp" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "Ladda upp aktiv post till en pastebin-tjänst" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "Urklipp;Hanterare;Inställningar;Inställningar;Konfiguration;" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "Maxstorlek för ett objekt vid visning" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" "Överskjutande innehåll från objektet kommer att ersättas av \"…\" och nya " "rader av \" \", vid visning i panelprogrammet. 0 för att inaktivera." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "Skall vi identifiera och ersätta växande rader i historiken?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" "Som standard skapas två poster i historiken vid markering av först \"Här är" "\" och sedan \"Här är ett exempel\". Med denna funktion aktiverad, kommer " "den första posten att ersättas av den andra." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "Namnet på aktuell historik" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "Standardnamnet är \"historik\"" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "Skall vi spara bilder kopierade till historiken, eller bara text?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 #, fuzzy #| msgid "By default, we're saving both" msgid "By default, we're saving only text" msgstr "Som standard sparar vi bägge" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "Skall vi stänga UI efter att en post valts?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "Som standard stänger vi den" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "Tangentbordsgenväg för att starta det grafiska gränssnittet" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" "Som standard görs detta med Ctrl+Alt+G (\"G\"). En tom sträng " "här, inaktiverar denna funktion." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "" "Tangentbordsgenväg för att markera aktivt objekt som varande ett lösenord" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" "Som standard markeras den aktiva posten som varande ett lösenord, med Ctrl" "+Alt+S (\"S\"). En tom sträng här, inaktiverar denna funktion." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "Max visad historikstorlek" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "Max antal poster som visas i historiken" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "Max historikstorlek" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "Max antal poster i historiken" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "Max minnesanvändning (MB)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "Max minnesmängd som kan användas för att lagra innehåll" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "Max textobjektstorlek" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" "Maxstorlek för ett textobjekt. Allt som överskrider denna gräns undantas." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "Minsta textobjektstorlek" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "Minsta storlek för en textpost. Allt under denna gräns undantas." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "Tangentbordsgenväg för att ta bort första posten från historiken" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" "Som standard görs detta med Ctrl+Alt+V (\"V\"). En tom sträng " "här, inaktiverar denna funktion." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "Skall primär markering påverka historiken?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "Som standard påverkas historiken endast av urklipp (Ctrl+C)." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 #, fuzzy msgid "By default, we're saving all" msgstr "Som standard sparar vi den" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "Skall vi spara historiken från en session till en annan?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "Som standard sparar vi den" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "Tangentbordsgenväg för att visa menyn" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" "Som standard visas menyn med Ctrl+Alt+H (\"H\"). En tom sträng " "här, inaktiverar denna funktion." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "Tangentbordsgenväg för att synkronisera urklipp med primär markering" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Som standard synkroniseras de med Ctrl+Alt+O (\"O\"). En tom " "sträng här, inaktiverar denna funktion." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "Tangentbordsgenväg för att synkronisera primär markering med urklipp" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Som standard synkroniseras de med Ctrl+Alt+P (\"P\"). En tom " "sträng här, inaktiverar denna funktion." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "Är primär markering och urklipp synkroniserade?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "Som standard är primär markering och urklipp oberoende av varandra." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "Skall vi övervaka urklippsändringar?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "Som standard övervakar vi dessa ändringar." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" "Skall vi synkronisera tjänststatus med status för gnome-skaltillägget " "(inaktivera tjänsten när tillägget inaktiveras)?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "Som standard ändras inte tjänstens status" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "Skall vi trimma textposter innan de läggs till i historiken?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" "Trimning innebär att alla efterföljande och avslutande blanksteg tas bort. " "Som standard lämnas de kvar." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" "Tangentbordsgenväg för att ladda upp historikens första post, till en " "pastebin-tjänst." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" "Som standard görs detta med Ctrl+Alt+U (\"U\"). En tom sträng " "här, inaktiverar denna funktion." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 #, fuzzy msgid "By default, we do as it's a destructive action" msgstr "Som standard ändras inte tjänstens status" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "Kunde inte starta" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "Användning:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 #, fuzzy #| msgid "print the history with indexes" msgid "print the history with UUIDs" msgstr "Skriv ut historiken med index" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "Skriv ut historikstorleken" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "Hämta namnet på aktuell historik" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "Namn" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "Säkerhetskopiera aktuell historik" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "Växla till en annan historik" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "Ta bort en historik" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "Lista tillgängliga historiker" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "Text" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "Ange text till urklipp" #: src/client/gpaste-client.c:173 msgid "password" msgstr "Lösenord" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "Lägg till namn och lösenordspar till urklipp" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "Gammalt namn" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "Nytt namn" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "Byt namn på lösenordet" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 #, fuzzy #| msgid "get the th item from the history" msgid "get the item from the history" msgstr "Hämta den :e posten från historiken" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 #, fuzzy #| msgid "set the th item from the history to the clipboard" msgid "set the item from the history to the clipboard" msgstr "Skicka den :e historikposten till urklipp" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "Innehåll" #: src/client/gpaste-client.c:181 #, fuzzy #| msgid "" #| "replace the contents of the th item from the history with the " #| "provided one" msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "" "Ersätt innehållet i :e historikposten med nytt angivet innehåll" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 #, fuzzy #| msgid "" #| "merge the th items from the history and add put the result in the " #| "clipboard" msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" "Sammanfoga de :e posterna från historiken och skicka resultatet till " "urklipp" #: src/client/gpaste-client.c:185 #, fuzzy #| msgid "set the th item from the history as a password named " msgid "set the item from the history as a password named " msgstr "" "Märk den :e historikposten som varande lösenord med namnet " #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 #, fuzzy #| msgid "delete the password from the history" msgid "delete item from the history" msgstr "Ta bort lösenordet från historiken" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "Ta bort lösenordet från historiken" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "Sökväg" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "Skicka innehållet i filen , till urklipp" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "Vad som helst" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "Skicka utdata från vad som helst till urklipp" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "Töm historiken" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "Börja övervaka urklippsändringar" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "Sluta övervaka urklippsändringar" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "alias för stopp" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "Starta om tjänsten (efter uppgradering...)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "Starta inställningsverktyget" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "Starta det grafiska verktyget" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "Låt panelprogrammet eller tillägget visa historiken" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 #, fuzzy #| msgid "Upload the active item to a pastebin service" msgid "upload the item to a pastebin service" msgstr "Ladda upp aktiv post till en pastebin-tjänst" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "Visa version" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "Visa tjänstversion" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "Visa denna hjälp" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "Visa \"Om\"" #: src/client/gpaste-client.c:222 #, fuzzy, c-format #| msgid "Merge options:" msgid "Convenience options:" msgstr "Sammanfogningsalternativ:" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "Visningsalternativ:" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "Visa varje post på endast en rad" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "Visa varje post rent (utan radnummer)" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 #, fuzzy msgid "display the items in reverse order" msgstr "Visa tjänstversion" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "Använd NULL-tecken istället för ny rad mellan varje post" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "Sammanfogningsalternativ:" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "Sträng" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" "Lägg till angiven dekoration i början och slutet på varje post, före " "sammanfogning" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "Lägg till angiven separator mellan varje post vid sammanfogning" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "Tjänsten startades om korrekt\n" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "Kan inte lägga till icke UTF8-data som text." #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "Kunde inte ansluta till GPaste-tjänsten" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "Stoppsignal mottagen, avslutar" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "Kunde inte hämta DBus-namn." #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "%y-%m-%d %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[Bild, %d x %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "Lösenord" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[Filer] " #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "Kunde inte registrera gtk-applikationen" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "körs redan." #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "Övervaka urklippsändringar" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "Stäng UI vid markering" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "Aktivera gnome-skaltillägget" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "Synkronisera tjänstens status med tilläggets" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "Primär markering påverkar historiken" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "Synkronisera urklipp med primär markering" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "Bildstöd" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "Trimma poster" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "Identifiera växande rader" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "Spara historik" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "Max objektstorlek vid visning" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "Maxlängd för textposter" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "Minimumlängd för textposter" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "Allmänt beteende" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "Historikinställningar" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "Tangentbordsgenvägar" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "Växla till" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "Ta bort" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "Avbryt" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "Töm" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "Vill du verkligen tömma historiken?" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "Kunde inte skapa historikmapp" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "GPaste Inställningar" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "Tangentbordsgenvägar" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "Om GPaste" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "Avsluta" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "Om" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "Säkerhetskopiera" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "Under vilket namn vill du säkerhetskopiera historiken?" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "Vill du verkligen ta bort denna historik?" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "Redigera" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "(Inget resultat)" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(Tom)" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "(Kunde inte ansluta till GPaste-tjänsten)" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "Nytt" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "Starta om" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "Vill du verkligen starta om tjänsten?" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "Starta om tjänsten" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "Sök" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "Allmänt" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "Stopp" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "Vill du verkligen sluta övervaka urklippsändringar?" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "Ladda upp" #~ msgid "number" #~ msgstr "Nummer" #~ msgid "delete th item of the history" #~ msgstr "Ta bort den :e posten i historiken" #~ msgid "upload the th item to a pastebin service" #~ msgstr "Ladda upp den :e posten till en pastebin-tjänst" #~ msgid "edit-paste" #~ msgstr "Redigera-Klistra in" gpaste-3.42.6/po/tr.po000066400000000000000000001125221421222064600144760ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Marc-Antoine Perennou # This file is distributed under the same license as the gpaste package. # Serkan ÖNDER , 2021. # msgid "" msgstr "" "Project-Id-Version: gpaste 3.40.2\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2022-01-05 17:54+0000\n" "Last-Translator: Serkan ÖNDER \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-Generator: Weblate 4.10.1\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "Pano geçmişinizi yönetin" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" "GPaste, pano geçmişinizi son derece özelleştirilebilir bir şekilde " "izlemenize ve yönetmenize olanak tanıyan bir pano yönetim sistemidir." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "" "GPaste size her şeyi kolayca yönetmenizi sağlayan bir grafik araç sağlar." #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "Ana kullanıcı arayüzü" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "Ayarlar kullanıcı arayüzü" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "Bu bir bakım sürümüdür. Değişiklikler:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 msgid "translations update" msgstr "çeviri güncellemesi" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "" "arka plan programı yeniden başladığında gnome-shell uzantısını düzeltin" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "Wayland için tuş atamalarını düzelt" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "GNOME 41 için ilk sürüm. Değişiklikler:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "gnome-shell 41 sürümüne uyarla" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "bellek kullanımı denetiminde bir çökmeyi düzelt" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "GNOME 40 için ilk sürüm. Değişiklikler:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "gnome kabuğuna bağlantı noktası 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "gnome-shell tercihleri için yer tutucu" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "GNOME dışında X11 tuş atayıcısını düzelt" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" "gpaste istemcisine iletilen geçersiz kullanıcı kimliklerinin daha iyi " "işlenmesi ve raporlanması" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" "gpaste istemcisinin artık birkaç alt komutun uuid yerine dizin kullanması " "için bir --kullanım dizini argümanı var" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "Parola yap tuş atamasını düzelt" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "güncellenmiş çeviriler" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "gnome kabuk uzantısı uyarı düzeltmeleri" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "gnome kabuk uzantısı kozmetik güncellemeleri" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "" "Görüntü desteğini varsayılan olarak devre dışı bırakın (tercihlerde yeniden " "etkinleştirilebilir)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "Arama artık şifreleri içeriyor (adlarını kullanarak)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "systemd entegrasyon geliştirmeleri" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "GNOME 3.38 için ilk sürüm. Değişiklikler:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "İzleme DBus sinyalini bırakın" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "Öğeleri tanımlamak için kullanıcı kimliklerine geçin" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "DBus arabirimini org.gnome.GPaste2'ye aktarın" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "Gnome-shell 3.38.0 güncellemesi" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "" "Gnome kabuğunda Ctrl-Number kullanarak etkinleştirilen öğeleri düzeltin" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "Gnome kabuğu ile tuş atama yeniden düzenlemesini düzelt" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "Gnome kabuğu ile tuş atama tutuşunu düzelt" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "GNOME 3.36 için ilk sürüm. Değişiklikler:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "Gnome kabuğu 3.36.0'a güncelleme" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "En son uygulama akışı-glib ile uyumluluk" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "GNOME 3.34 için ilk sürüm. Değişiklikler:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "Gnome kabuğu 3.34.0 güncellemesi" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "@GETTEXT_PACKAGE@" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "Grafik aracını başlatın" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "Etkin öğeyi parola olarak işaretleyin" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "Etkin öğeyi geçmişten sil" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "Geçmişi göster" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "Panoyu birincil seçimle senkronize edin" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "Birincil seçimi panoya senkronize et" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "Etkin öğeyi bir pastebin hizmetine yükleyin" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "Pano;Yönetici;Ayarlar;Tercihler;Yapılandırma;" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "Bir öğenin maksimum boyutu, onu görüntülerken" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" "Bu öğenin fazladan öğeleri \"…\" ile değiştirilir ve uygulamadan " "görüntülenirken yeni satırlar \" \" ile değiştirilir, devre dışı bırakmak " "için 0." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "Tarihte büyüyen çizgileri tespit edip değiştiriyor muyuz?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" "Varsayılan olarak, \"İşte\", ardından \"İşte bir örnek\" seçildiğinde, " "geçmişte iki giriş oluşturulur. Bu özellik etkinleştirildiğinde, birincisi " "ikincisi ile değiştirilecektir." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "Şimdiki tarihin adı" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "Varsayılan ad \"geçmiş\"" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "Kopyalanan görüntüleri tarihe mi kaydediyoruz yoksa sadece metin mi?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "Varsayılan olarak, yalnızca metni kaydediyoruz" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "Bir öğe seçtikten sonra kullanıcı arayüzünü kapatıyor muyuz?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "Varsayılan olarak kapatıyoruz" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "Grafik arayüzü başlatmak için klavye kısayolu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" "Varsayılan olarak, ctrl + alt + g tuşlarına basmak bunu yapar (\"G" "\"). Burada boş bir dize bu işlevi devre dışı bırakır." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "Etkin öğeyi parola olarak işaretlemek için klavye kısayolu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" "Varsayılan olarak, ctrl + alt + s tuşlarına basmak, etkin öğeyi parola " "(\"S\") olarak işaretler. Burada boş bir dize bu işlevi devre " "dışı bırakır." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "Maksimum görüntülenen geçmiş boyutu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "Geçmişte görüntülenen maksimum öğe sayısı" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "Maksimum geçmiş boyutu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "Geçmişteki maksimum öğe sayısı" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "Maksimum bellek kullanımı (MB)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "İçeriği depolamak için kullanılan maksimum bellek miktarı" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "Maksimum metin öğesi boyutu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" "Bir metin öğesinin maksimum boyutu. Bu sınırın dışındaki herhangi bir şey " "göz ardı edilir." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "Minimum metin öğesi boyutu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" "Bir metin öğesinin minimum boyutu. Bu sınırın dışındaki herhangi bir şey göz " "ardı edilir." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "Tarihteki ilk öğeyi silmek için klavye kısayolu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" "Varsayılan olarak, ctrl + alt + v tuşlarına basmak bunu yapar (\"V" "\"). Burada boş bir dize bu işlevi devre dışı bırakır." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "Birincil seçim tarihi etkiler mi?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "Varsayılan olarak, yalnızca pano (ctrl+c) geçmişi etkiler." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" "Seçilen zengin metnin (ör. html) tüm sürümlerini mi yoksa yalnızca düz metin " "sürümünü mi kaydediyoruz?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "Varsayılan olarak, hepsini kaydediyoruz" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "Bir oturumdan diğerine geçmişi kaydediyor muyuz?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "Varsayılan olarak, kaydediyoruz" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "Menüyü görüntülemek için klavye kısayolu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" "Varsayılan olarak, ctrl + alt + h tuşlarına basıldığında menü görüntülenir " "(\"H\"). Burada boş bir dize bu işlevi devre dışı bırakır." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "Panoyu birincil seçimle senkronize etmek için klavye kısayolu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Varsayılan olarak, ctrl + alt + o tuşlarına basmak onları senkronize eder " "(\"P\"). Burada boş bir dize bu işlevi devre dışı bırakır." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "Birincil seçimi panoya senkronize etmek için klavye kısayolu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "Varsayılan olarak, ctrl + alt + p tuşlarına basmak onları senkronize eder " "(\"P\"). Burada boş bir dize bu işlevi devre dışı bırakır." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "Birincil seçim ve pano senkronize mi?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "Varsayılan olarak, birincil seçim ve pano bağımsızdır." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "Pano değişikliklerini izliyor muyuz?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "Varsayılan olarak, bu değişiklikleri izliyoruz." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" "Daemon durumunu gnome-shell uzantısınınkiyle senkronize ediyor muyuz? " "(uzantıyı devre dışı bırakırken arka plan programını devre dışı bırakın)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "Varsayılan olarak, arka plan programı durumu değişmeden kalır" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "Metin öğelerini tarihe eklemeden önce kırpıyor muyuz?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" "Kırpma, tüm sondaki ve bitiş boşluklarının kaldırılması anlamına gelir. " "Varsayılan olarak, onları olduğu gibi bırakıyoruz." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" "Geçmişteki ilk öğeyi bir pastebin hizmetine yüklemek için klavye kısayolu" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" "Varsayılan olarak, ctrl + alt + u tuşlarına basmak bunu yapar (\"U" "\"). Burada boş bir dize bu işlevi devre dışı bırakır." #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "Bir geçmişi boşaltırken onay istiyor muyuz?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "Varsayılan olarak, yıkıcı bir eylem olduğu için yaparız" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "Çoğaltılamadı" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "Kullanım:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 msgid "print the history with UUIDs" msgstr "UUID'lerle geçmişi yazdır" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "tarihin boyutunu yazdır" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "şimdiki tarihin adını al" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "ad" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "geçerli geçmişi yedekle" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "başka bir geçmişe geç" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "geçmişi sil" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "kullanılabilir geçmişleri listele" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "metin" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "metni panoya ayarla" #: src/client/gpaste-client.c:173 msgid "password" msgstr "parola" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "panoya adı - şifre çiftini ekleyin" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "eski ad" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "yeni ad" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "parolayı yeniden adlandır" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr " öğesini geçmişten al" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr " öğesini geçmişten panoya ayarla" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "içindekiler" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr " öğesinin içeriğini geçmişten sağlananla değiştirin" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "UUID'lerle eşleşen öğeleri geçmişten birleştir ve sonucu panoya koy" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr " öğesini geçmişten adlı bir parola olarak ayarlayın" #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr " öğesini geçmişten sil" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr " parolasını geçmişten sil" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "yol" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr " konumundaki dosyanın içeriğini panoya yerleştirin" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "her neyse" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "panoya ne olursa olsun çıktısını ayarla" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "geçmişi boşalt" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "pano değişikliklerini izlemeye başla" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "pano değişikliklerini izlemeyi durdur" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "durdurmak için takma ad" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "arka plan programını yeniden yürütün (yükseltmeden sonra...)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "yapılandırma aracını başlat" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "grafik aracını başlat" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "uygulama veya uzantının geçmişi görüntülemesini sağlayın" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr " öğesini bir pastebin hizmetine yükleyin" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "sürümü göster" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "daemon sürümünü göster" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "bu yardımı göster" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "hakkında iletişim kutusunu göster" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "Kolaylık seçenekleri:" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "UUID'si yerine öğenin dizinini kullanın" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "Görüntüleme seçenekleri:" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "her öğeyi yalnızca bir satırda göster" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "her öğeyi ham olarak göster (satır numaraları olmadan)" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "öğeleri ters sırada göster" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "her öğe arasında yeni bir satır yerine BOŞ karakter kullanın" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "Birleştirme seçenekleri:" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "dizi" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" "birleştirmeden önce verilen dekorasyonu her öğenin başına ve sonuna ekleyin" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "birleştirme sırasında her öğe arasına verilen ayırıcıyı ekleyin" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "Daemon başarıyla yeniden çalıştırıldı\n" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "Utf8 olmayan veriler metin olarak eklenemez." #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "GPaste arka plan programına bağlanılamadı" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "Dur sinyali alındı, çıkılıyor" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "DBus adı alınamadı." #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "%d/%m/%y %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[Görüntü, %d x %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "Parola" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[Dosyalar] " #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "GTK uygulaması kaydedilemedi" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "zaten çalışıyor." #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "Pano değişikliklerini izle" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "Seçimde kullanıcı arayüzünü kapat" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "Gnome kabuk uzantısını etkinleştirin" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "Daemon durumunu uzantınınkiyle senkronize edin" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "Birincil seçim geçmişi etkiler" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "Panoyu birincil seçimle senkronize et" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "Görüntü desteği" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "Öğeleri kırp" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "Büyüyen çizgileri algıla" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "Geçmişi kaydet" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "Görüntülerken maksimum eleman boyutu" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "Maksimum metin öğesi uzunluğu" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "Minimum metin öğesi uzunluğu" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "Genel davranış" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "Geçmiş ayarları" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "Klavye Kısayolları" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "Değiştir" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "Sil" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "İptal Et" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "Temizle" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "Gerçekten geçmişi temizlemek istiyor musunuz?" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "Geçmiş dizini oluşturulamadı" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "GPaste Ayarları" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "Klavye Kısayolları" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "GPaste Hakkında" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "Çık" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "Hakkında" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "Yedek" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "Bu geçmişi hangi ad altında yedeklemek istiyorsunuz?" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "Bu geçmişi silmek istediğinizden emin misiniz?" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "Düzenle" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "(Sonuç yok)" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(Boş)" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "(GPaste arka plan programına bağlanılamadı)" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "Yeni" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "Yeniden Başlat" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "Daemon'u gerçekten yeniden başlatmak istiyor musunuz?" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "Daemon'u yeniden başlatın" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "Ara" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "Genel" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "Durdur" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "Pano değişikliklerini izlemeyi gerçekten durdurmak istiyor musunuz?" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "Yükle" gpaste-3.42.6/po/zh_CN.po000066400000000000000000001064221421222064600150540ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Marc-Antoine Perennou # This file is distributed under the same license as the gpaste package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: gpaste 3.38.5\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2022-02-02 02:56+0000\n" "Last-Translator: Eric \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-Generator: Weblate 4.11-dev\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "管理你的剪切板记录" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "Marc-Antoine Perennou" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "GPaste是一个可以让你高度定制的剪切板记录管理系统。" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "GPaste可以让你通过界面轻而易举地管理所有剪切板记录。" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "主界面" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "设置界面" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "这是一个维护版本。更改如下:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 #, fuzzy #| msgid "updated translations" msgid "translations update" msgstr "更新翻译" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 #, fuzzy #| msgid "gnome-shell extension cosmetic updates" msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "gnome-shell扩展cosmetic更新" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "修复 Wayland 模式下的键绑定" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 msgid "First release for GNOME 41. Changes:" msgstr "GNOME 41 下发行的首个版本。更改如下:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 msgid "port to gnome-shell 41" msgstr "移植到 gnome-shell 41" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "修复内存使用检查的一处崩溃" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "GNOME 40 下发行的首个版本。更改如下:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "移植到 gnome-shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "无效的uuid被传递到gpaste-client时最佳的处理和反馈" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" "当前gpaste-client拥有一个子命令的--use-index参数以方便使用索引来代替uuid" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "修复make-password快捷键" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "更新翻译" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "gnome-shell扩展的warning被修复" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "gnome-shell扩展cosmetic更新" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "默认禁用图片(可以在首选项中重新启用)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "搜索现在包括了密码(使用密码名)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "systemd集成增强功能" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "首次发行GNOME 3.38的更改如下:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "去除跟踪DBus的信号" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "将标识符项切换到uuid" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "将DBus接口连接到org.gnome.GPaste2" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "更新到gnome-shell 3.38.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "使用 Ctrl-数字 来修复gnome-shell的激活项" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "重新修复gnome-shell的快捷键" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "重新修复gnome-shell的快捷键" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "首次发行GNOME 3.36。更改如下:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "更新到gnome-shell 3.36.0" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "兼容最近的appstream-glib" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "首次发行GNOME 3.34。更改如下:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "更新到gnome-shell 3.34.0" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "@GETTEXT_PACKAGE@" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "启动界面" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "标记激活项为密码" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "删除激活项" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "禁用记录" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "同步剪切板到主选择项" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "同步主选择项到剪切板" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "将活动项上传到pastebin服务" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "剪切板;管理;设置;首选项;配置;" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "显示项的最大尺寸" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" "当在applet显示时,项的额外内容会被 \"…\" 替换, 新行会被空格替换,值为0则禁" "用。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "如果新项是在前一项的基础上增加,那要以新换旧吗?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" "默认时,选择“Here is”和“Here is an example”会在记录里面显示两个项,当这个功能" "被启用,第一个会被第二个替换。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "最经记录名" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "默认名为history" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "你要保存被剪切板的图片到记录里还是只需要保存文本就行?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "默认时,GPaste只会保存文本到记录里" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "选择一项后要关闭GPaste界面吗?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "默认时,我们会关闭界面" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "启动界面的快捷键" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" "默认时,Ctrl+Alt+g快捷键(即G)会启动GPaste界面,如果这里的值为空," "这个功能就被禁用。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "让激活项变为密码的快捷键" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" "默认时,Ctrl+Alt+S快捷键(即S)会把当前的激活项变为密码。如果这里" "的值为空,这个功能就被禁用。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "显示记录数" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "最多显示几条记录" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "最大的记录数" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "最多记录多少项" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "GPaste 最多能够使用的内存大小(MB)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "GPaste存储记录所能使用的内存大小" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "每项文本的最大长度" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "文本项的最大长度,文本内容超过会不被记录。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "每项文本的最小长度" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "文本项的最小长度,文本内容太少会不被记录。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "“删除第一项”的快捷键" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" "默认时Ctrl+Alt+v快捷键(即V)会删除第一项,此处内容为空则该功能被" "禁用。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "将选择的内容添加到记录?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "默认时,你按下Ctrl+C,GPaste才会把选择的内容添加到记录。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "获取富文本格式(例如html)还是只获取富文本的内容?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "默认时,获取富文本" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "同步session的记录吗?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "默认时,会同步" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "显示记录的快捷键" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "默认时,Ctrl+Alt+h快捷键(即H)显示记录,此处为空则禁用。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "将选中内容替换为剪切板内容的快捷键" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "默认时,Ctrl+Alt+o快捷键(即P)会将选中内容替换为剪切板内容此处为" "空则禁用。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "将选中内容放置到剪切板记录的快捷键" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" "默认时,Ctrl+Alt+p快捷键(即P)会将选中内容放置到剪切板记录此处为" "空则禁用。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "将选中内容放置到剪切板记录?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "默认时,选中内容不会被放置到记录里。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "跟踪剪切板变化?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "默认时,剪切板的内容都会被放置到记录里。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" "与gnome-shell的守护进程状态同步?(gnome-shell扩展被禁用时守护进程也会被停" "止)" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "默认时,不与gnome-shell扩展的守护进程状态同步" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "文本被添加到记录前,要将它的两边空白去除吗?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "默认时,添加到记录前会去除首尾空白。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "“上传第一项到pastebin服务”的快捷键" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" "默认时,Ctrl+Alt+u快捷键(即U)会上传第一项到pastebin服务,此处为" "空则禁用。" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 #, fuzzy #| msgid "Do we prompt for confirmation when emptying an history?" msgid "Do we prompt for confirmation when emptying a history?" msgstr "当清空记录时,要弹出提示吗?" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "默认时,做出提示以防止你不小心清空记录" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "无法自动进行" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "使用:\n" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 #, fuzzy #| msgid "print the history with uuids" msgid "print the history with UUIDs" msgstr "输出记录内容(带有uuid)" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "输出记录的大小" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "获取当前记录名" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "名称(名)" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "备份当前记录" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "切换到另一个记录" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "删除记录" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "列出可用记录" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "文本" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "保存文本到剪切板" #: src/client/gpaste-client.c:173 msgid "password" msgstr "密码" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "添加“名称 - 密码”到剪切板" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "旧名称" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "新名称" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "更改密码名称" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "通过uuid从记录获取项" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr "通过uuid将项从记录放置到剪切板" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "内容" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "通过uuid和内容替换记录中的项" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 #, fuzzy #| msgid "" #| "merge the items matching the uuids from the history and put the result in " #| "the clipboard" msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "通过多个uuid来合并记录里的多个项,并将合并后的结果放置到剪切板" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr "通过uuid来设置记录中的密码名称" #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr "通过uuid删除记录中的项" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "删除记录中的密码名称" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "路径" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "将路径的文件内容放置到剪切板" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "whatever" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "将任何输出内容都放置到剪切板" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "清空记录" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "开始跟踪剪切板变化" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "结束跟踪剪切板变化" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "“结束”的别称" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "重启守护进程(更新之后. . .)" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "启动配置工具" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "启动界面" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "让applet或扩展显示历史" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr "上传项到pastebin服务" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "显示版本" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "显示守护进程版本" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "显示“帮助”" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "显示“关于”" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "快捷选项:" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 #, fuzzy #| msgid "use the index of the item instead of its uuid" msgid "use the index of the item instead of its UUID" msgstr "在项中使用索引代替uuid" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "显示选项:" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "每项只显示一行" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "显示每项的原内容(无行号)" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "反序显示" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "每项都使用NUL代替换行" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "合并选项:" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "字符串" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "添加既定内容到每个将合并项" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "添加既定分割符到每个将合并项" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "重启守护进程成功\n" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "无法添加非utf8内容。" #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "无法连接GPaste守护进程" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "收到退出信号,退出中" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "无法获取DBus名。" #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "%m/%d/%y %T" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "[Image, %d x %d (%s)]" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "密码" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "[Files] " #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "注册gtk应用失败" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "准备运行。" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "跟踪剪切板变化" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "选择后关闭界面" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "启用gnome-shell扩展" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "与gnome-shell扩展的守护进程状态同步" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "将选择的内容放置到记录" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "将选择的内容放置到剪切板" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "支持图片记录" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "去除首尾空白" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "检测“在上一个项上添加”的新项" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "保存记录" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "最多显示项数" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "文本最长长度(过长不记录)" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "文本最短长度(过短不记录)" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "常用" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "记录设置" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "快捷键" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "切换到" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "删除" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "取消" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "清空" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "清空记录?" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "无法新建记录目录" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "GPaste设置" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "快捷键" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "关于GPaste" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "退出" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "关于" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "备份" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "要保存哪一个记录?" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "删除记录?" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "编辑" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "(无内容)" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "(空)" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "(无法连接GPaste守护进程)" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "新建" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "重启" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "重启守护进程?" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "重启守护进程" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "搜索" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "常用" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "停止" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "跟踪剪切板?" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "上传" gpaste-3.42.6/po/zh_Hant.po000066400000000000000000000723041421222064600154470ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Marc-Antoine Perennou # This file is distributed under the same license as the gpaste package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: gpaste 3.40.2\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" "POT-Creation-Date: 2022-02-24 18:01+0100\n" "PO-Revision-Date: 2021-06-09 10:33+0000\n" "Last-Translator: Yiu Man Ho \n" "Language-Team: Chinese (Traditional) \n" "Language: zh_Hant\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-Generator: Weblate 4.7-dev\n" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:5 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:4 msgid "GPaste" msgstr "GPaste" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:6 #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:5 msgid "Manage your clipboard history" msgstr "管理您的剪貼簿歷史" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:7 msgid "Marc-Antoine Perennou" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:13 msgid "" "GPaste is a clipboard managing system allowing you to track and manage your " "clipboard history in a highly customizable way." msgstr "" "GPaste 是一個允許您以一個高度可自定的方法追蹤和管理您的剪貼簿歷史的剪貼簿管理" "系統。" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:16 msgid "" "GPaste provides you with a graphical tool allowing you to manage everything " "easily." msgstr "GPaste 提供一個簡單易用的界面來讓您容易的管理。" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:23 msgid "The main UI" msgstr "主界面" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:27 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:31 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:35 msgid "The settings UI" msgstr "設定界面" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:48 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:56 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:64 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:72 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:81 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:90 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:108 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:116 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:134 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:142 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:151 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:160 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:169 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:177 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:198 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:206 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:214 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:222 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:230 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:246 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:254 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:262 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:270 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:286 msgid "This is a maintenance release. Changes:" msgstr "這是一個維護更新。更新內容:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:50 msgid "fix the storage path for meson builds" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:58 msgid "fix some race conditions in history handling" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:66 msgid "better fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:74 msgid "fix crash when there is no history yet" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:75 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:84 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:93 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:102 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:110 #, fuzzy #| msgid "updated translations" msgid "translations update" msgstr "更新翻譯" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:83 #, fuzzy #| msgid "gnome-shell extension warning fixes" msgid "fix gnome-shell exntesion when the daemon restarts" msgstr "GNOME Shell 插件警告修復" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:92 msgid "Fix keybindings for wayland" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:99 #, fuzzy #| msgid "First release for GNOME 40. Changes:" msgid "First release for GNOME 41. Changes:" msgstr "第一個適用於 GNOME 40 的版本。更新內容:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:101 #, fuzzy #| msgid "port to gnome-shell 40" msgid "port to gnome-shell 41" msgstr "讓其可用於 GNOME Shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:118 msgid "fix a crash in memory usage checking" msgstr "修復在檢查記憶體使用量時的崩潰" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:125 msgid "First release for GNOME 40. Changes:" msgstr "第一個適用於 GNOME 40 的版本。更新內容:" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:127 msgid "port to gnome-shell 40" msgstr "讓其可用於 GNOME Shell 40" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:128 msgid "placeholder for gnome-shell prefs" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:136 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:200 msgid "fix X11 keybinder outside of GNOME" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:144 msgid "better handling and reporting of invalid uuids passed to gpaste-client" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:145 msgid "" "gpaste-client now has a --use-index argument for several subcommands to use " "index instead of uuid" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:153 msgid "fix the make-password keybinding" msgstr "修復「建立密碼」快捷鍵" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:154 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:163 msgid "updated translations" msgstr "更新翻譯" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:162 msgid "gnome-shell extension warning fixes" msgstr "GNOME Shell 插件警告修復" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:171 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:208 msgid "gnome-shell extension cosmetic updates" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:179 msgid "Disable images support by default (can be reenabled in preferences)" msgstr "預設禁用圖像歷史(可在偏好設定裏重啓)" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:180 msgid "Search now includes passwords (using their names)" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:181 msgid "systemd integration enhancements" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:187 msgid "First release for GNOME 3.38. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:189 msgid "Drop the Tracking DBus signal" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:190 msgid "Switch to uuids to identify items" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:191 msgid "Bump DBus interface to org.gnome.GPaste2" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:192 msgid "Update to gnome-shell 3.38.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:216 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:248 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:290 msgid "Fix activating items using Ctrl-Number in gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:224 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:256 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:289 msgid "Fix keybinding regrab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:232 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:264 msgid "Fix keybinding grab with gnome-shell" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:238 msgid "First release for GNOME 3.36. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:240 msgid "Update to gnome-shell 3.36.0" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:272 #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:288 msgid "Compatibility with recent appstream-glib" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:278 msgid "First release for GNOME 3.34. Changes:" msgstr "" #: data/appstream/org.gnome.GPaste.Ui.appdata.xml.in:280 msgid "Update to gnome-shell 3.34.0" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:2 msgid "@GETTEXT_PACKAGE@" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:3 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:269 #: src/ui/gpaste-ui-shortcuts-window.c:73 msgid "Launch the graphical tool" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:4 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:276 #: src/ui/gpaste-ui-shortcuts-window.c:74 msgid "Mark the active item as being a password" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:5 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:262 #: src/ui/gpaste-ui-shortcuts-window.c:72 msgid "Delete the active item from history" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:6 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:283 #: src/ui/gpaste-ui-shortcuts-window.c:75 msgid "Display the history" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:7 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:290 #: src/ui/gpaste-ui-shortcuts-window.c:76 msgid "Sync the clipboard to the primary selection" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:8 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:297 #: src/ui/gpaste-ui-shortcuts-window.c:77 msgid "Sync the primary selection to the clipboard" msgstr "" #: data/control-center/42-gpaste.control-center.xml.in:9 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:304 #: src/ui/gpaste-ui-shortcuts-window.c:78 msgid "Upload the active item to a pastebin service" msgstr "" #: data/desktop/org.gnome.GPaste.Ui.desktop.in.in:6 msgid "Clipboard;Manager;Settings;Preferences;Configuration;" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:7 msgid "Max size of an element when displaying it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:8 msgid "" "The extra stuff of that element will be replaced by \"…\", and newlines by " "\" \" when displaying from the applet, 0 to disable." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:15 msgid "Do we detect and replace growing lines in history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:16 msgid "" "By default, selecting \"Here is\", then \"Here is an example\" will create " "two entries in the history. With this feature enabled, the first one will be " "replaced by the second one." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:24 msgid "The name of the current history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:25 msgid "The default name is \"history\"" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:32 msgid "Do we save the images copied to history, or only text?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:33 msgid "By default, we're saving only text" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:40 msgid "Do we close the UI after selecting an item?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:41 msgid "By default, we close it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:48 msgid "The keyboard shortcut to launch the graphical interface" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:49 msgid "" "By default, hitting ctrl + alt + g does that (\"G\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:57 msgid "The keyboard shortcut to mark the active item as being a password" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:58 msgid "" "By default, hitting ctrl + alt + s will mark the active item as being a " "password (\"S\"). An empty string here disables this " "functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:67 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:208 msgid "Max displayed history size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:68 msgid "Maximum number of items displayed in the history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:76 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:215 msgid "Max history size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:77 msgid "Maximum number of items in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:85 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:222 msgid "Max memory usage (MB)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:86 msgid "Maximum amount of memory used to store contents" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:94 msgid "Max text item size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:95 msgid "Maximum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:103 msgid "Min text item size" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:104 msgid "Minimum size of a text item. Anything out of this boundary is ignored." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:111 msgid "The keyboard shortcut to delete the first element in history" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:112 msgid "" "By default, hitting ctrl + alt + v does that (\"V\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:120 msgid "Does the primary selection affects history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:121 msgid "By default, only clipboard (ctrl+c) affects history." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:128 msgid "" "Do we save all versions of selected rich text (e.g. html) or just the plain " "text version?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:129 msgid "By default, we're saving all" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:136 msgid "Do we save the history from one session to another?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:137 msgid "By default, we're saving it" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:144 msgid "The keyboard shortcut to display the menu" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:145 msgid "" "By default, hitting ctrl + alt + h displays the menu (\"H\"). An " "empty string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:153 msgid "The keyboard shortcut to sync the clipboard to the primary selection" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:154 msgid "" "By default, hitting ctrl + alt + o syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:162 msgid "The keyboard shortcut to sync the primary selection to the clipboard" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:163 msgid "" "By default, hitting ctrl + alt + p syncs them (\"P\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:171 msgid "Are the primary selection and the clipboard synchronized?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:172 msgid "By default, the primary selection and the clipboard are independent." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:179 msgid "Do we track the clipboard changes?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:180 msgid "By default, we're tracking those changes." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:187 msgid "" "Do we sync the daemon state with the gnome-shell extension's one? (disable " "the daemon when disabling the extension)" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:188 msgid "By default, the daemon state keeps unchanged" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:195 msgid "Do we trim the textual items before adding them to history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:196 msgid "" "Trimming means removing all trailing and ending spaces. By default, we're " "letting them as-is." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:204 msgid "" "The keyboard shortcut to upload the first element in history to a pastebin " "service" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:205 msgid "" "By default, hitting ctrl + alt + u does that (\"U\"). An empty " "string here disables this functionnality." msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:213 msgid "Do we prompt for confirmation when emptying a history?" msgstr "" #: data/gsettings/org.gnome.GPaste.gschema.xml.in:214 msgid "By default, we do as it's a destructive action" msgstr "" #: src/client/gpaste-client.c:143 src/client/gpaste-client.c:437 msgid "Couldn't spawn" msgstr "" #: src/client/gpaste-client.c:155 #, c-format msgid "Usage:\n" msgstr "" #. Translators: help for gpaste history #: src/client/gpaste-client.c:157 msgid "print the history with UUIDs" msgstr "" #. Translators: help for gpaste history-size #: src/client/gpaste-client.c:159 msgid "print the size of the history" msgstr "" #. Translators: help for gpaste get-history #: src/client/gpaste-client.c:161 msgid "get the name of the current history" msgstr "" #. Translators: help for gpaste backup-history #. Translators: help for gpaste switch-history #. Translators: help for gpaste delete-history #. Translators: help for gpaste add-password #. Translators: help for gpaste set-password #. Translators: help for gpaste delete-passworf #: src/client/gpaste-client.c:163 src/client/gpaste-client.c:165 #: src/client/gpaste-client.c:167 src/client/gpaste-client.c:173 #: src/client/gpaste-client.c:185 src/client/gpaste-client.c:189 msgid "name" msgstr "" #: src/client/gpaste-client.c:163 msgid "backup current history" msgstr "" #: src/client/gpaste-client.c:165 msgid "switch to another history" msgstr "" #: src/client/gpaste-client.c:167 msgid "delete a history" msgstr "" #. Translators: help for gpaste list-histories #: src/client/gpaste-client.c:169 msgid "list available histories" msgstr "" #. Translators: help for gpaste add #: src/client/gpaste-client.c:171 msgid "text" msgstr "" #: src/client/gpaste-client.c:171 msgid "set text to clipboard" msgstr "" #: src/client/gpaste-client.c:173 msgid "password" msgstr "" #: src/client/gpaste-client.c:173 msgid "add the name - password couple to the clipboard" msgstr "" #. Translators: help for gpaste rename-password #: src/client/gpaste-client.c:175 msgid "old name" msgstr "" #: src/client/gpaste-client.c:175 msgid "new name" msgstr "" #: src/client/gpaste-client.c:175 msgid "rename the password" msgstr "" #. Translators: help for gpaste get #: src/client/gpaste-client.c:177 msgid "get the item from the history" msgstr "" #. Translators: help for gpaste select #: src/client/gpaste-client.c:179 msgid "set the item from the history to the clipboard" msgstr "" #. Translators: help for gpaste replace #: src/client/gpaste-client.c:181 msgid "contents" msgstr "" #: src/client/gpaste-client.c:181 msgid "" "replace the contents of the item from the history with the provided " "one" msgstr "" #. Translators: help for gpaste merge #: src/client/gpaste-client.c:183 msgid "" "merge the items matching the UUIDs from the history and put the result in " "the clipboard" msgstr "" #: src/client/gpaste-client.c:185 msgid "set the item from the history as a password named " msgstr "" #. Translators: help for gpaste delete #: src/client/gpaste-client.c:187 msgid "delete item from the history" msgstr "" #: src/client/gpaste-client.c:189 msgid "delete the password from the history" msgstr "" #. Translators: help for gpaste file #: src/client/gpaste-client.c:191 msgid "path" msgstr "" #: src/client/gpaste-client.c:191 msgid "put the content of the file at into the clipboard" msgstr "" #. Translators: help for whatever | gpaste #: src/client/gpaste-client.c:193 msgid "whatever" msgstr "" #: src/client/gpaste-client.c:193 msgid "set the output of whatever to clipboard" msgstr "" #. Translators: help for gpaste empty #: src/client/gpaste-client.c:195 msgid "empty the history" msgstr "" #. Translators: help for gpaste start #: src/client/gpaste-client.c:197 msgid "start tracking clipboard changes" msgstr "" #. Translators: help for gpaste stop #: src/client/gpaste-client.c:199 msgid "stop tracking clipboard changes" msgstr "" #. Translators: help for gpaste quit #: src/client/gpaste-client.c:201 msgid "alias for stop" msgstr "" #. Translators: help for gpaste daemon-reexec #: src/client/gpaste-client.c:203 msgid "reexecute the daemon (after upgrading...)" msgstr "" #. Translators: help for gpaste settings #: src/client/gpaste-client.c:205 msgid "launch the configuration tool" msgstr "" #. Translators: help for gpaste ui #: src/client/gpaste-client.c:207 msgid "launch the graphical tool" msgstr "" #. Translators: help for gpaste show-history #: src/client/gpaste-client.c:209 msgid "make the applet or extension display the history" msgstr "" #. Translators: help for gpaste upload #: src/client/gpaste-client.c:211 msgid "upload the item to a pastebin service" msgstr "" #. Translators: help for gpaste version #: src/client/gpaste-client.c:213 msgid "display the version" msgstr "" #. Translators: help for gpaste daemon-version #: src/client/gpaste-client.c:215 msgid "display the daemon version" msgstr "" #. Translators: help for gpaste help #: src/client/gpaste-client.c:217 msgid "display this help" msgstr "" #. Translators: help for gpaste about #: src/client/gpaste-client.c:219 msgid "display the about dialog" msgstr "" #: src/client/gpaste-client.c:222 #, c-format msgid "Convenience options:" msgstr "" #. Translators: help for --use-index #: src/client/gpaste-client.c:225 msgid "use the index of the item instead of its UUID" msgstr "" #: src/client/gpaste-client.c:228 #, c-format msgid "Display options:" msgstr "" #. Translators: help for --oneline #: src/client/gpaste-client.c:231 msgid "display each item on only one line" msgstr "" #. Translators: help for --raw #: src/client/gpaste-client.c:233 msgid "display each item raw (without line numbers)" msgstr "" #. Translators: help for --reverse #: src/client/gpaste-client.c:235 msgid "display the items in reverse order" msgstr "" #. Translators: help for --zero #: src/client/gpaste-client.c:237 msgid "use a NUL character instead of a new line betweean each item" msgstr "" #: src/client/gpaste-client.c:240 #, c-format msgid "Merge options:" msgstr "" #. Translators: help for --decoration #. Translators: help for --separator #: src/client/gpaste-client.c:243 src/client/gpaste-client.c:245 msgid "string" msgstr "" #: src/client/gpaste-client.c:243 msgid "" "add the given decoration to the beginning and the end of each item before " "merging" msgstr "" #: src/client/gpaste-client.c:245 msgid "add the given separator between each item when merging" msgstr "" #: src/client/gpaste-client.c:342 #, c-format msgid "Successfully reexecuted the daemon\n" msgstr "" #: src/client/gpaste-client.c:491 msgid "Cannot add non utf8 data as text." msgstr "" #: src/client/gpaste-client.c:808 #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:319 #: src/ui/gpaste-ui-window.c:311 msgid "Couldn't connect to GPaste daemon" msgstr "" #: src/daemon/gpaste-daemon.c:33 msgid "Stop signal received, exiting" msgstr "" #: src/daemon/gpaste-daemon.c:70 msgid "Could not acquire DBus name." msgstr "" #. This is the date format "month/day/year time" #: src/libgpaste/core/gpaste-image-item.c:240 msgid "%m/%d/%y %T" msgstr "" #. This gets displayed in history when selecting an image #: src/libgpaste/core/gpaste-image-item.c:242 #, c-format msgid "[Image, %d x %d (%s)]" msgstr "" #. This is the prefix displayed in history to identify a password #: src/libgpaste/core/gpaste-password-item.c:67 msgid "Password" msgstr "" #. This is the prefix displayed in history to identify selected files #: src/libgpaste/core/gpaste-uris-item.c:104 msgid "[Files] " msgstr "" #: src/libgpaste/gpaste-macros.h:98 msgid "Failed to register the gtk application" msgstr "" #: src/libgpaste/gpaste-macros.h:110 msgid "is already running." msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:116 #: src/ui/gpaste-ui-switch.c:92 msgid "Track clipboard changes" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:122 msgid "Close UI on select" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:131 msgid "Enable the gnome-shell extension" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:137 msgid "Sync the daemon state with the extension's one" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:146 msgid "Primary selection affects history" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:152 msgid "Synchronize clipboard with primary selection" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:159 msgid "Images support" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:165 msgid "Trim items" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:171 msgid "Detect growing lines" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:178 msgid "Save history" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:201 msgid "Max element size when displaying" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:229 msgid "Max text item length" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:236 msgid "Min text item length" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:334 msgid "General behaviour" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:335 msgid "History settings" msgstr "" #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:336 msgid "Keyboard shortcuts" msgstr "" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:453 #: src/ui/gpaste-ui-panel.c:305 msgid "Switch to" msgstr "" #. translators: This is the name of a multi-history management action #: src/libgpaste/settings-ui/gpaste-settings-ui-stack.c:458 #: src/ui/gpaste-ui-delete-history.c:25 src/ui/gpaste-ui-delete-history.c:65 #: src/ui/gpaste-ui-delete-item.c:49 msgid "Delete" msgstr "" #: src/libgpaste/util/gpaste-util.c:30 src/ui/gpaste-ui-backup-history.c:44 #: src/ui/gpaste-ui-edit-item.c:46 src/ui/gpaste-ui-new-item.c:32 msgid "Cancel" msgstr "" #. Translators: this is the translation for emptying the history #: src/libgpaste/util/gpaste-util.c:410 src/ui/gpaste-ui-empty-history.c:65 msgid "Empty" msgstr "" #: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "" #: src/libgpaste/util/gpaste-util.c:719 msgid "Could not create history dir" msgstr "" #: src/ui/gpaste-ui.c:105 src/ui/gpaste-ui-settings.c:32 msgid "GPaste Settings" msgstr "" #: src/ui/gpaste-ui.c:106 msgid "Keyboard Shortcuts" msgstr "" #: src/ui/gpaste-ui.c:107 msgid "About GPaste" msgstr "" #: src/ui/gpaste-ui.c:108 msgid "Quit" msgstr "" #: src/ui/gpaste-ui-about.c:41 msgid "About" msgstr "" #: src/ui/gpaste-ui-backup-history.c:43 src/ui/gpaste-ui-backup-history.c:140 msgid "Backup" msgstr "" #: src/ui/gpaste-ui-backup-history.c:47 msgid "Under which name do you want to backup this history?" msgstr "" #: src/ui/gpaste-ui-delete-history.c:25 msgid "Are you sure you want to delete this history?" msgstr "" #: src/ui/gpaste-ui-edit-item.c:45 src/ui/gpaste-ui-edit-item.c:118 msgid "Edit" msgstr "" #: src/ui/gpaste-ui-empty-item.c:35 msgid "(No result)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:49 msgid "(Empty)" msgstr "" #: src/ui/gpaste-ui-empty-item.c:60 msgid "(Couldn't connect to GPaste daemon)" msgstr "" #: src/ui/gpaste-ui-new-item.c:31 src/ui/gpaste-ui-new-item.c:83 msgid "New" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Restart" msgstr "" #: src/ui/gpaste-ui-reexec.c:29 msgid "Do you really want to restart the daemon?" msgstr "" #: src/ui/gpaste-ui-reexec.c:55 msgid "Restart the daemon" msgstr "" #: src/ui/gpaste-ui-search.c:26 msgid "Search" msgstr "" #: src/ui/gpaste-ui-shortcuts-window.c:64 msgid "General" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Stop" msgstr "" #: src/ui/gpaste-ui-switch.c:54 msgid "Do you really want to stop tracking clipboard changes?" msgstr "" #: src/ui/gpaste-ui-upload-item.c:49 msgid "Upload" msgstr "" gpaste-3.42.6/src/000077500000000000000000000000001421222064600136575ustar00rootroot00000000000000gpaste-3.42.6/src/client.mk000066400000000000000000000007111421222064600154650ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou bin_PROGRAMS += \ bin/gpaste-client \ $(NULL) bin_gpaste_client_SOURCES = \ %D%/client/gpaste-client.c \ $(NULL) bin_gpaste_client_CFLAGS = \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(NULL) bin_gpaste_client_LDADD = \ $(builddir)/$(libgpaste_la_file) \ $(GLIB_LIBS) \ $(NULL) gpaste-3.42.6/src/client/000077500000000000000000000000001421222064600151355ustar00rootroot00000000000000gpaste-3.42.6/src/client/gpaste-client.c000066400000000000000000000641521421222064600200500ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include typedef struct { GPasteClient *client; gint argc; const gchar **args; gchar *pipe_data; const gchar *uuid; gboolean help; gboolean version; gboolean oneline; gboolean raw; gboolean reverse; gboolean use_index; gboolean zero; const gchar *decoration; const gchar *separator; } Context; /* * Utility functions */ static gboolean parse_cmdline (int *argc, char **argv[], Context *ctx) { struct option long_options[] = { { "decoration", required_argument, NULL, 'd' }, { "help", no_argument, NULL, 'h' }, { "oneline", no_argument, NULL, 'o' }, { "raw", no_argument, NULL, 'r' }, { "reverse", no_argument, NULL, 'e' }, { "separator", required_argument, NULL, 's' }, { "use-index", no_argument, NULL, 'i' }, { "version", no_argument, NULL, 'v' }, { "zero", no_argument, NULL, 'z' }, { NULL, no_argument, NULL, '\0' } }; gint64 c; while ((c = getopt_long(*argc, *argv, "d:hores:ivz", long_options, NULL)) != -1) { switch (c) { case 'd': ctx->decoration = optarg; break; case 'h': ctx->help = TRUE; break; case 'o': ctx->oneline = TRUE; break; case 'r': ctx->raw = TRUE; break; case 'e': ctx->reverse = TRUE; break; case 's': ctx->separator = optarg; break; case 'i': ctx->use_index = TRUE; break; case 'v': ctx->version = TRUE; break; case 'z': ctx->zero = TRUE; break; default: ctx->help = TRUE; return FALSE; } } *argc -= optind; *argv += optind; ctx->argc = *argc - 1; ctx->args = (const gchar **) *argv; ++ctx->args; return TRUE; } static gchar * extract_pipe_data (void) { if (isatty (STDIN_FILENO)) return NULL; /* We're not being piped */ g_autoptr (GString) data = g_string_new (NULL); gint64 c; while ((c = fgetc (stdin)) != EOF) data = g_string_append_c (data, (guchar)c); g_string_append_c (data, '\0'); return (*data->str) ? g_strdup (data->str) : NULL; } static const gchar * strip_newline (gchar *str) { for (gchar *s = str; *s; ++s) { if (*s == '\n') *s = ' '; } return str; } static void print_history_line (gchar *line, const gchar *uuid, Context *ctx) { if (!ctx->raw) printf ("%s: ", uuid); printf ("%s%c", (ctx->oneline) ? strip_newline (line) : line, (ctx->zero) ? '\0' : '\n'); } static gint spawn (const gchar *app) { g_autoptr (GError) error = NULL; if (!g_paste_util_spawn_sync (app, &error)) { g_critical ("%s %s: %s", _("Couldn't spawn"), app, error->message); return EXIT_FAILURE; } return EXIT_SUCCESS; } static void show_help (void) { const char *progname = g_get_prgname (); printf (_("Usage:\n")); /* Translators: help for gpaste history */ printf (" %s [history]: %s\n", progname, _("print the history with UUIDs")); /* Translators: help for gpaste history-size */ printf (" %s history-size: %s\n", progname, _("print the size of the history")); /* Translators: help for gpaste get-history */ printf (" %s get-history: %s\n", progname, _("get the name of the current history")); /* Translators: help for gpaste backup-history */ printf (" %s backup-history <%s>: %s\n", progname, _("name"), _("backup current history")); /* Translators: help for gpaste switch-history */ printf (" %s switch-history <%s>: %s\n", progname, _("name"), _("switch to another history")); /* Translators: help for gpaste delete-history */ printf (" %s delete-history <%s>: %s\n", progname, _("name"), _("delete a history")); /* Translators: help for gpaste list-histories */ printf (" %s list-histories: %s\n", progname, _("list available histories")); /* Translators: help for gpaste add */ printf (" %s add <%s>: %s\n", progname, _("text"), _("set text to clipboard")); /* Translators: help for gpaste add-password */ printf (" %s add-password <%s> <%s>: %s\n", progname, _("name"), _("password"), _("add the name - password couple to the clipboard")); /* Translators: help for gpaste rename-password */ printf (" %s rename-password <%s> <%s>: %s\n", progname, _("old name"), _("new name"), _("rename the password")); /* Translators: help for gpaste get */ printf (" %s get : %s\n", progname, _("get the item from the history")); /* Translators: help for gpaste select */ printf (" %s select : %s\n", progname, _("set the item from the history to the clipboard")); /* Translators: help for gpaste replace */ printf (" %s replace <%s>: %s\n", progname, _("contents"), _("replace the contents of the item from the history with the provided one")); /* Translators: help for gpaste merge */ printf (" %s merge : %s\n", progname, _("merge the items matching the UUIDs from the history and put the result in the clipboard")); /* Translators: help for gpaste set-password */ printf (" %s set-password <%s>: %s\n", progname, _("name"), _("set the item from the history as a password named ")); /* Translators: help for gpaste delete */ printf (" %s delete : %s\n", progname, _("delete item from the history")); /* Translators: help for gpaste delete-passworf */ printf (" %s delete-password <%s>: %s\n", progname, _("name"), _("delete the password from the history")); /* Translators: help for gpaste file */ printf (" %s file <%s>: %s\n", progname, _("path"), _("put the content of the file at into the clipboard")); /* Translators: help for whatever | gpaste */ printf (" %s | %s: %s\n", _("whatever"), progname, _("set the output of whatever to clipboard")); /* Translators: help for gpaste empty */ printf (" %s empty: %s\n", progname, _("empty the history")); /* Translators: help for gpaste start */ printf (" %s start: %s\n", progname, _("start tracking clipboard changes")); /* Translators: help for gpaste stop */ printf (" %s stop: %s\n", progname, _("stop tracking clipboard changes")); /* Translators: help for gpaste quit */ printf (" %s quit: %s\n", progname, _("alias for stop")); /* Translators: help for gpaste daemon-reexec */ printf (" %s daemon-reexec: %s\n", progname, _("reexecute the daemon (after upgrading...)")); /* Translators: help for gpaste settings */ printf (" %s settings: %s\n", progname, _("launch the configuration tool")); /* Translators: help for gpaste ui */ printf (" %s ui: %s\n", progname, _("launch the graphical tool")); /* Translators: help for gpaste show-history */ printf (" %s show-history: %s\n", progname, _("make the applet or extension display the history")); /* Translators: help for gpaste upload */ printf (" %s upload : %s\n", progname, _("upload the item to a pastebin service")); /* Translators: help for gpaste version */ printf (" %s version: %s\n", progname, _("display the version")); /* Translators: help for gpaste daemon-version */ printf (" %s daemon-version: %s\n", progname, _("display the daemon version")); /* Translators: help for gpaste help */ printf (" %s help: %s\n", progname, _("display this help")); /* Translators: help for gpaste about */ printf (" %s about: %s\n", progname, _("display the about dialog")); printf("\n"); printf(_("Convenience options:")); printf("\n"); /* Translators: help for --use-index */ printf(" --use-index: %s\n", _("use the index of the item instead of its UUID")); printf("\n"); printf(_("Display options:")); printf("\n"); /* Translators: help for --oneline */ printf(" --oneline: %s\n", _("display each item on only one line")); /* Translators: help for --raw */ printf(" --raw: %s\n", _("display each item raw (without line numbers)")); /* Translators: help for --reverse */ printf(" --reverse: %s\n", _("display the items in reverse order")); /* Translators: help for --zero */ printf(" --zero: %s\n", _("use a NUL character instead of a new line betweean each item")); printf("\n"); printf(_("Merge options:")); printf("\n"); /* Translators: help for --decoration */ printf(" --decoration <%s>: %s\n", _("string"), _("add the given decoration to the beginning and the end of each item before merging")); /* Translators: help for --separator */ printf(" --separator <%s>: %s\n", _("string"), _("add the given separator between each item when merging")); } static void show_version (void) { printf ("%s\n", PACKAGE_STRING); } /* * GPaste commands */ static gint g_paste_help (Context *ctx G_GNUC_UNUSED, GError **error G_GNUC_UNUSED) { show_help (); return EXIT_SUCCESS; } static gint g_paste_version (Context *ctx G_GNUC_UNUSED, GError **error G_GNUC_UNUSED) { show_version (); return EXIT_SUCCESS; } static gint g_paste_flag_action (Context *ctx, GError **error) { if (ctx->help) return g_paste_help (ctx, error); if (ctx->version) return g_paste_version (ctx, error); return -1; } static gint g_paste_history (Context *ctx, GError **error) { GList *history = (ctx->raw) ? g_paste_client_get_raw_history_sync (ctx->client, error) : g_paste_client_get_history_sync (ctx->client, error); if (*error) return EXIT_FAILURE; for (const GList *i = (ctx->reverse ? g_list_last (history) : history); i; i = ctx->reverse ? i->prev : i->next) { const GPasteClientItem *item = i->data; g_autofree gchar *line = g_strdup (g_paste_client_item_get_value (item)); print_history_line (line, g_paste_client_item_get_uuid (item), ctx); } g_list_free_full (history, g_object_unref); return EXIT_SUCCESS; } static gint g_paste_about (Context *ctx, GError **error) { g_paste_client_about_sync (ctx->client, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_daemon_reexec (Context *ctx, GError **error) { g_paste_client_reexecute_sync (ctx->client, error); gboolean success = (!*error || (*error)->code == G_DBUS_ERROR_NO_REPLY); g_clear_error (error); #ifdef G_OS_UNIX if (!success) { GPid pid = g_paste_util_read_pid_file ("Daemon"); if (pid != (GPid) -1) success = !kill (pid, SIGUSR1); } #endif if (!success) return EXIT_FAILURE; printf (_("Successfully reexecuted the daemon\n")); return EXIT_SUCCESS; } static gint g_paste_daemon_version (Context *ctx, GError **error G_GNUC_UNUSED) { g_autofree gchar *v = g_paste_client_get_version (ctx->client); printf ("%s\n", v); return EXIT_SUCCESS; } static gint g_paste_empty (Context *ctx, GError **error) { g_autofree gchar *name = (ctx->argc) ? g_strdup (ctx->args[0]) : g_paste_client_get_history_name_sync (ctx->client, error); if (*error) return EXIT_FAILURE; g_paste_client_empty_history_sync (ctx->client, name, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_get_history (Context *ctx, GError **error) { g_autofree gchar *name = g_paste_client_get_history_name_sync (ctx->client, error); if (*error) return EXIT_FAILURE; printf("%s\n", name); return EXIT_SUCCESS; } static gint g_paste_history_size (Context *ctx, GError **error) { g_autofree gchar *name = (ctx->argc) ? g_strdup (ctx->args[0]) : g_paste_client_get_history_name_sync (ctx->client, error); if (*error) return EXIT_FAILURE; guint64 size = g_paste_client_get_history_size_sync (ctx->client, name, error); if (*error) return EXIT_FAILURE; printf ("%" G_GUINT64_FORMAT "\n", size); return EXIT_SUCCESS; } static gint g_paste_list_histories (Context *ctx, GError **error) { g_auto (GStrv) histories = g_paste_client_list_histories_sync (ctx->client, error); if (*error) return EXIT_FAILURE; for (GStrv h = histories; *h; ++h) printf ("%s\n", *h); return EXIT_SUCCESS; } static gint g_paste_delete_history (Context *ctx, GError **error) { g_autofree gchar *name = (ctx->argc) ? g_strdup (ctx->args[0]) : g_paste_client_get_history_name_sync (ctx->client, error); g_paste_client_delete_history_sync (ctx->client, name, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_settings (Context *ctx G_GNUC_UNUSED, GError **error) { if (!g_paste_util_activate_ui_sync ("prefs", NULL, error)) { g_critical ("%s Ui: %s", _("Couldn't spawn"), (*error)->message); g_clear_error (error); return EXIT_FAILURE; } return EXIT_SUCCESS; } static gint g_paste_show_history (Context *ctx, GError **error) { g_paste_client_show_history_sync (ctx->client, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_start (Context *ctx, GError **error) { g_paste_client_track_sync (ctx->client, TRUE, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_stop (Context *ctx, GError **error) { g_paste_client_track_sync (ctx->client, FALSE, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_ui (Context *ctx G_GNUC_UNUSED, GError **error G_GNUC_UNUSED) { return spawn ("Ui"); } static gint g_paste_add (Context *ctx, GError **error) { const gchar *data = (ctx->argc > 0) ? ctx->args[0] : ctx->pipe_data; if (!data) return -1; if (!g_utf8_validate(data, -1, NULL)) { g_critical (_("Cannot add non utf8 data as text.")); return EXIT_FAILURE; } g_paste_client_add_sync (ctx->client, data, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_add_password (Context *ctx, GError **error) { const gchar *data = (ctx->argc > 1) ? ctx->args[1] : ctx->pipe_data; if (!data) return EXIT_FAILURE; g_paste_client_add_password_sync (ctx->client, ctx->args[0], data, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_backup_history (Context *ctx G_GNUC_UNUSED, GError **error G_GNUC_UNUSED) { guint64 index = 0; g_autofree gchar *name = (ctx->argc > 1) ? g_strdup (ctx->args[index++]) : g_paste_client_get_history_name_sync (ctx->client, error); if (*error) return EXIT_FAILURE; g_paste_client_backup_history_sync (ctx->client, name, ctx->args[index], error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_delete (Context *ctx, GError **error) { g_paste_client_delete_sync (ctx->client, ctx->uuid, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_delete_password (Context *ctx, GError **error) { g_paste_client_delete_password_sync (ctx->client, ctx->args[0], error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_file (Context *ctx, GError **error) { g_paste_client_add_file_sync (ctx->client, ctx->args[0], error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_get (Context *ctx, GError **error) { g_autofree gchar *value = ((ctx->raw) ? g_paste_client_get_raw_element_sync : g_paste_client_get_element_sync) (ctx->client, ctx->uuid, error); if (*error) return EXIT_FAILURE; printf ("%s", value); return EXIT_SUCCESS; } static gint g_paste_replace (Context *ctx, GError **error) { const gchar *data = (ctx->argc > 1) ? ctx->args[1] : ctx->pipe_data; if (!data) return EXIT_FAILURE; g_paste_client_replace_sync (ctx->client, ctx->uuid, data, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_search (Context *ctx, GError **error) { g_auto (GStrv) results = g_paste_client_search_sync (ctx->client, ctx->args[0], error); if (*error) return EXIT_FAILURE; GList *items = g_paste_client_get_elements_sync (ctx->client, (const gchar **) results, -1, error); for (const GList *i = items; i; i = i->next) { const GPasteClientItem *item = i->data; g_autofree gchar *line = g_strdup (g_paste_client_item_get_value (item)); print_history_line (line, g_paste_client_item_get_uuid (item), ctx); } g_list_free_full (items, g_object_unref); return EXIT_SUCCESS; } static gint g_paste_select (Context *ctx, GError **error) { g_paste_client_select_sync (ctx->client, ctx->uuid, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_switch_history (Context *ctx, GError **error) { g_paste_client_switch_history_sync (ctx->client, ctx->args[0], error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_upload (Context *ctx, GError **error) { g_paste_client_upload_sync (ctx->client, ctx->uuid, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_rename_password (Context *ctx, GError **error) { g_paste_client_rename_password_sync (ctx->client, ctx->args[0], ctx->args[1], error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_set_password (Context *ctx, GError **error) { g_paste_client_set_password_sync (ctx->client, ctx->uuid, ctx->args[1], error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } static gint g_paste_merge (Context *ctx, GError **error) { g_paste_client_merge_sync (ctx->client, ctx->decoration, ctx->separator, ctx->args, ctx->argc, error); return (*error) ? EXIT_FAILURE : EXIT_SUCCESS; } /* * Main */ static gint g_paste_dispatch (gint argc, const gchar *verb, Context *ctx, GError **error) { static struct { gint argc; const gchar *verb; gint extra_args; gboolean needs_client; gint (*handler) (Context *ctx, GError **error); } dispatch[] = { { 0, NULL, G_MAXINT, FALSE, g_paste_flag_action }, { 0, NULL, 0, TRUE, g_paste_add }, { 0, NULL, 0, TRUE, g_paste_history }, { 1, "help", 0, FALSE, g_paste_help }, { 1, "v", 0, FALSE, g_paste_version }, { 1, "version", 0, FALSE, g_paste_version }, { 1, "about", 0, TRUE, g_paste_about }, { 1, "dr", 0, TRUE, g_paste_daemon_reexec }, { 1, "daemon-reexec", 0, TRUE, g_paste_daemon_reexec }, { 1, "dv", 0, TRUE, g_paste_daemon_version }, { 1, "daemon-version", 0, TRUE, g_paste_daemon_version }, { 1, "e", 1, TRUE, g_paste_empty }, { 1, "empty", 1, TRUE, g_paste_empty }, { 1, "gh", 0, TRUE, g_paste_get_history }, { 1, "get-history", 0, TRUE, g_paste_get_history }, { 1, "h", 0, TRUE, g_paste_history }, { 1, "history", 0, TRUE, g_paste_history }, { 1, "hs", 1, TRUE, g_paste_history_size }, { 1, "history-size", 1, TRUE, g_paste_history_size }, { 1, "lh", 0, TRUE, g_paste_list_histories }, { 1, "list-histories", 0, TRUE, g_paste_list_histories }, { 1, "dh", 1, TRUE, g_paste_delete_history }, { 1, "delete-history", 1, TRUE, g_paste_delete_history }, { 1, "settings", 0, FALSE, g_paste_settings }, { 1, "p", 0, FALSE, g_paste_settings }, { 1, "preferences", 0, FALSE, g_paste_settings }, { 1, "show-history", 0, TRUE, g_paste_show_history }, { 1, "start", 0, TRUE, g_paste_start }, { 1, "d", 0, TRUE, g_paste_start }, { 1, "daemon", 0, TRUE, g_paste_start }, { 1, "stop", 0, TRUE, g_paste_stop }, { 1, "q", 0, TRUE, g_paste_stop }, { 1, "quit", 0, TRUE, g_paste_stop }, { 1, "ui", 0, FALSE, g_paste_ui }, { 1, "a", 1, TRUE, g_paste_add }, { 1, "add", 1, TRUE, g_paste_add }, { 2, "ap", 1, TRUE, g_paste_add_password }, { 2, "add-password", 1, TRUE, g_paste_add_password }, { 2, "bh", 1, TRUE, g_paste_backup_history }, { 2, "backup-history", 1, TRUE, g_paste_backup_history }, { 2, "d", 0, TRUE, g_paste_delete }, { 2, "del", 0, TRUE, g_paste_delete }, { 2, "delete", 0, TRUE, g_paste_delete }, { 2, "rm", 0, TRUE, g_paste_delete }, { 2, "remove", 0, TRUE, g_paste_delete }, { 2, "dp", 0, TRUE, g_paste_delete_password }, { 2, "delete-password", 0, TRUE, g_paste_delete_password }, { 2, "f", 0, TRUE, g_paste_file }, { 2, "file", 0, TRUE, g_paste_file }, { 2, "g", 0, TRUE, g_paste_get }, { 2, "get", 0, TRUE, g_paste_get }, { 2, "replace", 1, TRUE, g_paste_replace }, { 2, "search", 0, TRUE, g_paste_search }, { 2, "s", 0, TRUE, g_paste_select }, { 2, "set", 0, TRUE, g_paste_select }, { 2, "select", 0, TRUE, g_paste_select }, { 2, "sh", 0, TRUE, g_paste_switch_history }, { 2, "switch-history", 0, TRUE, g_paste_switch_history }, { 2, "u", 0, TRUE, g_paste_upload }, { 2, "upload", 0, TRUE, g_paste_upload }, { 3, "rp", 0, TRUE, g_paste_rename_password }, { 3, "rename-password", 0, TRUE, g_paste_rename_password }, { 3, "sp", 0, TRUE, g_paste_set_password }, { 3, "set-password", 0, TRUE, g_paste_set_password }, { 4, "m", G_MAXINT, TRUE, g_paste_merge }, { 4, "merge", G_MAXINT, TRUE, g_paste_merge }, }; for (guint64 i = 0; i < G_N_ELEMENTS (dispatch); ++i) { if (argc == dispatch[i].argc || dispatch[i].extra_args == G_MAXINT || (argc > dispatch[i].argc && argc <= (dispatch[i].argc + dispatch[i].extra_args))) { if (argc > 0 && dispatch[i].verb && !g_paste_str_equal (verb, dispatch[i].verb)) continue; if (dispatch[i].needs_client && !ctx->client) return EXIT_FAILURE; gint ret = dispatch[i].handler(ctx, error); if (ret >= 0) { if (!dispatch[i].needs_client && !ctx->client) g_clear_error (error); return ret; } } } return -1; } gint main (gint argc, gchar *argv[]) { G_PASTE_INIT_GETTEXT (); g_set_prgname (argv[0]); g_autoptr (GError) error = NULL; Context ctx = { NULL, 0, NULL, NULL, NULL, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL, NULL }; gint status = EXIT_SUCCESS; if (parse_cmdline (&argc, &argv, &ctx)) { g_autoptr (GPasteClient) client = ctx.client = g_paste_client_new_sync (&error); g_autofree gchar *pipe_data = ctx.pipe_data = extract_pipe_data (); g_autofree gchar *uuid = NULL; if (ctx.use_index && ctx.argc > 0) { g_autoptr (GPasteClientItem) item = g_paste_client_get_element_at_index_sync (ctx.client, g_ascii_strtoull (ctx.args[0], NULL, 10), &error); if (!error) { ctx.uuid = uuid = g_strdup (g_paste_client_item_get_uuid (item)); } } else { ctx.uuid = ctx.args[0]; } if (!error) { status = g_paste_dispatch (argc, (argc > 0) ? argv[0] : NULL, &ctx, &error); } if (error) { g_critical ("%s\n", (error) ? error->message : _("Couldn't connect to GPaste daemon")); status = EXIT_FAILURE; } } else { show_help (); status = EXIT_FAILURE; } return status; } gpaste-3.42.6/src/client/meson.build000066400000000000000000000003511421222064600172760ustar00rootroot00000000000000gpaste_client_sources = [ 'gpaste-client.c', ] executable( 'gpaste-client', sources: gpaste_client_sources, install: true, dependencies: [ glib_dep, gtk_dep, libgpaste_internal_dep ], install_dir: get_option('bindir'), )gpaste-3.42.6/src/daemon.mk000066400000000000000000000011221421222064600154470ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou gpaste_daemon_binary = bin/gpaste-daemon pkglibexec_PROGRAMS += \ $(gpaste_daemon_binary) \ $(NULL) $(gpaste_daemon_binary): $(libgpaste_la_file) bin_gpaste_daemon_SOURCES = \ %D%/daemon/gpaste-daemon.c \ $(NULL) bin_gpaste_daemon_CFLAGS = \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(NULL) bin_gpaste_daemon_LDADD = \ $(builddir)/$(libgpaste_la_file) \ $(GLIB_LIBS) \ $(GTK_LIBS) \ $(NULL) gpaste-3.42.6/src/daemon/000077500000000000000000000000001421222064600151225ustar00rootroot00000000000000gpaste-3.42.6/src/daemon/gpaste-daemon.c000066400000000000000000000103071421222064600200130ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include #include #ifdef G_OS_UNIX # include #endif static void reexec (GPasteDaemon *g_paste_daemon G_GNUC_UNUSED, gpointer user_data) { GApplication *app = user_data; g_application_quit (app); execl (PKGLIBEXECDIR "/gpaste-daemon", "gpaste-daemon", NULL); } #ifdef G_OS_UNIX static gboolean signal_handler (gpointer user_data) { GApplication *app = user_data; g_print ("%s\n", _("Stop signal received, exiting")); g_application_quit (app); return G_SOURCE_REMOVE; } typedef struct { GPasteDaemon *daemon; GApplication *app; } Usr1Data; static gboolean usr1_handler (gpointer user_data) { Usr1Data *data = user_data; reexec (data->daemon, data->app); return G_SOURCE_REMOVE; } #endif enum { C_NAME_LOST, C_REEXECUTE_SELF, C_LAST_SIGNAL }; G_GNUC_NORETURN static void on_name_lost (GPasteBus *bus G_GNUC_UNUSED, gpointer user_data) { GApplication *app = user_data; fprintf (stderr, "%s\n", _("Could not acquire DBus name.")); g_application_quit (app); exit (EXIT_FAILURE); } typedef struct { GPasteBus *bus; GPasteDaemon *daemon; GPasteBusObject **search_provider; GApplication *gapp; } CallbackData; static void register_bus_object (GPasteBus *bus, GPasteBusObject *object, GApplication *gapp) { g_autoptr (GError) error = NULL; if (!g_paste_bus_object_register_on_connection (object, g_paste_bus_get_connection (bus), &error)) on_name_lost (bus, gapp); } static gboolean register_search_provider (gpointer user_data) { CallbackData *data = user_data; GPasteBusObject *search_provider = *(data->search_provider) = g_paste_search_provider_new (); register_bus_object (data->bus, search_provider, data->gapp); return G_SOURCE_REMOVE; } static void on_bus_acquired (GPasteBus *bus, gpointer user_data) { CallbackData *data = user_data; register_bus_object (bus, G_PASTE_BUS_OBJECT (data->daemon), data->gapp); g_source_set_name_by_id (g_idle_add (register_search_provider, user_data), "[GPaste] register_search_provider"); } gint main (gint argc, gchar *argv[]) { /* FIXME: remove this once gtk supports clipboard correctly on wayland */ gdk_set_allowed_backends ("x11"); G_PASTE_INIT_APPLICATION ("Daemon"); /* Keep the gapplication around */ g_application_hold (gapp); g_autofree CallbackData *data = g_new0 (CallbackData, 1); g_autoptr (GPasteDaemon) g_paste_daemon = data->daemon = g_paste_daemon_new (); g_autoptr (GPasteBusObject) search_provider = NULL; data->search_provider = &search_provider; data->gapp = gapp; g_autoptr (GPasteBus) bus = data->bus = g_paste_bus_new (on_bus_acquired, data); guint64 c_signals[C_LAST_SIGNAL] = { [C_NAME_LOST] = g_signal_connect (bus, "name-lost", G_CALLBACK (on_name_lost), gapp), [C_REEXECUTE_SELF] = g_signal_connect (g_paste_daemon, "reexecute-self", G_CALLBACK (reexec), gapp) }; #ifdef G_OS_UNIX g_source_set_name_by_id (g_unix_signal_add (SIGTERM, signal_handler, app), "[GPaste] SIGTERM listener"); g_source_set_name_by_id (g_unix_signal_add (SIGINT, signal_handler, app), "[GPaste] SIGINT listener"); Usr1Data usr1_data = { g_paste_daemon, gapp }; g_source_set_name_by_id (g_unix_signal_add (SIGUSR1, usr1_handler, &usr1_data), "[GPaste] SIGUSR1 listener"); #endif g_paste_bus_own_name (bus); g_paste_util_write_pid_file ("Daemon"); gint64 exit_status = g_application_run (gapp, argc, argv); g_signal_handler_disconnect (bus, c_signals[C_NAME_LOST]); g_signal_handler_disconnect (g_paste_daemon, c_signals[C_REEXECUTE_SELF]); return exit_status; } gpaste-3.42.6/src/daemon/meson.build000066400000000000000000000004031421222064600172610ustar00rootroot00000000000000gpaste_daemon_sources = [ 'gpaste-daemon.c', ] executable( 'gpaste-daemon', sources: gpaste_daemon_sources, dependencies: [ glib_dep, gtk_dep, libgpaste_internal_dep ], install: true, install_dir: join_paths(get_option('libexecdir'), 'gpaste'), )gpaste-3.42.6/src/gi.mk000066400000000000000000000023331421222064600146100ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou INTROSPECTION_SCANNER_ARGS = $(NULL) INTROSPECTION_COMPILER_ARGS = $(NULL) INTROSPECTION_GIRS = $(NULL) libgpaste_gir_file = bindings/GPaste-1.0.gir $(libgpaste_gir_file): $(libgpaste_la_file) bindings_GPaste_1_0_gir_FILES = \ $(pkginclude_HEADERS) \ $(lib_libgpaste_la_SOURCES) \ $(NULL) bindings_GPaste_1_0_gir_CFLAGS = \ $(AM_CPPFLAGS) \ -fvisibility=default \ $(NULL) bindings_GPaste_1_0_gir_LIBS = $(libgpaste_la_file) bindings_GPaste_1_0_gir_EXPORT_PACKAGES = libgpaste bindings_GPaste_1_0_gir_SCANNERFLAGS = --warn-all bindings_GPaste_1_0_gir_C_INCLUDES = gpaste.h bindings_GPaste_1_0_gir_INCLUDES = \ GdkPixbuf-2.0 \ Gio-2.0 \ GObject-2.0 \ Gtk-3.0 \ $(NULL) if HAVE_INTROSPECTION INTROSPECTION_GIRS += \ $(libgpaste_gir_file) \ $(NULL) endif girdir = $(datadir)/gir-1.0 gir_DATA = $(INTROSPECTION_GIRS) typelibdir = $(libdir)/girepository-1.0 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) CLEANFILES += \ $(gir_DATA) \ $(typelib_DATA) \ $(NULL) -include $(INTROSPECTION_MAKEFILE) gpaste-3.42.6/src/gnome-shell.mk000066400000000000000000000031261421222064600164240ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou gnomeshelldir = $(datadir)/gnome-shell/extensions/GPaste@gnome-shell-extensions.gnome.org gnomeshell_extension_metadata_file = %D%/gnome-shell/metadata.json gnomeshell_extension_files = \ %D%/gnome-shell/aboutItem.js \ %D%/gnome-shell/checkerBypass.js \ %D%/gnome-shell/deleteButton.js \ %D%/gnome-shell/deleteItemPart.js \ %D%/gnome-shell/dummyHistoryItem.js \ %D%/gnome-shell/emptyHistoryItem.js \ %D%/gnome-shell/extension.js \ %D%/gnome-shell/indicator.js \ %D%/gnome-shell/item.js \ %D%/gnome-shell/pageItem.js \ %D%/gnome-shell/pageSwitcher.js \ %D%/gnome-shell/prefs.js \ %D%/gnome-shell/searchItem.js \ %D%/gnome-shell/stateSwitch.js \ %D%/gnome-shell/statusIcon.js \ %D%/gnome-shell/uiItem.js \ $(NULL) if ENABLE_GNOME_SHELL_EXTENSION nodist_gnomeshell_DATA = \ $(gnomeshell_extension_metadata_file) \ $(gnomeshell_extension_files) \ $(NULL) endif EXTRA_DIST += \ $(gnomeshell_extension_metadata_file:.json=.json.in) \ $(gnomeshell_extension_files) \ $(NULL) CLEANFILES += \ $(gnomeshell_extension_metadata_file) \ $(NULL) SUFFIXES += .json .json.in .json.in.json: @ $(MKDIR_P) $(@D) $(AM_V_GEN) $(SED) -e 's,[@]gettext_domain[@],$(GETTEXT_PACKAGE),g' \ -e 's,[@]version[@],$(VERSION),g' \ < $< > $@ gpaste-3.42.6/src/gnome-shell/000077500000000000000000000000001421222064600160715ustar00rootroot00000000000000gpaste-3.42.6/src/gnome-shell/aboutItem.js000066400000000000000000000014151421222064600203610ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const { GObject, St } = imports.gi; var GPasteAboutItem = GObject.registerClass( class GPasteAboutItem extends St.Button { _init(client, menu) { super._init({ x_expand: true, x_align: St.Align.MIDDLE, reactive: true, can_focus: true, track_hover: true, style_class: 'button', child: new St.Icon({ icon_name: 'dialog-information-symbolic', style_class: 'popup-menu-icon' }) }); this.connect('clicked', function() { menu.itemActivated(); client.about(null); }); } }); gpaste-3.42.6/src/gnome-shell/checkerBypass.js000066400000000000000000000025171421222064600212220ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2021, Marc-Antoine Perennou * * Based on js/misc/util.js from gnome-shell */ const Main = imports.ui.main; const { GLib, Gio } = imports.gi; // Sadly, there is no other way of making global keybindings work on wayland until we get a portal for this. // I really wish we could avoid this, and the fact that we do this defeats the whole purpose of the added security from // gnome-shell which is... really sad. /** */ function bypass() { if (!Main.shellDBusService) { // we got loaded too early, the dbus service isn't ready so we cannot hook ourselves in, try back later GLib.idle_add(GLib.PRIORITY_DEFAULT, bypass); return; } let checker = Main.shellDBusService._senderChecker; if (!checker._gpasteEnabled) { checker._gpasteEnabled = true; checker._watchList.push(Gio.DBus.watch_name(Gio.BusType.SESSION, 'org.gnome.GPaste', Gio.BusNameWatcherFlags.NONE, (conn_, name_, owner) => checker._allowlistMap.set('org.gnome.GPaste', owner), () => checker._allowlistMap.delete('org.gnome.GPaste'))); } } gpaste-3.42.6/src/gnome-shell/deleteButton.js000066400000000000000000000013411421222064600210640ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const { Clutter, GObject, St } = imports.gi; var GPasteDeleteButton = GObject.registerClass( class GPasteDeleteButton extends St.Button { _init(client, uuid) { super._init(); this.child = new St.Icon({ icon_name: 'edit-delete-symbolic', style_class: 'popup-menu-icon' }); this._client = client; this.setUuid(uuid); this.connect('clicked', this._onClick.bind(this)); } setUuid(uuid) { this._uuid = uuid; } _onClick() { this._client.delete(this._uuid, null); return Clutter.EVENT_STOP; } }); gpaste-3.42.6/src/gnome-shell/deleteItemPart.js000066400000000000000000000012431421222064600213370ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const { GObject, St } = imports.gi; const ExtensionUtils = imports.misc.extensionUtils; const Me = ExtensionUtils.getCurrentExtension(); const DeleteButton = Me.imports.deleteButton; var GPasteDeleteItemPart = GObject.registerClass( class GPasteDeleteItemPart extends St.Bin { _init(client, uuid) { super._init({ x_align: St.Align.END }); this._deleteButton = new DeleteButton.GPasteDeleteButton(client, uuid); this.child = this._deleteButton; } setUuid(uuid) { this._deleteButton.setUuid(uuid); } }); gpaste-3.42.6/src/gnome-shell/dummyHistoryItem.js000066400000000000000000000012711421222064600217640ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const ExtensionUtils = imports.misc.extensionUtils; const _ = ExtensionUtils.gettext; const { GObject } = imports.gi; const PopupMenu = imports.ui.popupMenu; var GPasteDummyHistoryItem = GObject.registerClass( class GPasteDummyHistoryItem extends PopupMenu.PopupMenuItem { _init() { super._init(_("(Couldn't connect to GPaste daemon)")); this.setSensitive(false); } showEmpty() { this.label.text = _("(Empty)"); this.show(); } showNoResult() { this.label.text = _("(No result)"); this.show(); } }); gpaste-3.42.6/src/gnome-shell/emptyHistoryItem.js000066400000000000000000000017551421222064600217760ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const { GLib, GObject, GPaste, St } = imports.gi; var GPasteEmptyHistoryItem = GObject.registerClass( class GPasteEmptyHistoryItem extends St.Button { _init(client, settings, menu) { super._init({ x_expand: true, x_align: St.Align.MIDDLE, reactive: true, can_focus: true, track_hover: true, style_class: 'button', child: new St.Icon({ icon_name: 'edit-clear-all-symbolic', style_class: 'popup-menu-icon' }) }); this.connect('clicked', function() { menu.itemActivated(); client.get_history_name((client, result) => { const name = client.get_history_name_finish(result); GPaste.util_empty_with_confirmation (client, settings, name); }); }); } }); gpaste-3.42.6/src/gnome-shell/extension.js000066400000000000000000000015701421222064600204460ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const Config = imports.misc.config; imports.gi.versions.Clutter = Config.LIBMUTTER_API_VERSION; imports.gi.versions.GLib = '2.0'; imports.gi.versions.GPaste = '1.0'; imports.gi.versions.Pango = '1.0'; imports.gi.versions.St = '1.0'; const Main = imports.ui.main; const ExtensionUtils = imports.misc.extensionUtils; const Me = ExtensionUtils.getCurrentExtension(); const Indicator = Me.imports.indicator; class Extension { constructor() { ExtensionUtils.initTranslations(); } enable() { Main.panel.addToStatusArea('gpaste', new Indicator.GPasteIndicator()); } disable() { Main.panel.statusArea.gpaste.shutdown(); } } /** */ function init() { Me.imports.checkerBypass.bypass(); return new Extension(); } gpaste-3.42.6/src/gnome-shell/indicator.js000066400000000000000000000311161421222064600204050ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const ExtensionUtils = imports.misc.extensionUtils; const Me = ExtensionUtils.getCurrentExtension(); const _ = ExtensionUtils.gettext; const PanelMenu = imports.ui.panelMenu; const PopupMenu = imports.ui.popupMenu; const { Clutter, GObject, GLib, GPaste, St } = imports.gi; const AboutItem = Me.imports.aboutItem; const DummyHistoryItem = Me.imports.dummyHistoryItem; const EmptyHistoryItem = Me.imports.emptyHistoryItem; const Item = Me.imports.item; const PageSwitcher = Me.imports.pageSwitcher; const SearchItem = Me.imports.searchItem; const StateSwitch = Me.imports.stateSwitch; const StatusIcon = Me.imports.statusIcon; const UiItem = Me.imports.uiItem; var GPasteIndicator = GObject.registerClass( class GPasteIndicator extends PanelMenu.Button { _init() { super._init(0.0, "GPaste"); this._statusIcon = new StatusIcon.GPasteStatusIcon(); this.add_child(this._statusIcon); this._settings = new GPaste.Settings(); this._headerSize = 0; this._postHeaderSize = 0; this._history = []; this._preFooterSize = 0; this._footerSize = 0; this._searchResults = []; this._dummyHistoryItem = new DummyHistoryItem.GPasteDummyHistoryItem(); this._searchItem = new SearchItem.GPasteSearchItem(); this._searchItem.connect('text-changed', this._onNewSearch.bind(this)); this._settingsSizeChangedId = this._settings.connect('changed::element-size', this._resetElementSize.bind(this)); this._resetElementSize(); this.menu.connect('open-state-changed', this._onOpenStateChanged.bind(this)); this.menu.connect('key-press-event', this._onMenuKeyPress.bind(this)); this._pageSwitcher = new PageSwitcher.GPastePageSwitcher(); this._pageSwitcher.connect('switch', (sw, page) => { this._updatePage(page); }); this._actions = new PopupMenu.PopupBaseMenuItem({ reactive: false, can_focus: false }); this._actions._ornamentLabel.set_x_expand(true); this._addToPostHeader(this._dummyHistoryItem); this._addToPreFooter(new PopupMenu.PopupSeparatorMenuItem()); this._addToFooter(this._actions); GPaste.Client.new((obj, result) => { this._client = GPaste.Client.new_finish(result); this._uiItem = new UiItem.GPasteUiItem(this.menu); this._emptyHistoryItem = new EmptyHistoryItem.GPasteEmptyHistoryItem(this._client, this._settings, this.menu); this._aboutItem = new AboutItem.GPasteAboutItem(this._client, this.menu); this._switch = new StateSwitch.GPasteStateSwitch(this._client); this._addToHeader(this._switch); this._addToHeader(this._searchItem); this._addToHeader(this._pageSwitcher); this._actions.add_child(this._uiItem); this._actions.add_child(this._emptyHistoryItem); this._actions.add_child(this._aboutItem); this._settingsMaxSizeChangedId = this._settings.connect('changed::max-displayed-history-size', this._resetMaxDisplayedSize.bind(this)); this._resetMaxDisplayedSize(); this._clientUpdateId = this._client.connect('update', this._update.bind(this)); this._clientShowId = this._client.connect('show-history', this._popup.bind(this)); this._clientTrackingId = this._client.connect('tracking', this._toggle.bind(this)); this._onStateChanged (true); this.menu.actor.connect('key-press-event', this._onKeyPressEvent.bind(this)); this.menu.actor.connect('key-release-event', this._onKeyReleaseEvent.bind(this)); this.connect('destroy', this._onDestroy.bind(this)); }); } shutdown() { this._onStateChanged (false); this._onDestroy(); this.destroy(); } _onKeyPressEvent(actor, event) { if (event.has_control_modifier()) { const nb = parseInt(event.get_key_unicode()); if (!isNaN(nb) && nb >= 0 && nb <= 9 && nb < this._history.length) { this._history[nb].activate(event); } } else { this._maybeUpdateIndexVisibility(event, true); } } _onKeyReleaseEvent(actor, event) { this._updateIndexVisibility(!this._eventIsControlKey(event) && event.has_control_modifier()); } _maybeUpdateIndexVisibility(event, state) { if (this._eventIsControlKey(event)) { this._updateIndexVisibility(state); } } _updateIndexVisibility(state) { this._history.slice(0, 10).forEach(function(i) { i.showIndex(state); }); } _eventIsControlKey(event) { const key = event.get_key_symbol(); return (key == Clutter.KEY_Control_L || key == Clutter.KEY_Control_R); } _hasSearch() { return this._searchItem.text.length > 0; } _onSearch(page) { if (this._hasSearch()) { const search = this._searchItem.text.toLowerCase(); this._client.search(search, (client, result) => { this._searchResults = client.search_finish(result); let results = this._searchResults.length; const maxSize = this._history.length; if (!this._pageSwitcher.updateForSize(results)) { return; } this._pageSwitcher.setActive(page); const offset = this._pageSwitcher.getPageOffset(); if (results > (maxSize + offset)) { results = (maxSize + offset); } this._history.slice(0, results - offset).forEach((i, index) => { i.setUuid(this._searchResults[offset + index]); }); this._updateVisibility(results == 0); this._history.slice(results - offset, maxSize).forEach(function(i) { i.setIndex(-1); }); }); } else { this._searchResults = []; this._refresh(0); } } _onNewSearch() { this._onSearch(1); } _resetElementSize() { const size = this._settings.get_element_size(); this._searchItem.resetSize(size/2 + 3); this._history.forEach(function(i) { i.setTextSize(size); }); } _updatePage(page) { this._pageSwitcher.setActive(page); this._refresh(0); } _resetMaxDisplayedSize() { const oldSize = this._history.length; const newSize = this._settings.get_max_displayed_history_size(); const elementSize = this._settings.get_element_size(); this._pageSwitcher.setMaxDisplayedSize(newSize); this._client.get_history_name((client, result) => { const name = client.get_history_name_finish(result); this._client.get_history_size(name, (client, result) => { const offset = this._pageSwitcher.getPageOffset(); if (newSize > oldSize) { const realSize = client.get_history_size_finish(result); for (let index = oldSize; index < newSize; ++index) { let realIndex = index + offset; let item = new Item.GPasteItem(this._client, elementSize, (realIndex < realSize) ? realIndex : -1); this.menu.addMenuItem(item, this._headerSize + this._postHeaderSize + index); this._history[index] = item; } } else { for (let i = newSize; i < oldSize; ++i) { this._history.pop().destroy(); } } if (offset === 0 || oldSize === 0) { this._updatePage(1); } else { this._updatePage((offset / oldSize) + 1); } }); }); } _update(client, action, target, position) { switch (target) { case GPaste.UpdateTarget.ALL: this._refresh(0); break; case GPaste.UpdateTarget.POSITION: const offset = this._pageSwitcher.getPageOffset(); const displayPos = position - offset; switch (action) { case GPaste.UpdateAction.REPLACE: this._history[displayPos].refresh(); break; case GPaste.UpdateAction.REMOVE: this._refresh(displayPos); break; } break; } } _refresh(resetTextFrom) { if (this._searchResults.length > 0) { this._onSearch(this._pageSwitcher.getPage()); } else if (this._hasSearch()) { this._history.forEach(function(i, index) { i.setIndex(-1); }); this._updateVisibility(true); } else { this._client.get_history_name((client, result) => { const name = client.get_history_name_finish(result); this._client.get_history_size(name, (client, result) => { const realSize = client.get_history_size_finish(result); if (!this._pageSwitcher.updateForSize(realSize)) { return; } const maxSize = this._history.length; const offset = this._pageSwitcher.getPageOffset(); const size = Math.min(realSize - offset, maxSize); this._history.slice(resetTextFrom, size).forEach(function(i, index) { i.setIndex(offset + resetTextFrom + index); }); this._history.slice(size, maxSize).forEach(function(i, index) { i.setIndex(-1); }); this._updateVisibility(size == 0); }); }); } } _updateVisibility(empty) { if (!empty) { this._dummyHistoryItem.hide(); this._emptyHistoryItem.show(); this._searchItem.show(); } else if (this._hasSearch()) { this._dummyHistoryItem.showNoResult(); this._emptyHistoryItem.hide(); this._searchItem.show(); } else { this._dummyHistoryItem.showEmpty(); this._emptyHistoryItem.hide(); this._searchItem.hide(); } } _popup() { this.menu.open(true); } _toggle(c, state) { this._switch.toggle(state); } _selectSearch() { if (this._history.length > 0) { this._searchItem.grabFocus(); } } _addToHeader(item) { this.menu.addMenuItem(item, this._headerSize++); } _addToPostHeader(item) { this.menu.addMenuItem(item, this._headerSize + this._postHeaderSize++); } _addToPreFooter(item) { this.menu.addMenuItem(item, this._headerSize + this._postHeaderSize + this._history.length + this._preFooterSize++); } _addToFooter(item) { this.menu.addMenuItem(item, this._headerSize + this._postHeaderSize + this._history.length + this._preFooterSize + this._footerSize++); } _onStateChanged(state) { if (this._client) { this._client.on_extension_state_changed(state, null); } } _onOpenStateChanged(menu, state) { if (state) { this._searchItem.reset(); this._updatePage(1); let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, this._selectSearch.bind(this)); GLib.Source.set_name_by_id(id, '[GPaste] select search'); } else { this._updateIndexVisibility(false); } super._onOpenStateChanged(menu, state); } _onMenuKeyPress(actor, event) { if(this._switch.active) return super._onMenuKeyPress(actor, event); const symbol = event.get_key_symbol(); if (symbol == Clutter.KEY_Left) { return this._pageSwitcher.previous(); } if (symbol == Clutter.KEY_Right) { return this._pageSwitcher.next(); } return Clutter.EVENT_PROPAGATE; } _onDestroy() { if (!this._client) { return; } this._client.disconnect(this._clientUpdateId); this._client.disconnect(this._clientShowId); this._client.disconnect(this._clientTrackingId); this._client = null; this._settings.disconnect(this._settingsMaxSizeChangedId); this._settings.disconnect(this._settingsSizeChangedId); } }); gpaste-3.42.6/src/gnome-shell/item.js000066400000000000000000000075161421222064600173760ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const PopupMenu = imports.ui.popupMenu; const { Clutter, GObject, GPaste, Pango, St } = imports.gi; const ExtensionUtils = imports.misc.extensionUtils; const Me = ExtensionUtils.getCurrentExtension(); const DeleteItemPart = Me.imports.deleteItemPart; var GPasteItem = GObject.registerClass( class GPasteItem extends PopupMenu.PopupMenuItem { _init(client, size, index) { super._init(""); this.label.set_x_expand(true); this._client = client; this._index = -1; this._fakeIndex = false; this._uuid = null; if (index <= 10) { this._indexLabel = new St.Label({ text: index + ': ' }); this._indexLabelVisible = false; } this.connect('activate', this._onActivate.bind(this)); this.connect('key-press-event', this._onKeyPressed.bind(this)); this._deleteItem = new DeleteItemPart.GPasteDeleteItemPart(client, this._uuid); this.add_child(this._deleteItem); this.label.clutter_text.ellipsize = Pango.EllipsizeMode.END; this.setTextSize(size); this.setIndex(index); } showIndex(state) { if (state) { if (!this._indexLabelVisible) { this.insert_child_at_index(this._indexLabel, 1); } } else if (this._indexLabelVisible) { this.remove_child(this._indexLabel); } this._indexLabelVisible = state; } refresh() { this.setIndex(this._index); } setIndex(index) { const oldIndex = this._index; this._index = index; this._fakeIndex = false; if (index == -1) { this._setValue(null, oldIndex); } else { this._client.get_element_at_index(index, (client, result) => { const item = client.get_element_at_index_finish(result); this._uuid = item.get_uuid(); this._setValue(item.get_value(), oldIndex); }); } } setUuid(uuid) { const oldIndex = this._index; this._index = -2; this._fakeIndex = true; this._uuid = uuid; if (uuid == null) { this._setValue(null, oldIndex); } else { this._client.get_element(uuid, (client, result) => { const value = client.get_element_finish(result); this._setValue(value, oldIndex); }); } } _setValue(value, oldIndex) { if (this._index == 0) { this.label.set_style("font-weight: bold;"); } else if (oldIndex == 0) { this.label.set_style(null); } if (this._index == -1) { this._uuid = null; this.label.clutter_text.set_text(value || ""); this.hide(); } else { const text = value.replace(/[\t\n\r]/g, ' '); if (text != this.label.get_text()) { this.label.clutter_text.set_text(text); } if (oldIndex == -1) { this.show(); } } this._deleteItem.setUuid(this._uuid); } setTextSize(size) { this.label.clutter_text.max_length = size; } _onActivate(actor, event) { this._client.select(this._uuid, null); } _onKeyPressed(actor, event) { const symbol = event.get_key_symbol(); if (symbol == Clutter.KEY_space || symbol == Clutter.KEY_Return) { this.activate(event); return Clutter.EVENT_STOP; } if (symbol == Clutter.KEY_BackSpace || symbol == Clutter.KEY_Delete) { this._client.delete(this._uuid, null); return Clutter.EVENT_STOP; } return Clutter.EVENT_PROPAGATE; } }); gpaste-3.42.6/src/gnome-shell/meson.build000066400000000000000000000012211421222064600202270ustar00rootroot00000000000000shell_extension_files = [ 'aboutItem.js', 'checkerBypass.js', 'deleteButton.js', 'deleteItemPart.js', 'dummyHistoryItem.js', 'emptyHistoryItem.js', 'extension.js', 'indicator.js', 'item.js', 'pageItem.js', 'pageSwitcher.js', 'prefs.js', 'searchItem.js', 'stateSwitch.js', 'statusIcon.js', 'uiItem.js', ] configured_shell_ext_metadata = configure_file( input: 'metadata.json.in', configuration: conf, output: 'metadata.json', ) install_data( shell_extension_files, configured_shell_ext_metadata, install_dir: join_paths(get_option('datadir'), 'gnome-shell/extensions/GPaste@gnome-shell-extensions.gnome.org'), ) gpaste-3.42.6/src/gnome-shell/metadata.json.in000066400000000000000000000004451421222064600211540ustar00rootroot00000000000000{ "shell-version": [ "41.0" ], "uuid": "GPaste@gnome-shell-extensions.gnome.org", "name": "GPaste", "version": "@version@", "description": "Clipboard management system", "url": "http://github.com/Keruspe/GPaste", "gettext-domain": "@gettext_domain@" } gpaste-3.42.6/src/gnome-shell/pageItem.js000066400000000000000000000016151421222064600201650ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const { GObject, St } = imports.gi; var GPastePageItem = GObject.registerClass({ Signals: { 'switch': { param_types: [GObject.TYPE_UINT64] }, }, }, class GPastePageItem extends St.Button { _init(page) { super._init({ label: '' + page, x_align: St.Align.MIDDLE, reactive: true, can_focus: false, track_hover: true, style_class: 'calendar-day-base calendar-day' }); this._page = page; this.connect('clicked', () => { this.emit('switch', this._page); }); } setActive(active) { if (active) { this.add_style_pseudo_class('selected'); } else { this.remove_style_pseudo_class('selected'); } } }); gpaste-3.42.6/src/gnome-shell/pageSwitcher.js000066400000000000000000000060621421222064600210600ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const PopupMenu = imports.ui.popupMenu; const { Clutter, GObject, St } = imports.gi; const ExtensionUtils = imports.misc.extensionUtils; const Me = ExtensionUtils.getCurrentExtension(); const PageItem = Me.imports.pageItem; const MAX_PAGES = 20; var GPastePageSwitcher = GObject.registerClass({ Signals: { 'switch': { param_types: [GObject.TYPE_UINT64] }, }, }, class GPastePageSwitcher extends PopupMenu.PopupBaseMenuItem { _init() { super._init({ style_class: 'calendar', reactive: false, can_focus: false }); this._ornamentLabel.set_x_expand(true); // Use to center everything because of ornamentLabel this._dummyLabel = new St.Label({ text: '', x_expand: true }); this.add_child(this._dummyLabel); this._active = -1; this._maxDisplayedSize = -1; this._pages = []; } setMaxDisplayedSize(size) { this._maxDisplayedSize = size; } updateForSize(size) { const pages = Math.min((size === 0) ? 0 : Math.floor((size - 1) / this._maxDisplayedSize + 1), MAX_PAGES); for (let i = this._pages.length; i < pages; ++i) { this._addPage(); } while (this._pages.length !== pages) { this._pages.pop().destroy(); } if (size > 0 && this._active === -1) { this._switch(1); return false; } else if (size == 0 || this._active < pages) { return true; } else { this._active = -1; this._switch(pages); return false; } } _addPage() { let sw = new PageItem.GPastePageItem(this._pages.length + 1); this._pages.push(sw); this.remove_child(this._dummyLabel); this.add_child(sw); this.add_child(this._dummyLabel); sw.connect('switch', (sw, page) => { this._switch(page); }); } getPageOffset() { return (this._active < 0) ? 0 : (this._active * this._maxDisplayedSize); } getPage() { return this._active + 1; } setActive(page) { if (page !== 0 && page !== (this._active + 1) && page <= this._pages.length) { if (this._active !== -1) { this._pages[this._active].setActive(false); } this._active = page - 1; this._pages[this._active].setActive(true); } } previous() { const page = this.getPage(); if (page > 1) { this._switch(page - 1); return Clutter.EVENT_STOP; } return Clutter.EVENT_PROPAGATE; } next() { const page = this.getPage(); if (page < this._pages.length) { this._switch(page + 1); return Clutter.EVENT_STOP; } return Clutter.EVENT_PROPAGATE; } _switch(page) { if (!isNaN(page)) { this.emit('switch', page); } } }); gpaste-3.42.6/src/gnome-shell/prefs.js000066400000000000000000000016211421222064600175460ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ imports.gi.versions.Gtk = '4.0'; const ExtensionUtils = imports.misc.extensionUtils; //const { GPaste } = imports.gi; /** */ function init() { ExtensionUtils.initTranslations(); } /** * @returns {Gtk.Label} - the placeholder label */ function GPaste40PlaceHolder() { const { GLib, Gtk } = imports.gi; GLib.spawn_async(null, ["gpaste-client", "settings"], null, GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD, null); return new Gtk.Label({ label: "Opened the GPaste settings." }); } /** * @returns {Gtk.Widget} - the prefs widget */ function buildPrefsWidget() { /* let widget = new GPaste.SettingsUiWidget({ margin: 12 }); if (widget) { widget.show_all(); } */ let widget = GPaste40PlaceHolder(); return widget; } gpaste-3.42.6/src/gnome-shell/searchItem.js000066400000000000000000000036441421222064600205220ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const PopupMenu = imports.ui.popupMenu; const { GObject, St } = imports.gi; var GPasteSearchItem = GObject.registerClass({ Signals: { 'text-changed': { param_types: [] }, }, }, class GPasteSearchItem extends PopupMenu.PopupBaseMenuItem { _init() { super._init({ activate: false, reactive: true, hover: false, can_focus: false }); this._entry = new St.Entry({ name: 'GPasteSearchEntry', style_class:'search-entry', track_hover: true, reactive: true, can_focus: true }); this.add_child(this._entry); this._entry.set_primary_icon(new St.Icon({ style_class:'search-entry-icon', icon_name:'edit-find-symbolic' })); this._entry.clutter_text.connect('text-changed', this._onTextChanged.bind(this)); this._clearIcon = new St.Icon({ style_class: 'search-entry-icon', icon_name: 'edit-clear-symbolic' }); this._iconClickedId = 0; } get text() { return this._entry.get_text(); } resetSize(size) { this._entry.style = 'width: ' + size + 'em'; } reset() { this._entry.text = ''; let text = this._entry.clutter_text; text.set_cursor_visible(true); text.set_selection(0, 0); } grabFocus() { this._entry.grab_key_focus(); } _onTextChanged(se, prop) { const dummy = (this.text.length == 0); this._entry.set_secondary_icon((dummy) ? null : this._clearIcon); if (!dummy && this._iconClickedId == 0) { this._iconClickedId = this._entry.connect('secondary-icon-clicked', this.reset.bind(this)); } this.emit('text-changed'); } }); gpaste-3.42.6/src/gnome-shell/stateSwitch.js000066400000000000000000000013531421222064600207330ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const ExtensionUtils = imports.misc.extensionUtils; const _ = ExtensionUtils.gettext; const { GObject } = imports.gi; const PopupMenu = imports.ui.popupMenu; var GPasteStateSwitch = GObject.registerClass( class GPasteStateSwitch extends PopupMenu.PopupSwitchMenuItem { _init(client) { super._init(_("Track changes"), client.is_active()); this._client = client; this.connect('toggled', this._onToggle.bind(this)); } toggle(state) { if (state !== this.state) super.toggle(state); } _onToggle(state) { this._client.track(this.state, null); } }); gpaste-3.42.6/src/gnome-shell/statusIcon.js000066400000000000000000000010111421222064600205540ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const PopupMenu = imports.ui.popupMenu; const { GObject, St } = imports.gi; var GPasteStatusIcon = GObject.registerClass( class GPasteStatusIcon extends St.BoxLayout { _init() { super._init({ style_class: 'panel-status-menu-box' }); this.add_child(new St.Icon({ icon_name: 'edit-paste-symbolic', style_class: 'system-status-icon' })); } }); gpaste-3.42.6/src/gnome-shell/uiItem.js000066400000000000000000000014011421222064600176570ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2019, Marc-Antoine Perennou */ const { GObject, GPaste, St } = imports.gi; var GPasteUiItem = GObject.registerClass( class GPasteUiItem extends St.Button { _init(menu) { super._init({ x_expand: true, x_align: St.Align.MIDDLE, reactive: true, can_focus: true, track_hover: true, style_class: 'button', child: new St.Icon({ icon_name: 'go-home-symbolic', style_class: 'popup-menu-icon' }) }); this.connect('clicked', function() { menu.itemActivated(); GPaste.util_spawn('Ui'); }); } }); gpaste-3.42.6/src/libgpaste.mk000066400000000000000000000154121421222064600161650ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou libgpaste_la_file = lib/libgpaste.la lib_libgpaste_la_private_headers = \ %D%/libgpaste/gpaste-gdbus-macros.h \ %D%/libgpaste/gpaste-gtk-compat.h \ $(NULL) lib_libgpaste_la_misc_headers = \ %D%/libgpaste/gpaste-gdbus-defines.h \ %D%/libgpaste/gpaste-gsettings-keys.h \ %D%/libgpaste/gpaste-macros.h \ %D%/libgpaste/util/gpaste-util.h \ $(NULL) lib_libgpaste_la_public_headers = \ %D%/libgpaste/gpaste.h \ %D%/libgpaste/client/gpaste-client.h \ %D%/libgpaste/client/gpaste-client-item.h \ %D%/libgpaste/core/gpaste-clipboard.h \ %D%/libgpaste/core/gpaste-clipboards-manager.h \ %D%/libgpaste/core/gpaste-history.h \ %D%/libgpaste/core/gpaste-image-item.h \ %D%/libgpaste/core/gpaste-item.h \ %D%/libgpaste/core/gpaste-password-item.h \ %D%/libgpaste/core/gpaste-text-item.h \ %D%/libgpaste/core/gpaste-item-enums.h \ %D%/libgpaste/core/gpaste-special-atom.h \ %D%/libgpaste/core/gpaste-update-enums.h \ %D%/libgpaste/core/gpaste-uris-item.h \ %D%/libgpaste/daemon/gpaste-bus.h \ %D%/libgpaste/daemon/gpaste-bus-object.h \ %D%/libgpaste/daemon/gpaste-daemon.h \ %D%/libgpaste/daemon/gpaste-search-provider.h \ %D%/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.h \ %D%/libgpaste/io/gpaste-file-backend.h \ %D%/libgpaste/io/gpaste-storage-backend.h \ %D%/libgpaste/keybinder/gpaste-keybinder.h \ %D%/libgpaste/keybinder/gpaste-keybinding.h \ %D%/libgpaste/keybinder/gpaste-make-password-keybinding.h \ %D%/libgpaste/keybinder/gpaste-pop-keybinding.h \ %D%/libgpaste/keybinder/gpaste-show-history-keybinding.h \ %D%/libgpaste/keybinder/gpaste-sync-clipboard-to-primary-keybinding.h \ %D%/libgpaste/keybinder/gpaste-sync-primary-to-clipboard-keybinding.h \ %D%/libgpaste/keybinder/gpaste-ui-keybinding.h \ %D%/libgpaste/keybinder/gpaste-upload-keybinding.h \ %D%/libgpaste/screensaver-client/gpaste-screensaver-client.h \ %D%/libgpaste/settings/gpaste-settings.h \ %D%/libgpaste/settings-ui/gpaste-settings-ui-panel.h \ %D%/libgpaste/settings-ui/gpaste-settings-ui-stack.h \ %D%/libgpaste/settings-ui/gpaste-settings-ui-widget.h \ $(NULL) lib_libgpaste_la_source_files = \ %D%/libgpaste/client/gpaste-client.c \ %D%/libgpaste/client/gpaste-client-item.c \ %D%/libgpaste/core/gpaste-clipboard.c \ %D%/libgpaste/core/gpaste-clipboards-manager.c \ %D%/libgpaste/core/gpaste-history.c \ %D%/libgpaste/core/gpaste-image-item.c \ %D%/libgpaste/core/gpaste-item.c \ %D%/libgpaste/core/gpaste-password-item.c \ %D%/libgpaste/core/gpaste-text-item.c \ %D%/libgpaste/core/gpaste-item-enums.c \ %D%/libgpaste/core/gpaste-special-atom.c \ %D%/libgpaste/core/gpaste-update-enums.c \ %D%/libgpaste/core/gpaste-uris-item.c \ %D%/libgpaste/daemon/gpaste-bus.c \ %D%/libgpaste/daemon/gpaste-bus-object.c \ %D%/libgpaste/daemon/gpaste-daemon.c \ %D%/libgpaste/daemon/gpaste-search-provider.c \ %D%/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.c \ %D%/libgpaste/io/gpaste-file-backend.c \ %D%/libgpaste/io/gpaste-storage-backend.c \ %D%/libgpaste/keybinder/gpaste-keybinder.c \ %D%/libgpaste/keybinder/gpaste-keybinding.c \ %D%/libgpaste/keybinder/gpaste-make-password-keybinding.c \ %D%/libgpaste/keybinder/gpaste-pop-keybinding.c \ %D%/libgpaste/keybinder/gpaste-show-history-keybinding.c \ %D%/libgpaste/keybinder/gpaste-sync-clipboard-to-primary-keybinding.c \ %D%/libgpaste/keybinder/gpaste-sync-primary-to-clipboard-keybinding.c \ %D%/libgpaste/keybinder/gpaste-ui-keybinding.c \ %D%/libgpaste/keybinder/gpaste-upload-keybinding.c \ %D%/libgpaste/screensaver-client/gpaste-screensaver-client.c \ %D%/libgpaste/settings/gpaste-settings.c \ %D%/libgpaste/settings-ui/gpaste-settings-ui-panel.c \ %D%/libgpaste/settings-ui/gpaste-settings-ui-stack.c \ %D%/libgpaste/settings-ui/gpaste-settings-ui-widget.c \ %D%/libgpaste/util/gpaste-util.c \ $(NULL) lib_libgpaste_la_SOURCES = \ $(lib_libgpaste_la_private_headers) \ $(lib_libgpaste_la_source_files) \ $(NULL) lib_libgpaste_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DG_LOG_DOMAIN=\"GPaste\" \ $(NULL) lib_libgpaste_la_CFLAGS = \ $(GDK_CFLAGS) \ $(GDK_PIXBUF_CFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(X11_CFLAGS) \ $(NULL) lib_libgpaste_la_LIBADD = \ $(GDK_LIBS) \ $(GDK_PIXBUF_LIBS) \ $(GLIB_LIBS) \ $(GTK_LIBS) \ $(X11_LIBS) \ $(NULL) libgpaste_symbols_file = $(srcdir)/%D%/libgpaste/libgpaste.sym lib_libgpaste_la_LDFLAGS = \ -version-info $(LIBGPASTE_LT_VERSION) \ -Wl,--version-script=$(libgpaste_symbols_file) \ $(NULL) lib_libgpaste_la_DEPENDENCIES = \ $(libgpaste_symbols_file) \ $(NULL) pkginclude_HEADERS += \ $(lib_libgpaste_la_misc_headers) \ $(lib_libgpaste_la_public_headers) \ $(NULL) lib_LTLIBRARIES += \ $(libgpaste_la_file) \ $(NULL) EXTRA_DIST += \ $(libgpaste_symbols_file) \ $(NULL) gpaste-3.42.6/src/libgpaste/000077500000000000000000000000001421222064600156315ustar00rootroot00000000000000gpaste-3.42.6/src/libgpaste/client/000077500000000000000000000000001421222064600171075ustar00rootroot00000000000000gpaste-3.42.6/src/libgpaste/client/gpaste-client-item.c000066400000000000000000000045351421222064600227550ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include struct _GPasteClientItem { GObject parent_instance; }; typedef struct { gchar *uuid; gchar *value; } GPasteClientItemPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (ClientItem, client_item, G_TYPE_OBJECT) /** * g_paste_client_item_get_uuid: * @self: a #GPasteClientItem instance * * Returns the uuid of the item */ G_PASTE_VISIBLE const gchar * g_paste_client_item_get_uuid (const GPasteClientItem *self) { g_return_val_if_fail (_G_PASTE_IS_CLIENT_ITEM (self), NULL); const GPasteClientItemPrivate *priv = _g_paste_client_item_get_instance_private (self); return priv->uuid;; } /** * g_paste_client_item_get_value: * @self: a #GPasteClientItem instance * * Returns the value of the item */ G_PASTE_VISIBLE const gchar * g_paste_client_item_get_value (const GPasteClientItem *self) { g_return_val_if_fail (_G_PASTE_IS_CLIENT_ITEM (self), NULL); const GPasteClientItemPrivate *priv = _g_paste_client_item_get_instance_private (self); return priv->value; } static void g_paste_client_item_finalize (GObject *object) { GPasteClientItemPrivate *priv = g_paste_client_item_get_instance_private (G_PASTE_CLIENT_ITEM (object)); g_free (priv->uuid); g_free (priv->value); } static void g_paste_client_item_class_init (GPasteClientItemClass *klass) { G_OBJECT_CLASS (klass)->finalize = g_paste_client_item_finalize; } static void g_paste_client_item_init (GPasteClientItem *self G_GNUC_UNUSED) { } /** * g_paste_client_item_new: * @uuid: the uuid of the item * @value: the value of the item * * Create a new instance of #GPasteClientItem * * Returns: (transfer full): a newly allocated #GPasteClientItem * free it with g_object_unref */ G_PASTE_VISIBLE GPasteClientItem * g_paste_client_item_new (const gchar *uuid, const gchar *value) { g_return_val_if_fail (g_uuid_string_is_valid (uuid), NULL); g_return_val_if_fail (g_utf8_validate (value, -1, NULL), NULL); GPasteClientItem *self = g_object_new (G_PASTE_TYPE_CLIENT_ITEM, NULL); GPasteClientItemPrivate *priv = g_paste_client_item_get_instance_private (self); priv->uuid = g_strdup (uuid); priv->value = g_strdup (value); return self; } gpaste-3.42.6/src/libgpaste/client/gpaste-client-item.h000066400000000000000000000014721421222064600227570ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_CLIENT_ITEM_H__ #define __G_PASTE_CLIENT_ITEM_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_CLIENT_ITEM (g_paste_client_item_get_type ()) G_PASTE_FINAL_TYPE (ClientItem, client_item, CLIENT_ITEM, GObject) const gchar *g_paste_client_item_get_uuid (const GPasteClientItem *self); const gchar *g_paste_client_item_get_value (const GPasteClientItem *self); GPasteClientItem *g_paste_client_item_new (const gchar *uuid, const gchar *value); G_END_DECLS #endif /*__G_PASTE_CLIENT_ITEM_H__*/ gpaste-3.42.6/src/libgpaste/client/gpaste-client.c000066400000000000000000002076331421222064600220250ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include "gpaste-gdbus-macros.h" #include struct _GPasteClient { GDBusProxy parent_instance; }; G_PASTE_DEFINE_TYPE (Client, client, G_TYPE_DBUS_PROXY) enum { DELETE_HISTORY, EMPTY_HISTORY, SHOW_HISTORY, SWITCH_HISTORY, TRACKING, UPDATE, LAST_SIGNAL }; static guint64 signals[LAST_SIGNAL] = { 0 }; /*******************/ /* Methods / Async */ /*******************/ #define DBUS_CALL_NO_PARAM_ASYNC(method) \ DBUS_CALL_NO_PARAM_ASYNC_BASE (CLIENT, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAM_ASYNC(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_ASYNC_BASE (CLIENT, param_type, param_name, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAMV_ASYNC(method, paramv) \ DBUS_CALL_ONE_PARAMV_ASYNC_BASE (CLIENT, paramv, G_PASTE_DAEMON_##method) #define DBUS_CALL_TWO_PARAMS_ASYNC(method, params) \ DBUS_CALL_TWO_PARAMS_ASYNC_BASE (CLIENT, params, G_PASTE_DAEMON_##method) #define DBUS_CALL_THREE_PARAMS_ASYNC(method, params) \ DBUS_CALL_THREE_PARAMS_ASYNC_BASE (CLIENT, params, G_PASTE_DAEMON_##method) /****************************/ /* Methods / Async - Finish */ /****************************/ #define DBUS_ASYNC_FINISH_NO_RETURN \ DBUS_ASYNC_FINISH_NO_RETURN_BASE (CLIENT) #define DBUS_ASYNC_FINISH_RET_STRING \ DBUS_ASYNC_FINISH_RET_STRING_BASE (CLIENT) #define DBUS_ASYNC_FINISH_RET_ITEM \ DBUS_ASYNC_FINISH_RET_ITEM_BASE (CLIENT) #define DBUS_ASYNC_FINISH_RET_STRV \ DBUS_ASYNC_FINISH_RET_STRV_BASE (CLIENT) #define DBUS_ASYNC_FINISH_RET_ITEMS \ DBUS_ASYNC_FINISH_RET_ITEMS_BASE (CLIENT) #define DBUS_ASYNC_FINISH_RET_UINT64 \ DBUS_ASYNC_FINISH_RET_UINT64_BASE (CLIENT) /******************/ /* Methods / Sync */ /******************/ #define DBUS_CALL_NO_PARAM_NO_RETURN(method) \ DBUS_CALL_NO_PARAM_NO_RETURN_BASE (CLIENT, G_PASTE_DAEMON_##method) #define DBUS_CALL_NO_PARAM_RET_STRING(method) \ DBUS_CALL_NO_PARAM_RET_STRING_BASE (CLIENT, G_PASTE_DAEMON_##method) #define DBUS_CALL_NO_PARAM_RET_STRV(method) \ DBUS_CALL_NO_PARAM_RET_STRV_BASE (CLIENT, G_PASTE_DAEMON_##method) #define DBUS_CALL_NO_PARAM_RET_ITEMS(method) \ DBUS_CALL_NO_PARAM_RET_ITEMS_BASE (CLIENT, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAM_NO_RETURN(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_NO_RETURN_BASE (CLIENT, param_type, param_name, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAM_RET_UINT64(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_RET_UINT64_BASE (CLIENT, param_type, param_name, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAM_RET_STRING(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_RET_STRING_BASE (CLIENT, param_type, param_name, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAM_RET_STRV(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_RET_STRV_BASE (CLIENT, param_type, param_name, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAM_RET_ITEM(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_RET_ITEM_BASE (CLIENT, param_type, param_name, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAMV_RET_ITEMS(method, paramv) \ DBUS_CALL_ONE_PARAMV_RET_ITEMS_BASE (CLIENT, G_PASTE_DAEMON_##method, paramv) #define DBUS_CALL_TWO_PARAMS_NO_RETURN(method, params) \ DBUS_CALL_TWO_PARAMS_NO_RETURN_BASE (CLIENT, params, G_PASTE_DAEMON_##method) #define DBUS_CALL_THREE_PARAMS_NO_RETURN(method, params) \ DBUS_CALL_THREE_PARAMS_NO_RETURN_BASE (CLIENT, params, G_PASTE_DAEMON_##method) /**************/ /* Properties */ /**************/ #define DBUS_GET_BOOLEAN_PROPERTY(property) \ DBUS_GET_BOOLEAN_PROPERTY_BASE (CLIENT, G_PASTE_DAEMON_PROP_##property) #define DBUS_GET_STRING_PROPERTY(property) \ DBUS_GET_STRING_PROPERTY_BASE (CLIENT, G_PASTE_DAEMON_PROP_##property) /***********/ /* Signals */ /***********/ #define HANDLE_SIGNAL(sig) \ if (g_paste_str_equal (signal_name, G_PASTE_DAEMON_SIG_##sig)) \ { \ g_signal_emit (self, \ signals[sig], \ 0, /* detail */ \ NULL); \ } #define HANDLE_SIGNAL_WITH_DATA(sig, ans_type, get_data) \ if (g_paste_str_equal (signal_name, G_PASTE_DAEMON_SIG_##sig)) \ { \ GVariantIter params_iter; \ g_variant_iter_init (¶ms_iter, parameters); \ g_autoptr (GVariant) variant = g_variant_iter_next_value (¶ms_iter); \ ans_type answer = get_data; \ g_signal_emit (self, \ signals[sig], \ 0, /* detail */ \ answer, \ NULL); \ } #define NEW_SIGNAL(name) \ g_signal_new (name, \ G_PASTE_TYPE_CLIENT, \ G_SIGNAL_RUN_LAST, \ 0, /* class offset */ \ NULL, /* accumulator */ \ NULL, /* accumulator data */ \ g_cclosure_marshal_VOID__VOID, \ G_TYPE_NONE, \ 0) /* number of params */ #define NEW_SIGNAL_WITH_DATA(name, type) \ g_signal_new (name, \ G_PASTE_TYPE_CLIENT, \ G_SIGNAL_RUN_LAST, \ 0, /* class offset */ \ NULL, /* accumulator */ \ NULL, /* accumulator data */ \ g_cclosure_marshal_VOID__##type, \ G_TYPE_NONE, \ 1, \ G_TYPE_##type) #define NEW_SIGNAL_WITH_DATA_GENERIC(name, type) \ g_signal_new (name, \ G_PASTE_TYPE_CLIENT, \ G_SIGNAL_RUN_LAST, \ 0, /* class offset */ \ NULL, /* accumulator */ \ NULL, /* accumulator data */ \ g_cclosure_marshal_generic, \ G_TYPE_NONE, \ 1, \ G_TYPE_##type) /******************/ /* Methods / Sync */ /******************/ /** * g_paste_client_about_sync: * @self: a #GPasteClient instance * @error: a #GError * * Display the about dialog */ G_PASTE_VISIBLE void g_paste_client_about_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_NO_RETURN (ABOUT); } /** * g_paste_client_add_sync: * @self: a #GPasteClient instance * @text: the text to add * @error: a #GError * * Add an item to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_sync (GPasteClient *self, const gchar *text, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (ADD, string, text); } /** * g_paste_client_add_file_sync: * @self: a #GPasteClient instance * @file: the file to add * @error: a #GError * * Add the file contents to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_file_sync (GPasteClient *self, const gchar *file, GError **error) { g_autofree gchar *absolute_path = NULL; if (!g_path_is_absolute (file)) { g_autofree gchar *current_dir = g_get_current_dir (); absolute_path = g_build_filename (current_dir, file, NULL); } DBUS_CALL_ONE_PARAM_NO_RETURN (ADD_FILE, string, ((absolute_path) ? absolute_path : file)); } /** * g_paste_client_add_password_sync: * @self: a #GPasteClient instance * @name: the name to identify the password to add * @password: the password to add * @error: a #GError * * Add the password to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_password_sync (GPasteClient *self, const gchar *name, const gchar *password, GError **error) { GVariant *params[] = { g_variant_new_string (name), g_variant_new_string (password) }; DBUS_CALL_TWO_PARAMS_NO_RETURN (ADD_PASSWORD, params); } /** * g_paste_client_backup_history_sync: * @self: a #GPasteClient instance * @history: the name of the history * @backup: the name of the backup * @error: a #GError * * Backup the current history */ G_PASTE_VISIBLE void g_paste_client_backup_history_sync (GPasteClient *self, const gchar *history, const gchar *backup, GError **error) { GVariant *params[] = { g_variant_new_string (history), g_variant_new_string (backup) }; DBUS_CALL_TWO_PARAMS_NO_RETURN (BACKUP_HISTORY, params); } /** * g_paste_client_delete_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to delete * @error: a #GError * * Delete an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_delete_sync (GPasteClient *self, const gchar *uuid, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (DELETE, string, uuid); } /** * g_paste_client_delete_history_sync: * @self: a #GPasteClient instance * @name: the name of the history to delete * @error: a #GError * * Delete a history */ G_PASTE_VISIBLE void g_paste_client_delete_history_sync (GPasteClient *self, const gchar *name, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (DELETE_HISTORY, string, name); } /** * g_paste_client_delete_password_sync: * @self: a #GPasteClient instance * @name: the name of the password to delete * @error: a #GError * * Delete the password from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_delete_password_sync (GPasteClient *self, const gchar *name, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (DELETE_PASSWORD, string, name); } /** * g_paste_client_empty_history_sync: * @self: a #GPasteClient instance * @name: the name of the history to empty * @error: a #GError * * Empty the history from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_empty_history_sync (GPasteClient *self, const gchar *name, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (EMPTY_HISTORY, string, name); } /** * g_paste_client_get_element_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to get * @error: a #GError * * Get an item from the #GPasteDaemon * * Returns: (transfer full): a newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_client_get_element_sync (GPasteClient *self, const gchar *uuid, GError **error) { DBUS_CALL_ONE_PARAM_RET_STRING (GET_ELEMENT, string, uuid); } /** * g_paste_client_get_element_at_index_sync: * @self: a #GPasteClient instance * @index: the index of the element we want to get * @error: a #GError * * Get an item from the #GPasteDaemon * * Returns: (transfer full): a new #GPasteClientItem */ G_PASTE_VISIBLE GPasteClientItem * g_paste_client_get_element_at_index_sync (GPasteClient *self, guint64 index, GError **error) { DBUS_CALL_ONE_PARAM_RET_ITEM (GET_ELEMENT_AT_INDEX, uint64, index); } static gchar * _g_paste_client_get_element_kind_sync (GPasteClient *self, const gchar *uuid, GError **error) { DBUS_CALL_ONE_PARAM_RET_STRING (GET_ELEMENT_KIND, string, uuid); } /** * g_paste_client_get_element_kind_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to get * @error: a #GError * * Get the kind of an item from the #GPasteDaemon * * Returns: The #GPasteItemKind */ G_PASTE_VISIBLE GPasteItemKind g_paste_client_get_element_kind_sync (GPasteClient *self, const gchar *uuid, GError **error) { g_autofree gchar *kind = _g_paste_client_get_element_kind_sync (self, uuid, error); GEnumValue *k = (kind) ? g_enum_get_value_by_nick (g_type_class_peek (G_PASTE_TYPE_ITEM_KIND), kind) : NULL; return (k) ? k->value : G_PASTE_ITEM_KIND_INVALID; } /** * g_paste_client_get_elements_sync: * @self: a #GPasteClient instance * @uuids: (array length=n_uuids): the uuids of the elements we want to get * @n_uuids: the number of uuids * @error: a #GError * * Get some items from the #GPasteDaemon * * Returns: (element-type GPasteClientItem) (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GList * g_paste_client_get_elements_sync (GPasteClient *self, const gchar **uuids, guint64 n_uuids, GError **error) { GVariant *param = g_variant_new_strv (uuids, n_uuids); DBUS_CALL_ONE_PARAMV_RET_ITEMS (GET_ELEMENTS, param); } /** * g_paste_client_get_history_sync: * @self: a #GPasteClient instance * @error: a #GError * * Get the history from the #GPasteDaemon * * Returns: (element-type GPasteClientItem) (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GList * g_paste_client_get_history_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_RET_ITEMS (GET_HISTORY); } /** * g_paste_client_get_history_name_sync: * @self: a #GPasteClient instance * @error: a #GError * * Get the name of the history from the #GPasteDaemon * * Returns: (transfer full): a newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_client_get_history_name_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_RET_STRING (GET_HISTORY_NAME); } /** * g_paste_client_get_history_size_sync: * @self: a #GPasteClient instance * @name: the name of the history * @error: a #GError * * Get the history size from the #GPasteDaemon * * Returns: the size of the history */ G_PASTE_VISIBLE guint64 g_paste_client_get_history_size_sync (GPasteClient *self, const gchar *name, GError **error) { DBUS_CALL_ONE_PARAM_RET_UINT64 (GET_HISTORY_SIZE, string, name); } /** * g_paste_client_get_raw_element_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to get * @error: a #GError * * Get an item from the #GPasteDaemon * * Returns: (transfer full): a newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_client_get_raw_element_sync (GPasteClient *self, const gchar *uuid, GError **error) { DBUS_CALL_ONE_PARAM_RET_STRING (GET_RAW_ELEMENT, string, uuid); } /** * g_paste_client_get_raw_history_sync: * @self: a #GPasteClient instance * @error: a #GError * * Get the history from the #GPasteDaemon * * Returns: (element-type GPasteClientItem) (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GList * g_paste_client_get_raw_history_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_RET_ITEMS (GET_RAW_HISTORY); } /** * g_paste_client_list_histories_sync: * @self: a #GPasteClient instance * @error: a #GError * * List all available hisotries * * Returns: (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GStrv g_paste_client_list_histories_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_RET_STRV (LIST_HISTORIES); } /** * g_paste_client_merge_sync: * @self: a #GPasteClient instance * @decoration: (nullable): the decoration to apply to each entry * @separator: (nullable): the separator to add between each entry * @uuids: (array length=n_uuids): the uuids of the elements we want to get * @n_uuids: the number of uuids * @error: a #GError * * Merge some history entries * * If decoration is " and separator is , and entries are foo bar baz * result will be "foo","bar","baz" */ G_PASTE_VISIBLE void g_paste_client_merge_sync (GPasteClient *self, const gchar *decoration, const gchar *separator, const gchar **uuids, guint64 n_uuids, GError **error) { GVariant *params[] = { g_variant_new_string (decoration ? decoration : ""), g_variant_new_string (separator ? separator : ""), g_variant_new_strv (uuids, n_uuids) }; DBUS_CALL_THREE_PARAMS_NO_RETURN (MERGE, params); } /** * g_paste_client_on_extension_state_changed_sync: * @self: a #GPasteClient instance * @state: the new state of the extension * @error: a #GError * * Call this when the extension changes its state */ G_PASTE_VISIBLE void g_paste_client_on_extension_state_changed_sync (GPasteClient *self, gboolean state, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (ON_EXTENSION_STATE_CHANGED, boolean, state); } /** * g_paste_client_reexecute_sync: * @self: a #GPasteClient instance * @error: a #GError * * Reexecute the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_reexecute_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_NO_RETURN (REEXECUTE); } /** * g_paste_client_rename_password_sync: * @self: a #GPasteClient instance * @old_name: the name of the password to rename * @new_name: the new name to give it * @error: a #GError * * Rename the password in the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_rename_password_sync (GPasteClient *self, const gchar *old_name, const gchar *new_name, GError **error) { GVariant *params[] = { g_variant_new_string (old_name), g_variant_new_string (new_name) }; DBUS_CALL_TWO_PARAMS_NO_RETURN (RENAME_PASSWORD, params); } /** * g_paste_client_replace_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to replace * @contents: the replacement contents * @error: a #GError * * Replace the contents of an item */ G_PASTE_VISIBLE void g_paste_client_replace_sync (GPasteClient *self, const gchar *uuid, const gchar *contents, GError **error) { GVariant *params[] = { g_variant_new_string (uuid), g_variant_new_string (contents) }; DBUS_CALL_TWO_PARAMS_NO_RETURN (REPLACE, params); } /** * g_paste_client_search_sync: * @self: a #GPasteClient instance * @pattern: the pattern to look for in history * @error: a #GError * * Search for items matching @pattern in history * * Returns: (transfer full): The uuids of the matching items */ G_PASTE_VISIBLE GStrv g_paste_client_search_sync (GPasteClient *self, const gchar *pattern, GError **error) { DBUS_CALL_ONE_PARAM_RET_STRV (SEARCH, string, pattern); } /** * g_paste_client_select_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to select * @error: a #GError * * Select an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_select_sync (GPasteClient *self, const gchar *uuid, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (SELECT, string, uuid); } /** * g_paste_client_set_password_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to set as password * @name: the name to identify the password * @error: a #GError * * Set the item as password */ G_PASTE_VISIBLE void g_paste_client_set_password_sync (GPasteClient *self, const gchar *uuid, const gchar *name, GError **error) { GVariant *params[] = { g_variant_new_string (uuid), g_variant_new_string (name) }; DBUS_CALL_TWO_PARAMS_NO_RETURN (SET_PASSWORD, params); } /** * g_paste_client_show_history_sync: * @self: a #GPasteClient instance * @error: a #GError * * Emit the ShowHistory signal */ G_PASTE_VISIBLE void g_paste_client_show_history_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_NO_RETURN (SHOW_HISTORY); } /** * g_paste_client_switch_history_sync: * @self: a #GPasteClient instance * @name: the name of the history to switch to * @error: a #GError * * Switch to another history */ G_PASTE_VISIBLE void g_paste_client_switch_history_sync (GPasteClient *self, const gchar *name, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (SWITCH_HISTORY, string, name); } /** * g_paste_client_track_sync: * @self: a #GPasteClient instance * @state: the new tracking state of the #GPasteDaemon * @error: a #GError * * Change the tracking state of the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_track_sync (GPasteClient *self, gboolean state, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (TRACK, boolean, state); } /** * g_paste_client_upload_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to upload * @error: a #GError * * Upload an item to a pastebin service */ G_PASTE_VISIBLE void g_paste_client_upload_sync (GPasteClient *self, const gchar *uuid, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (UPLOAD, string, uuid); } /*******************/ /* Methods / Async */ /*******************/ /** * g_paste_client_about: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Display the about dialog */ G_PASTE_VISIBLE void g_paste_client_about (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (ABOUT); } /** * g_paste_client_add: * @self: a #GPasteClient instance * @text: the text to add * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Add an item to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add (GPasteClient *self, const gchar *text, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (ADD, string, text); } /** * g_paste_client_add_file: * @self: a #GPasteClient instance * @file: the file to add * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Add the file contents to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_file (GPasteClient *self, const gchar *file, GAsyncReadyCallback callback, gpointer user_data) { g_autofree gchar *absolute_path = NULL; if (!g_path_is_absolute (file)) { g_autofree gchar *current_dir = g_get_current_dir (); absolute_path = g_build_filename (current_dir, file, NULL); } DBUS_CALL_ONE_PARAM_ASYNC (ADD_FILE, string, ((absolute_path) ? absolute_path : file)); } /** * g_paste_client_add_password: * @self: a #GPasteClient instance * @name: the name to identify the password to add * @password: the password to add * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Add the password to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_password (GPasteClient *self, const gchar *name, const gchar *password, GAsyncReadyCallback callback, gpointer user_data) { GVariant *params[] = { g_variant_new_string (name), g_variant_new_string (password) }; DBUS_CALL_TWO_PARAMS_ASYNC (ADD_PASSWORD, params); } /** * g_paste_client_backup_history: * @self: a #GPasteClient instance * @history: the name of the history * @backup: the name of the backup * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Backup the current history */ G_PASTE_VISIBLE void g_paste_client_backup_history (GPasteClient *self, const gchar *history, const gchar *backup, GAsyncReadyCallback callback, gpointer user_data) { GVariant *params[] = { g_variant_new_string (history), g_variant_new_string (backup) }; DBUS_CALL_TWO_PARAMS_ASYNC (BACKUP_HISTORY, params); } /** * g_paste_client_delete: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to delete * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Delete an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_delete (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (DELETE, string, uuid); } /** * g_paste_client_delete_history: * @self: a #GPasteClient instance * @name: the name of the history to delete * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Delete a history */ G_PASTE_VISIBLE void g_paste_client_delete_history (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (DELETE_HISTORY, string, name); } /** * g_paste_client_delete_password: * @self: a #GPasteClient instance * @name: the name of the password to delete * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: The data to pass to @callback. * * Delete the password from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_delete_password (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (DELETE_PASSWORD, string, name); } /** * g_paste_client_empty_history: * @self: a #GPasteClient instance * @name: the name of the history to empty * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Empty the history from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_empty_history (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (EMPTY_HISTORY, string, name); } /** * g_paste_client_get_element: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to get * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_element (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (GET_ELEMENT, string, uuid); } /** * g_paste_client_get_element_at_index: * @self: a #GPasteClient instance * @index: the index of the element we want to get * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_element_at_index (GPasteClient *self, guint64 index, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (GET_ELEMENT_AT_INDEX, uint64, index); } /** * g_paste_client_get_element_kind: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to get * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get the kind of an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_element_kind (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (GET_ELEMENT_KIND, string, uuid); } /** * g_paste_client_get_elements: * @self: a #GPasteClient instance * @uuids: (array length=n_uuids): the uuids of the elements we want to get * @n_uuids: the number of uuids * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get some items from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_elements (GPasteClient *self, const gchar **uuids, guint64 n_uuids, GAsyncReadyCallback callback, gpointer user_data) { GVariant *param = g_variant_new_strv (uuids, n_uuids); DBUS_CALL_ONE_PARAMV_ASYNC (GET_ELEMENTS, param); } /** * g_paste_client_get_history: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get the history from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_history (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (GET_HISTORY); } /** * g_paste_client_get_history_name: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get the name of the history from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_history_name (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (GET_HISTORY_NAME); } /** * g_paste_client_get_history_size: * @self: a #GPasteClient instance * @name: the name of the history * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get the history isize from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_history_size (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (GET_HISTORY_SIZE, string, name); } /** * g_paste_client_get_raw_element: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to get * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_raw_element (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (GET_RAW_ELEMENT, string, uuid); } /** * g_paste_client_get_raw_history: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get the history from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_raw_history (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (GET_RAW_HISTORY); } /** * g_paste_client_list_histories: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * List all available hisotries */ G_PASTE_VISIBLE void g_paste_client_list_histories (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (LIST_HISTORIES); } /** * g_paste_client_merge: * @self: a #GPasteClient instance * @decoration: (nullable): the decoration to apply to each entry * @separator: (nullable): the separator to add between each entry * @uuids: (array length=n_uuids): the uuids of the elements we want to get * @n_uuids: the number of uuids * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Merge some history entries * * If decoration is " and separator is , and entries are foo bar baz * result will be "foo","bar","baz" */ G_PASTE_VISIBLE void g_paste_client_merge (GPasteClient *self, const gchar *decoration, const gchar *separator, const gchar **uuids, guint64 n_uuids, GAsyncReadyCallback callback, gpointer user_data) { GVariant *params[] = { g_variant_new_string (decoration ? decoration : ""), g_variant_new_string (separator ? separator : ""), g_variant_new_strv (uuids, n_uuids) }; DBUS_CALL_THREE_PARAMS_ASYNC (MERGE, params); } /** * g_paste_client_on_extension_state_changed: * @self: a #GPasteClient instance * @state: the new state of the extension * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Call this when the extension changes its state */ G_PASTE_VISIBLE void g_paste_client_on_extension_state_changed (GPasteClient *self, gboolean state, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (ON_EXTENSION_STATE_CHANGED, boolean, state); } /** * g_paste_client_reexecute: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Reexecute the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_reexecute (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (REEXECUTE); } /** * g_paste_client_rename_password: * @self: a #GPasteClient instance * @old_name: the old name of the password to rename * @new_name: the new name to give it * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: The data to pass to @callback. * * Rename the password in the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_rename_password (GPasteClient *self, const gchar *old_name, const gchar *new_name, GAsyncReadyCallback callback, gpointer user_data) { GVariant *params[] = { g_variant_new_string (old_name), g_variant_new_string (new_name) }; DBUS_CALL_TWO_PARAMS_ASYNC (RENAME_PASSWORD, params); } /** * g_paste_client_replace: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to replace * @contents: the replacement contents * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: The data to pass to @callback. * * Replace the contents of an item */ G_PASTE_VISIBLE void g_paste_client_replace (GPasteClient *self, const gchar *uuid, const gchar *contents, GAsyncReadyCallback callback, gpointer user_data) { GVariant *params[] = { g_variant_new_string (uuid), g_variant_new_string (contents) }; DBUS_CALL_TWO_PARAMS_ASYNC (REPLACE, params); } /** * g_paste_client_search: * @self: a #GPasteClient instance * @pattern: the pattern to look for in history * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Search for items matching @pattern in history */ G_PASTE_VISIBLE void g_paste_client_search (GPasteClient *self, const gchar *pattern, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (SEARCH, string, pattern); } /** * g_paste_client_select: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to select * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Select an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_select (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (SELECT, string, uuid); } /** * g_paste_client_set_password: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to set as password * @name: the name to identify the password * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: The data to pass to @callback. * * Set the item as password */ G_PASTE_VISIBLE void g_paste_client_set_password (GPasteClient *self, const gchar *uuid, const gchar *name, GAsyncReadyCallback callback, gpointer user_data) { GVariant *params[] = { g_variant_new_string (uuid), g_variant_new_string (name) }; DBUS_CALL_TWO_PARAMS_ASYNC (SET_PASSWORD, params); } /** * g_paste_client_show_history: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Emit the ShowHistory signal */ G_PASTE_VISIBLE void g_paste_client_show_history (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (SHOW_HISTORY); } /** * g_paste_client_switch_history: * @self: a #GPasteClient instance * @name: the name of the history to switch to * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable):The data to pass to @callback. * * Switch to another history */ G_PASTE_VISIBLE void g_paste_client_switch_history (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (SWITCH_HISTORY, string, name); } /** * g_paste_client_track: * @self: a #GPasteClient instance * @state: the new tracking state of the #GPasteDaemon * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Change the tracking state of the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_track (GPasteClient *self, gboolean state, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (TRACK, boolean, state); } /** * g_paste_client_upload: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to upload * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Upload an item to a pastebin service */ G_PASTE_VISIBLE void g_paste_client_upload (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (UPLOAD, string, uuid); } /****************************/ /* Methods / Async - Finish */ /****************************/ /** * g_paste_client_about_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Display the about dialog */ G_PASTE_VISIBLE void g_paste_client_about_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_add_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Add an item to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_add_file_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Add the file contents to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_file_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_add_password_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Add the password to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_password_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_backup_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Backup the current history */ G_PASTE_VISIBLE void g_paste_client_backup_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_delete_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Delete an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_delete_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_delete_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Delete a history */ G_PASTE_VISIBLE void g_paste_client_delete_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_delete_password_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Delete the password from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_delete_password_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_empty_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Empty the history from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_empty_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_get_element_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get an item from the #GPasteDaemon * * Returns: (transfer full): a newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_client_get_element_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_STRING; } /** * g_paste_client_get_element_at_index_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get an item from the #GPasteDaemon * * Returns: (transfer full): a new #GPasteClientItem */ G_PASTE_VISIBLE GPasteClientItem * g_paste_client_get_element_at_index_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_ITEM; } static gchar * _g_paste_client_get_element_kind_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_STRING; } /** * g_paste_client_get_element_kind_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get this kind of an item from the #GPasteDaemon * * Returns: The #GPasteItemKind */ G_PASTE_VISIBLE GPasteItemKind g_paste_client_get_element_kind_finish (GPasteClient *self, GAsyncResult *result, GError **error) { g_autofree gchar *kind = _g_paste_client_get_element_kind_finish (self, result, error); GEnumValue *k = (kind) ? g_enum_get_value_by_nick (g_type_class_peek (G_PASTE_TYPE_ITEM_KIND), kind) : NULL; return (k) ? k->value : G_PASTE_ITEM_KIND_INVALID; } /** * g_paste_client_get_elements_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get some items from the #GPasteDaemon * * Returns: (element-type GPasteClientItem) (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GList * g_paste_client_get_elements_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_ITEMS; } /** * g_paste_client_get_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get the history from the #GPasteDaemon * * Returns: (element-type GPasteClientItem) (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GList * g_paste_client_get_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_ITEMS; } /** * g_paste_client_get_history_name_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get the name of the history from the #GPasteDaemon * * Returns: (transfer full): a newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_client_get_history_name_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_STRING; } /** * g_paste_client_get_history_size_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get the history size from the #GPasteDaemon * * Returns: the size of the history */ G_PASTE_VISIBLE guint64 g_paste_client_get_history_size_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_UINT64; } /** * g_paste_client_get_raw_element_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get an item from the #GPasteDaemon * * Returns: (transfer full): a newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_client_get_raw_element_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_STRING; } /** * g_paste_client_get_raw_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get the history from the #GPasteDaemon * * Returns: (element-type GPasteClientItem) (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GList * g_paste_client_get_raw_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_ITEMS; } /** * g_paste_client_list_histories_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * List all available hisotries * * Returns: (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GStrv g_paste_client_list_histories_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_STRV; } /** * g_paste_client_merge_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Merge some history entries */ G_PASTE_VISIBLE void g_paste_client_merge_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_on_extension_state_changed_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Call this when the extension changes its state */ G_PASTE_VISIBLE void g_paste_client_on_extension_state_changed_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_reexecute_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Reexecute the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_reexecute_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_rename_password_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Rename the password in the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_rename_password_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_replace_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Replace the contents of an item */ G_PASTE_VISIBLE void g_paste_client_replace_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_search_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Search for items matching @pattern in history * * Returns: (transfer full): The indexes of the matching items */ G_PASTE_VISIBLE GStrv g_paste_client_search_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_STRV; } /** * g_paste_client_select_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Select an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_select_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_set_password_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Set the item as password */ G_PASTE_VISIBLE void g_paste_client_set_password_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_show_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Emit the ShowHistory signal */ G_PASTE_VISIBLE void g_paste_client_show_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_switch_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Switch to another history */ G_PASTE_VISIBLE void g_paste_client_switch_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_track_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Change the tracking state of the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_track_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_upload_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Upload an item to a pastebin service */ G_PASTE_VISIBLE void g_paste_client_upload_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /**************/ /* Properties */ /**************/ /** * g_paste_client_is_active: * @self: a #GPasteClient instance * * Check if the daemon is active * * Returns: whether the daemon is active or not */ G_PASTE_VISIBLE gboolean g_paste_client_is_active (GPasteClient *self) { DBUS_GET_BOOLEAN_PROPERTY (ACTIVE); } /** * g_paste_client_get_version: * @self: a #GPasteClient instance * * Get the version of the running gpaste daemon * * Returns: the version of the daemon */ G_PASTE_VISIBLE gchar * g_paste_client_get_version (GPasteClient *self) { DBUS_GET_STRING_PROPERTY (VERSION); } static void g_paste_client_g_signal (GDBusProxy *proxy, const gchar *sender_name G_GNUC_UNUSED, const gchar *signal_name, GVariant *parameters) { GPasteClient *self = G_PASTE_CLIENT (proxy); HANDLE_SIGNAL (SHOW_HISTORY) else HANDLE_SIGNAL_WITH_DATA (DELETE_HISTORY, const gchar *, g_variant_get_string (variant, NULL)) else HANDLE_SIGNAL_WITH_DATA (EMPTY_HISTORY, const gchar *, g_variant_get_string (variant, NULL)) else HANDLE_SIGNAL_WITH_DATA (SWITCH_HISTORY, const gchar *, g_variant_get_string (variant, NULL)) else if (g_paste_str_equal (signal_name, G_PASTE_DAEMON_SIG_UPDATE)) { GVariantIter params_iter; g_variant_iter_init (¶ms_iter, parameters); g_autoptr (GVariant) v1 = g_variant_iter_next_value (¶ms_iter); g_autoptr (GVariant) v2 = g_variant_iter_next_value (¶ms_iter); g_autoptr (GVariant) v3 = g_variant_iter_next_value (¶ms_iter); g_signal_emit (self, signals[UPDATE], 0, /* detail */ g_enum_get_value_by_nick (g_type_class_peek (G_PASTE_TYPE_UPDATE_ACTION), g_variant_get_string (v1, NULL))->value, g_enum_get_value_by_nick (g_type_class_peek (G_PASTE_TYPE_UPDATE_TARGET), g_variant_get_string (v2, NULL))->value, g_variant_get_uint64 (v3), NULL); } } static void g_paste_client_g_properties_changed (GDBusProxy *proxy, GVariant *changed_properties, const gchar * const *invalidated_properties G_GNUC_UNUSED) { GPasteClient *self = G_PASTE_CLIENT (proxy); GVariantDict dict; g_variant_dict_init (&dict, changed_properties); if (g_variant_dict_contains (&dict, G_PASTE_DAEMON_PROP_ACTIVE)) { g_autoptr (GVariant) v = g_dbus_proxy_get_cached_property (proxy, G_PASTE_DAEMON_PROP_ACTIVE); g_signal_emit (self, signals[TRACKING], 0, /* detail */ g_variant_get_boolean (v), NULL); } } static void g_paste_client_class_init (GPasteClientClass *klass) { GDBusProxyClass *proxy_class = G_DBUS_PROXY_CLASS (klass); proxy_class->g_signal = g_paste_client_g_signal; proxy_class->g_properties_changed = g_paste_client_g_properties_changed; /** * GPasteClient::delete-history: * @client: the object on which the signal was emitted * @history: the name of the history we deleted * * The "delete-history" signal is emitted when we delete * a history. */ signals[DELETE_HISTORY] = NEW_SIGNAL_WITH_DATA ("delete-history", STRING); /** * GPasteClient::empty-history: * @client: the object on which the signal was emitted * @history: the name of the history we emptied * * The "empty-history" signal is emitted when we empty * a history. */ signals[EMPTY_HISTORY] = NEW_SIGNAL_WITH_DATA ("empty-history", STRING); /** * GPasteClient::show-history: * @client: the object on which the signal was emitted * * The "show-history" signal is emitted when we switch * from a history to another. */ signals[SHOW_HISTORY] = NEW_SIGNAL ("show-history"); /** * GPasteClient::switch-history: * @client: the object on which the signal was emitted * @history: the name of the history we switch to * * The "switch-history" signal is emitted when we switch * from a history to another. */ signals[SWITCH_HISTORY] = NEW_SIGNAL_WITH_DATA ("switch-history", STRING); /** * GPasteClient::track: * @client: the object on which the signal was emitted * @tracking_state: whether we're now tracking or not * * The "tracking" signal is emitted when the daemon starts or stops tracking * clipboard changes. */ signals[TRACKING] = NEW_SIGNAL_WITH_DATA ("tracking", BOOLEAN); /** * GPasteClient::update: * @client: the object on which the signal was emitted * @action: the kind of update * @target: the items which need updating * @index: the index of the item, when the target is POSITION * * The "update" signal is emitted whenever anything changed * in the history (something was added, removed, selected, replaced...). */ signals[UPDATE] = g_signal_new ("update", G_PASTE_TYPE_CLIENT, G_SIGNAL_RUN_LAST, 0, /* class offset */ NULL, /* accumulator */ NULL, /* accumulator data */ g_cclosure_marshal_generic, G_TYPE_NONE, 3, /* number of params */ G_PASTE_TYPE_UPDATE_ACTION, G_PASTE_TYPE_UPDATE_TARGET, G_TYPE_UINT64); } static void g_paste_client_init (GPasteClient *self) { GDBusProxy *proxy = G_DBUS_PROXY (self); g_autoptr (GDBusNodeInfo) g_paste_daemon_dbus_info = g_dbus_node_info_new_for_xml (G_PASTE_DAEMON_INTERFACE, NULL); /* Error */ g_dbus_proxy_set_interface_info (proxy, g_paste_daemon_dbus_info->interfaces[0]); } /** * g_paste_client_new_sync: * @error: Return location for error or %NULL. * * Create a new instance of #GPasteClient * * Returns: (transfer full): a newly allocated #GPasteClient * free it with g_object_unref */ G_PASTE_VISIBLE GPasteClient * g_paste_client_new_sync (GError **error) { CUSTOM_PROXY_NEW (CLIENT, DAEMON, G_PASTE_BUS_NAME); } /** * g_paste_client_new: * @callback: Callback function to invoke when the proxy is ready. * @user_data: User data to pass to @callback. * * Create a new instance of #GPasteClient */ G_PASTE_VISIBLE void g_paste_client_new (GAsyncReadyCallback callback, gpointer user_data) { CUSTOM_PROXY_NEW_ASYNC (CLIENT, DAEMON, G_PASTE_BUS_NAME); } /** * g_paste_client_new_finish: * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to the async ctor. * @error: Return location for error or %NULL. * * Create a new instance of #GPasteClient * * Returns: (transfer full): a newly allocated #GPasteClient * free it with g_object_unref */ G_PASTE_VISIBLE GPasteClient * g_paste_client_new_finish (GAsyncResult *result, GError **error) { CUSTOM_PROXY_NEW_FINISH (CLIENT); } gpaste-3.42.6/src/libgpaste/client/gpaste-client.h000066400000000000000000000627151421222064600220320ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_CLIENT_H__ #define __G_PASTE_CLIENT_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_CLIENT (g_paste_client_get_type ()) G_PASTE_FINAL_TYPE (Client, client, CLIENT, GDBusProxy) /*******************/ /* Methods / Sync */ /*******************/ void g_paste_client_about_sync (GPasteClient *self, GError **error); void g_paste_client_add_sync (GPasteClient *self, const gchar *text, GError **error); void g_paste_client_add_file_sync (GPasteClient *self, const gchar *file, GError **error); void g_paste_client_add_password_sync (GPasteClient *self, const gchar *name, const gchar *password, GError **error); void g_paste_client_backup_history_sync (GPasteClient *self, const gchar *history, const gchar *backup, GError **error); void g_paste_client_delete_sync (GPasteClient *self, const gchar *uuid, GError **error); void g_paste_client_delete_history_sync (GPasteClient *self, const gchar *name, GError **error); void g_paste_client_delete_password_sync (GPasteClient *self, const gchar *name, GError **error); void g_paste_client_empty_history_sync (GPasteClient *self, const gchar *name, GError **error); gchar *g_paste_client_get_element_sync (GPasteClient *self, const gchar *uuid, GError **error); GList *g_paste_client_get_elements_sync (GPasteClient *self, const gchar **uuids, guint64 n_uuids, GError **error); GList *g_paste_client_get_history_sync (GPasteClient *self, GError **error); gchar *g_paste_client_get_history_name_sync (GPasteClient *self, GError **error); guint64 g_paste_client_get_history_size_sync (GPasteClient *self, const gchar *name, GError **error); gchar *g_paste_client_get_raw_element_sync (GPasteClient *self, const gchar *uuid, GError **error); GList *g_paste_client_get_raw_history_sync (GPasteClient *self, GError **error); GStrv g_paste_client_list_histories_sync (GPasteClient *self, GError **error); void g_paste_client_merge_sync (GPasteClient *self, const gchar *decoration, const gchar *separator, const gchar **uuids, guint64 n_uuids, GError **error); void g_paste_client_on_extension_state_changed_sync (GPasteClient *self, gboolean state, GError **error); void g_paste_client_reexecute_sync (GPasteClient *self, GError **error); void g_paste_client_rename_password_sync (GPasteClient *self, const gchar *old_name, const gchar *new_name, GError **error); void g_paste_client_replace_sync (GPasteClient *self, const gchar *uuid, const gchar *contents, GError **error); GStrv g_paste_client_search_sync (GPasteClient *self, const gchar *pattern, GError **error); void g_paste_client_select_sync (GPasteClient *self, const gchar *uuid, GError **error); void g_paste_client_set_password_sync (GPasteClient *self, const gchar *uuid, const gchar *name, GError **error); void g_paste_client_show_history_sync (GPasteClient *self, GError **error); void g_paste_client_switch_history_sync (GPasteClient *self, const gchar *name, GError **error); void g_paste_client_track_sync (GPasteClient *self, gboolean state, GError **error); void g_paste_client_upload_sync (GPasteClient *self, const gchar *uuid, GError **error); GPasteClientItem *g_paste_client_get_element_at_index_sync (GPasteClient *self, guint64 index, GError **error); GPasteItemKind g_paste_client_get_element_kind_sync (GPasteClient *self, const gchar *uuid, GError **error); /*******************/ /* Methods / Async */ /*******************/ void g_paste_client_about (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_add (GPasteClient *self, const gchar *text, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_add_file (GPasteClient *self, const gchar *file, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_add_password (GPasteClient *self, const gchar *name, const gchar *password, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_backup_history (GPasteClient *self, const gchar *history, const gchar *backup, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_delete (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_delete_history (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_delete_password (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_empty_history (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_element (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_element_at_index (GPasteClient *self, guint64 index, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_element_kind (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_elements (GPasteClient *self, const gchar **uuids, guint64 n_uuids, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_history (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_history_name (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_history_size (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_raw_element (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_raw_history (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_list_histories (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_merge (GPasteClient *self, const gchar *decoration, const gchar *separator, const gchar **uuids, guint64 n_uuids, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_on_extension_state_changed (GPasteClient *self, gboolean state, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_reexecute (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_rename_password (GPasteClient *self, const gchar *old_name, const gchar *new_name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_replace (GPasteClient *self, const gchar *uuid, const gchar *contents, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_search (GPasteClient *self, const gchar *pattern, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_select (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_set_password (GPasteClient *self, const gchar *uuid, const gchar *name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_show_history (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_switch_history (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_track (GPasteClient *self, gboolean state, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_upload (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data); /****************************/ /* Methods / Async - Finish */ /****************************/ void g_paste_client_about_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_add_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_add_file_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_add_password_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_backup_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_delete_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_delete_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_delete_password_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_empty_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); gchar *g_paste_client_get_element_finish (GPasteClient *self, GAsyncResult *result, GError **error); GList *g_paste_client_get_elements_finish (GPasteClient *self, GAsyncResult *result, GError **error); GList *g_paste_client_get_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); gchar *g_paste_client_get_history_name_finish (GPasteClient *self, GAsyncResult *result, GError **error); guint64 g_paste_client_get_history_size_finish (GPasteClient *self, GAsyncResult *result, GError **error); gchar *g_paste_client_get_raw_element_finish (GPasteClient *self, GAsyncResult *result, GError **error); GList *g_paste_client_get_raw_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); GStrv g_paste_client_list_histories_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_merge_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_on_extension_state_changed_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_reexecute_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_rename_password_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_replace_finish (GPasteClient *self, GAsyncResult *result, GError **error); GStrv g_paste_client_search_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_select_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_set_password_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_show_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_switch_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_track_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_upload_finish (GPasteClient *self, GAsyncResult *result, GError **error); GPasteClientItem *g_paste_client_get_element_at_index_finish (GPasteClient *self, GAsyncResult *result, GError **error); GPasteItemKind g_paste_client_get_element_kind_finish (GPasteClient *self, GAsyncResult *result, GError **error); /**************/ /* Properties */ /**************/ gboolean g_paste_client_is_active (GPasteClient *self); gchar *g_paste_client_get_version (GPasteClient *self); /****************/ /* Constructors */ /****************/ GPasteClient *g_paste_client_new_sync (GError **error); void g_paste_client_new (GAsyncReadyCallback callback, gpointer user_data); GPasteClient *g_paste_client_new_finish (GAsyncResult *result, GError **error); G_END_DECLS #endif /*__G_PASTE_CLIENT_H__*/ gpaste-3.42.6/src/libgpaste/core/000077500000000000000000000000001421222064600165615ustar00rootroot00000000000000gpaste-3.42.6/src/libgpaste/core/gpaste-clipboard.c000066400000000000000000000625171421222064600221600ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include #include #include struct _GPasteClipboard { GObject parent_instance; }; enum { C_OWNER_CHANGE, C_LAST_SIGNAL }; typedef struct { GtkClipboard *real; GPasteSettings *settings; gchar *text; gchar *image_checksum; guint64 c_signals[C_LAST_SIGNAL]; } GPasteClipboardPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (Clipboard, clipboard, G_TYPE_OBJECT) enum { OWNER_CHANGE, LAST_SIGNAL }; static guint64 signals[LAST_SIGNAL] = { 0 }; static void g_paste_clipboard_bootstrap_finish (GPasteClipboard *self, GPasteHistory *history) { const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (self); if (!priv->text && !priv->image_checksum) { const GList *h = g_paste_history_get_history (history); if (h) { GPasteItem *item = h->data; if (!g_paste_clipboard_select_item (self, item)) g_paste_history_remove (history, 0); } } } static void g_paste_clipboard_bootstrap_finish_text (GPasteClipboard *self, const gchar *text G_GNUC_UNUSED, gpointer user_data) { g_paste_clipboard_bootstrap_finish (self, user_data); } static void g_paste_clipboard_bootstrap_finish_image (GPasteClipboard *self, GdkPixbuf *image, gpointer user_data) { g_object_unref (image); g_paste_clipboard_bootstrap_finish (self, user_data); } /** * g_paste_clipboard_bootstrap: * @self: a #GPasteClipboard instance * @history: a #GPasteHistory instance * * Bootstrap a #GPasteClipboard with an initial value */ G_PASTE_VISIBLE void g_paste_clipboard_bootstrap (GPasteClipboard *self, GPasteHistory *history) { g_return_if_fail (_G_PASTE_IS_CLIPBOARD (self)); g_return_if_fail (_G_PASTE_IS_HISTORY (history)); const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (self); GtkClipboard *real = priv->real; if (gtk_clipboard_wait_is_uris_available (real) || gtk_clipboard_wait_is_text_available (real)) { g_paste_clipboard_set_text (self, g_paste_clipboard_bootstrap_finish_text, history); } else if (g_paste_settings_get_images_support (priv->settings) && gtk_clipboard_wait_is_image_available (real)) { g_paste_clipboard_set_image (self, g_paste_clipboard_bootstrap_finish_image, history); } else { g_paste_clipboard_ensure_not_empty (self, history); } } /** * g_paste_clipboard_is_clipboard: * @self: a #GPasteClipboard instance * * Get whether this #GPasteClipboard is a clipboard or not (primary selection) * * Returns: %TRUE if this #GPasteClipboard is a clipboard */ G_PASTE_VISIBLE gboolean g_paste_clipboard_is_clipboard (const GPasteClipboard *self) { g_return_val_if_fail (_G_PASTE_IS_CLIPBOARD (self), FALSE); const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (self); return gtk_clipboard_get_selection (priv->real) == GDK_SELECTION_CLIPBOARD; } /** * g_paste_clipboard_get_real: * @self: a #GPasteClipboard instance * * Get the GtkClipboard linked to the #GPasteClipboard * * Returns: (transfer none): the GtkClipboard used in the #GPasteClipboard */ G_PASTE_VISIBLE GtkClipboard * g_paste_clipboard_get_real (const GPasteClipboard *self) { g_return_val_if_fail (_G_PASTE_IS_CLIPBOARD (self), NULL); const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (self); return priv->real; } /** * g_paste_clipboard_get_text: * @self: a #GPasteClipboard instance * * Get the text stored in the #GPasteClipboard * * Returns: read-only string containing the text or NULL */ G_PASTE_VISIBLE const gchar * g_paste_clipboard_get_text (const GPasteClipboard *self) { g_return_val_if_fail (_G_PASTE_IS_CLIPBOARD (self), NULL); const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (self); return priv->text; } static const gchar * _g_paste_clipboard_private_target_name (const GPasteClipboardPrivate *priv) { GdkAtom target = gtk_clipboard_get_selection (priv->real); if (target == GDK_SELECTION_CLIPBOARD) return "CLIPBOARD"; else if (target == GDK_SELECTION_PRIMARY) return "PRIMARY"; else return "UNKNOWN"; } static void g_paste_clipboard_private_set_text (GPasteClipboardPrivate *priv, const gchar *text) { g_free (priv->text); g_free (priv->image_checksum); g_debug("%s: set text", _g_paste_clipboard_private_target_name (priv)); priv->text = g_strdup (text); priv->image_checksum = NULL; } typedef struct { GPasteClipboard *self; GPasteClipboardTextCallback callback; gpointer user_data; } GPasteClipboardTextCallbackData; static void g_paste_clipboard_on_text_ready (GtkClipboard *clipboard G_GNUC_UNUSED, const gchar *text, gpointer user_data) { g_autofree GPasteClipboardTextCallbackData *data = user_data; GPasteClipboard *self = data->self; if (!text) { if (data->callback) data->callback (self, NULL, data->user_data); return; } GPasteClipboardPrivate *priv = g_paste_clipboard_get_instance_private (self); GPasteSettings *settings = priv->settings; g_autofree gchar *stripped = g_strstrip (g_strdup (text)); gboolean trim_items = g_paste_settings_get_trim_items (settings); const gchar *to_add = trim_items ? stripped : text; guint64 length = strlen (to_add); if (length < g_paste_settings_get_min_text_item_size (settings) || length > g_paste_settings_get_max_text_item_size (settings) || !strlen (stripped)) { if (data->callback) data->callback (self, NULL, data->user_data); return; } if (priv->text && g_paste_str_equal (priv->text, to_add)) { if (data->callback) data->callback (self, NULL, data->user_data); return; } if (trim_items && gtk_clipboard_get_selection (priv->real) == GDK_SELECTION_CLIPBOARD && !g_paste_str_equal (text, stripped)) g_paste_clipboard_select_text (self, stripped); else g_paste_clipboard_private_set_text (priv, to_add); if (data->callback) data->callback (self, priv->text, data->user_data); } /** * g_paste_clipboard_set_text: * @self: a #GPasteClipboard instance * @callback: (scope async): the callback to be called when text is received * @user_data: user data to pass to @callback * * Put the text from the intern GtkClipboard in the #GPasteClipboard */ G_PASTE_VISIBLE void g_paste_clipboard_set_text (GPasteClipboard *self, GPasteClipboardTextCallback callback, gpointer user_data) { g_return_if_fail (_G_PASTE_IS_CLIPBOARD (self)); const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (self); GPasteClipboardTextCallbackData *data = g_new (GPasteClipboardTextCallbackData, 1); data->self = self; data->callback = callback; data->user_data = user_data; gtk_clipboard_request_text (priv->real, g_paste_clipboard_on_text_ready, data); } /** * g_paste_clipboard_select_text: * @self: a #GPasteClipboard instance * @text: the text to select * * Put the text into the #GPasteClipbaord and the intern GtkClipboard */ G_PASTE_VISIBLE void g_paste_clipboard_select_text (GPasteClipboard *self, const gchar *text) { g_return_if_fail (_G_PASTE_IS_CLIPBOARD (self)); g_return_if_fail (text); g_return_if_fail (g_utf8_validate (text, -1, NULL)); GPasteClipboardPrivate *priv = g_paste_clipboard_get_instance_private (self); g_debug("%s: select text", _g_paste_clipboard_private_target_name (priv)); /* Avoid cycling twice as gtk_clipboard_set_text will make the clipboards manager react */ g_paste_clipboard_private_set_text (priv, text); gtk_clipboard_set_text (priv->real, text, -1); } static void g_paste_clipboard_sync_ready (GtkClipboard *clipboard G_GNUC_UNUSED, const gchar *text, gpointer user_data) { if (text) g_paste_clipboard_select_text (user_data, text); } /** * g_paste_clipboard_sync_text: * @self: the source #GPasteClipboard instance * @other: the target #GPasteClipboard instance * * Synchronise the text between two clipboards */ G_PASTE_VISIBLE void g_paste_clipboard_sync_text (const GPasteClipboard *self, GPasteClipboard *other) { g_return_if_fail (_G_PASTE_IS_CLIPBOARD (self)); g_return_if_fail (_G_PASTE_IS_CLIPBOARD (other)); const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (self); gtk_clipboard_request_text (priv->real, g_paste_clipboard_sync_ready, other); } static guchar * copy_str_as_uchars (const gchar *str, guint64 length) { guchar *data = g_new (guchar, length); for (guint64 i = 0; i < length; ++i) data[i] = (guchar) str[i]; return data; } static void _get_clipboard_data_from_special_atom (GtkSelectionData *selection_data, const GPasteItem *item, GPasteSpecialAtom atom) { if (atom >= G_PASTE_SPECIAL_ATOM_FIRST && atom < G_PASTE_SPECIAL_ATOM_LAST) { g_autofree guchar *data = NULL; guint64 length = 0; const gchar *str = g_paste_item_get_special_value (item, atom); if (str) { data = g_base64_decode (str, &length); } else { str = g_paste_item_get_value (item); length = strlen (str); data = copy_str_as_uchars (str, length); } gtk_selection_data_set (selection_data, g_paste_special_atom_get (atom), 8, data, length); } } static void g_paste_clipboard_get_clipboard_data (GtkClipboard *clipboard G_GNUC_UNUSED, GtkSelectionData *selection_data, guint32 info G_GNUC_UNUSED, gpointer user_data_or_owner) { g_return_if_fail (_G_PASTE_IS_ITEM (user_data_or_owner)); GPasteItem *item = G_PASTE_ITEM (user_data_or_owner); GdkAtom target = gtk_selection_data_get_target (selection_data); GdkAtom targets[1] = { target }; if (_G_PASTE_IS_IMAGE_ITEM (item)) { if (gtk_targets_include_image (targets, 1, TRUE)) gtk_selection_data_set_pixbuf (selection_data, g_paste_image_item_get_image (G_PASTE_IMAGE_ITEM (item))); return; } else if (_G_PASTE_IS_URIS_ITEM (item)) { if (gtk_targets_include_uri (targets, 1)) { const gchar * const *uris = g_paste_uris_item_get_uris (G_PASTE_URIS_ITEM (item)); gtk_selection_data_set_uris (selection_data, (GStrv) uris); return; } } for (GPasteSpecialAtom a = G_PASTE_SPECIAL_ATOM_FIRST; a < G_PASTE_SPECIAL_ATOM_LAST; ++a) { if (target == g_paste_special_atom_get (a)) { _get_clipboard_data_from_special_atom (selection_data, item, a); return; } } /* The content is requested as text */ if (gtk_targets_include_text (targets, 1)) gtk_selection_data_set_text (selection_data, g_paste_item_get_real_value (item), -1); } static void g_paste_clipboard_clear_clipboard_data (GtkClipboard *clipboard G_GNUC_UNUSED, gpointer user_data_or_owner) { g_object_unref (user_data_or_owner); } /** * g_paste_clipboard_clear: * @self: a #GPasteClipboard instance * * Clears the content of the clipboard */ G_PASTE_VISIBLE void g_paste_clipboard_clear (GPasteClipboard *self) { g_return_if_fail (_G_PASTE_IS_CLIPBOARD (self)); GPasteClipboardPrivate *priv = g_paste_clipboard_get_instance_private (self); /* We're already clear, don't enter an infinite event loop */ if (!priv->text && !priv->image_checksum) return; g_debug("%s: clear", _g_paste_clipboard_private_target_name (priv)); g_clear_pointer (&priv->text, g_free); g_clear_pointer (&priv->image_checksum, g_free); gtk_clipboard_clear (priv->real); } /** * g_paste_clipboard_store: * @self: a #GPasteClipboard instance * * Store the contents of the clipboard before exiting */ G_PASTE_VISIBLE void g_paste_clipboard_store (GPasteClipboard *self) { g_return_if_fail (_G_PASTE_IS_CLIPBOARD (self)); GPasteClipboardPrivate *priv = g_paste_clipboard_get_instance_private (self); g_debug("%s: store", _g_paste_clipboard_private_target_name (priv)); gtk_clipboard_store (priv->real); } /** * g_paste_clipboard_get_image_checksum: * @self: a #GPasteClipboard instance * * Get the checksum of the image stored in the #GPasteClipboard * * Returns: read-only string containing the checksum of the image stored in the #GPasteClipboard or NULL */ G_PASTE_VISIBLE const gchar * g_paste_clipboard_get_image_checksum (const GPasteClipboard *self) { g_return_val_if_fail (_G_PASTE_IS_CLIPBOARD (self), NULL); const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (self); return priv->image_checksum; } static void g_paste_clipboard_private_set_image_checksum (GPasteClipboardPrivate *priv, const gchar *image_checksum) { g_free (priv->text); g_free (priv->image_checksum); priv->text = NULL; priv->image_checksum = g_strdup (image_checksum); } static void g_paste_clipboard_private_select_image (GPasteClipboardPrivate *priv, GdkPixbuf *image, const gchar *checksum) { g_return_if_fail (GDK_IS_PIXBUF (image)); GtkClipboard *real = priv->real; g_debug("%s: select image", _g_paste_clipboard_private_target_name (priv)); g_paste_clipboard_private_set_image_checksum (priv, checksum); gtk_clipboard_set_image (real, image); } typedef struct { GPasteClipboard *self; GPasteClipboardImageCallback callback; gpointer user_data; } GPasteClipboardImageCallbackData; static void g_paste_clipboard_on_image_ready (GtkClipboard *clipboard G_GNUC_UNUSED, GdkPixbuf *image, gpointer user_data) { g_autofree GPasteClipboardImageCallbackData *data = user_data; GPasteClipboard *self = data->self; if (!image) { if (data->callback) data->callback (self, NULL, data->user_data); return; } GPasteClipboardPrivate *priv = g_paste_clipboard_get_instance_private (self); g_autofree gchar *checksum = g_paste_util_compute_checksum (image); if (g_paste_str_equal (checksum, priv->image_checksum)) image = NULL; else g_paste_clipboard_private_select_image (priv, image, checksum); if (data->callback) data->callback (self, image, data->user_data); } /** * g_paste_clipboard_set_image: * @self: a #GPasteClipboard instance * @callback: (scope async): the callback to be called when text is received * @user_data: user data to pass to @callback * * Put the image from the intern GtkClipboard in the #GPasteClipboard */ G_PASTE_VISIBLE void g_paste_clipboard_set_image (GPasteClipboard *self, GPasteClipboardImageCallback callback, gpointer user_data) { g_return_if_fail (_G_PASTE_IS_CLIPBOARD (self)); const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (self); GPasteClipboardImageCallbackData *data = g_new (GPasteClipboardImageCallbackData, 1); data->self = self; data->callback = callback; data->user_data = user_data; gtk_clipboard_request_image (priv->real, g_paste_clipboard_on_image_ready, data); } /** * g_paste_clipboard_select_item: * @self: a #GPasteClipboard instance * @item: the item to select * * Put the value of the item into the #GPasteClipbaord and the intern GtkClipboard * * Returns: %FALSE if the item was invalid, %TRUE otherwise */ G_PASTE_VISIBLE gboolean g_paste_clipboard_select_item (GPasteClipboard *self, GPasteItem *item) { g_return_val_if_fail (_G_PASTE_IS_CLIPBOARD (self), FALSE); g_return_val_if_fail (_G_PASTE_IS_ITEM (item), FALSE); GPasteClipboardPrivate *priv = g_paste_clipboard_get_instance_private (self); GtkClipboard *real = priv->real; g_autoptr (GtkTargetList) target_list = gtk_target_list_new (NULL, 0); g_debug("%s: select item", _g_paste_clipboard_private_target_name (priv)); if (_G_PASTE_IS_IMAGE_ITEM (item)) { gtk_target_list_add_image_targets (target_list, 0, FALSE); g_paste_clipboard_private_set_image_checksum (priv, g_paste_image_item_get_checksum (G_PASTE_IMAGE_ITEM (item))); } else { gtk_target_list_add_text_targets (target_list, 0); if (_G_PASTE_IS_URIS_ITEM (item)) gtk_target_list_add_uri_targets (target_list, 0); g_paste_clipboard_private_set_text (priv, g_paste_item_get_real_value (item)); } for (const GSList *sv = g_paste_item_get_special_values (item); sv; sv = sv->next) { const GPasteSpecialValue *v = sv->data; gtk_target_list_add (target_list, g_paste_special_atom_get (v->mime), 0, 0); } gint32 n_targets; GtkTargetEntry *targets = gtk_target_table_new_from_list (target_list, &n_targets); gtk_clipboard_set_with_owner (real, targets, n_targets, g_paste_clipboard_get_clipboard_data, g_paste_clipboard_clear_clipboard_data, g_object_ref ((GObject *) item)); gtk_target_table_free (targets, n_targets); return TRUE; } /** * g_paste_clipboard_ensure_not_empty: * @self: a #GPasteClipboard instance * @history: a #GPasteHistory instance * * Ensure the clipboard has some contents (as long as the history's not empty) */ G_PASTE_VISIBLE void g_paste_clipboard_ensure_not_empty (GPasteClipboard *self, GPasteHistory *history) { g_return_if_fail (_G_PASTE_IS_CLIPBOARD (self)); g_return_if_fail (_G_PASTE_IS_HISTORY (history)); const GList *hist = g_paste_history_get_history (history); if (hist) { GPasteItem *item = hist->data; if (!g_paste_clipboard_select_item (self, item)) g_paste_history_remove (history, 0); } } static void g_paste_clipboard_owner_change (GtkClipboard *clipboard G_GNUC_UNUSED, GdkEventOwnerChange *event, gpointer user_data) { GPasteClipboard *self = user_data; GPasteClipboardPrivate *priv = g_paste_clipboard_get_instance_private (self); g_debug("%s: owner change", _g_paste_clipboard_private_target_name (priv)); g_signal_emit (self, signals[OWNER_CHANGE], 0, /* detail */ event, NULL); } static void g_paste_clipboard_fake_event_finish_text (GtkClipboard *clipboard G_GNUC_UNUSED, const gchar *text, gpointer user_data) { GPasteClipboard *self = user_data; const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (self); if (!g_paste_str_equal (text, priv->text)) g_paste_clipboard_owner_change (NULL, NULL, self); } static void g_paste_clipboard_fake_event_finish_image (GtkClipboard *clipboard G_GNUC_UNUSED, GdkPixbuf *image, gpointer user_data) { GPasteClipboard *self = user_data; const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (self); g_autofree gchar *checksum = g_paste_util_compute_checksum (image); if (!g_paste_str_equal (checksum, priv->image_checksum)) g_paste_clipboard_owner_change (NULL, NULL, self); g_object_unref (image); } static gboolean g_paste_clipboard_fake_event (gpointer user_data) { GPasteClipboard *self = user_data; const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (self); if (priv->text) gtk_clipboard_request_text (priv->real, g_paste_clipboard_fake_event_finish_text, self); else if (priv->image_checksum) gtk_clipboard_request_image (priv->real, g_paste_clipboard_fake_event_finish_image, self); else g_paste_clipboard_owner_change (NULL, NULL, self); return G_SOURCE_CONTINUE; } static void g_paste_clipboard_dispose (GObject *object) { GPasteClipboardPrivate *priv = g_paste_clipboard_get_instance_private (G_PASTE_CLIPBOARD (object)); if (priv->settings) { g_signal_handler_disconnect (priv->real, priv->c_signals[C_OWNER_CHANGE]); g_clear_object (&priv->settings); } G_OBJECT_CLASS (g_paste_clipboard_parent_class)->dispose (object); } static void g_paste_clipboard_finalize (GObject *object) { const GPasteClipboardPrivate *priv = _g_paste_clipboard_get_instance_private (G_PASTE_CLIPBOARD (object)); g_free (priv->text); g_free (priv->image_checksum); G_OBJECT_CLASS (g_paste_clipboard_parent_class)->finalize (object); } static void g_paste_clipboard_class_init (GPasteClipboardClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = g_paste_clipboard_dispose; object_class->finalize = g_paste_clipboard_finalize; /** * GPasteClipboard::owner-change: * @clipboard: the object on which the signal was emitted * @event: (type Gdk.EventOwnerChange): the @GdkEventOwnerChange event * * The "owner-change" signal is emitted when GPaste receives an * event that indicates that the ownership of the selection * associated with @clipboard has changed. */ signals[OWNER_CHANGE] = g_signal_new ("owner-change", G_PASTE_TYPE_CLIPBOARD, G_SIGNAL_RUN_FIRST, 0, /* class offset */ NULL, /* accumulator */ NULL, /* accumulator data */ g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); } static void g_paste_clipboard_init (GPasteClipboard *self G_GNUC_UNUSED) { } static GPasteClipboard * _g_paste_clipboard_new (GPasteSettings *settings, GdkAtom target) { GPasteClipboard *self = g_object_new (G_PASTE_TYPE_CLIPBOARD, NULL); GPasteClipboardPrivate *priv = g_paste_clipboard_get_instance_private (self); GtkClipboard *real = priv->real = gtk_clipboard_get (target); priv->settings = g_object_ref (settings); priv->c_signals[C_OWNER_CHANGE] = g_signal_connect (real, "owner-change", G_CALLBACK (g_paste_clipboard_owner_change), self); if (!gdk_display_request_selection_notification (gdk_display_get_default (), target)) { g_warning ("Selection notification not supported, using active poll"); g_source_set_name_by_id (g_timeout_add_seconds (1, g_paste_clipboard_fake_event, self), "[GPaste] clipboard fake events"); } return self; } /** * g_paste_clipboard_new_clipboard: * @settings: a #GPasteSettings instance * * Create a new instance of #GPasteClipboard * * Returns: a newly allocated #GPasteClipboard * free it with g_object_unref */ G_PASTE_VISIBLE GPasteClipboard * g_paste_clipboard_new_clipboard (GPasteSettings *settings) { g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); return _g_paste_clipboard_new (settings, GDK_SELECTION_CLIPBOARD); } /** * g_paste_clipboard_new_primary: * @settings: a #GPasteSettings instance * * Create a new instance of #GPasteClipboard * * Returns: a newly allocated #GPasteClipboard * free it with g_object_unref */ G_PASTE_VISIBLE GPasteClipboard * g_paste_clipboard_new_primary (GPasteSettings *settings) { g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); return _g_paste_clipboard_new (settings, GDK_SELECTION_PRIMARY); } gpaste-3.42.6/src/libgpaste/core/gpaste-clipboard.h000066400000000000000000000054141421222064600221560ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_CLIPBOARD_H__ #define __G_PASTE_CLIPBOARD_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_CLIPBOARD (g_paste_clipboard_get_type ()) G_PASTE_FINAL_TYPE (Clipboard, clipboard, CLIPBOARD, GObject) typedef void (*GPasteClipboardTextCallback) (GPasteClipboard *self, const gchar *text, gpointer user_data); typedef void (*GPasteClipboardImageCallback) (GPasteClipboard *self, GdkPixbuf *image, gpointer user_data); void g_paste_clipboard_bootstrap (GPasteClipboard *self, GPasteHistory *history); gboolean g_paste_clipboard_is_clipboard (const GPasteClipboard *self); GtkClipboard *g_paste_clipboard_get_real (const GPasteClipboard *self); const gchar *g_paste_clipboard_get_text (const GPasteClipboard *self); void g_paste_clipboard_set_text (GPasteClipboard *self, GPasteClipboardTextCallback callback, gpointer user_data); void g_paste_clipboard_select_text (GPasteClipboard *self, const gchar *text); void g_paste_clipboard_sync_text (const GPasteClipboard *self, GPasteClipboard *other); void g_paste_clipboard_clear (GPasteClipboard *self); void g_paste_clipboard_store (GPasteClipboard *self); const gchar *g_paste_clipboard_get_image_checksum (const GPasteClipboard *self); void g_paste_clipboard_set_image (GPasteClipboard *self, GPasteClipboardImageCallback callback, gpointer user_data); gboolean g_paste_clipboard_select_item (GPasteClipboard *self, GPasteItem *item); void g_paste_clipboard_ensure_not_empty (GPasteClipboard *self, GPasteHistory *history); GPasteClipboard *g_paste_clipboard_new_clipboard (GPasteSettings *settings); GPasteClipboard *g_paste_clipboard_new_primary (GPasteSettings *settings); G_END_DECLS #endif /*__G_PASTE_CLIPBOARD_H__*/ gpaste-3.42.6/src/libgpaste/core/gpaste-clipboards-manager.c000066400000000000000000000417771421222064600237600ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include struct _GPasteClipboardsManager { GObject parent_instance; }; enum { C_CLIP_OWNER_CHANGE, C_CLIP_LAST_SIGNAL }; typedef struct { GPasteClipboard *clipboard; guint64 c_signals[C_CLIP_LAST_SIGNAL]; } _Clipboard; enum { C_SELECTED, C_LAST_SIGNAL }; typedef struct { GSList *clipboards; GPasteHistory *history; GPasteSettings *settings; guint64 c_signals[C_LAST_SIGNAL]; } GPasteClipboardsManagerPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (ClipboardsManager, clipboards_manager, G_TYPE_OBJECT) /** * g_paste_clipboards_manager_add_clipboard: * @self: a #GPasteClipboardsManager instance * @clipboard: (transfer none): the GPasteClipboard to add * * Add a #GPasteClipboard to the #GPasteClipboardsManager */ G_PASTE_VISIBLE void g_paste_clipboards_manager_add_clipboard (GPasteClipboardsManager *self, GPasteClipboard *clipboard) { g_return_if_fail (_G_PASTE_IS_CLIPBOARDS_MANAGER (self)); g_return_if_fail (_G_PASTE_IS_CLIPBOARD (clipboard)); GPasteClipboardsManagerPrivate *priv = g_paste_clipboards_manager_get_instance_private (self); _Clipboard *clip = g_new0 (_Clipboard, 1); clip->clipboard = g_object_ref (clipboard); priv->clipboards = g_slist_prepend (priv->clipboards, clip); g_paste_clipboard_bootstrap (clipboard, priv->history); } /** * g_paste_clipboards_manager_sync_from_to: * @self: a #GPasteClipboardsManager instance * @from_clipboard: whether we sync from clipboard or to clipboard * * Sync a clipboard into another */ G_PASTE_VISIBLE void g_paste_clipboards_manager_sync_from_to (GPasteClipboardsManager *self, gboolean from_clipboard) { g_return_if_fail (_G_PASTE_IS_CLIPBOARDS_MANAGER (self)); const GPasteClipboardsManagerPrivate *priv = _g_paste_clipboards_manager_get_instance_private (self); GPasteClipboard *_from = NULL; GPasteClipboard *_to = NULL; g_debug ("clipboards-manager: sync_from_to"); for (GSList *clipboard = priv->clipboards; clipboard; clipboard = g_slist_next (clipboard)) { _Clipboard *_clip = clipboard->data; GPasteClipboard *clip = _clip->clipboard; if (g_paste_clipboard_is_clipboard (clip) == from_clipboard) _from = clip; else _to = clip; } if (_from && _to) g_paste_clipboard_sync_text (_from, _to); } static void g_paste_clipboards_manager_notify_finish (GPasteClipboardsManagerPrivate *priv, GPasteClipboard *clipboard, GPasteItem *item, const gchar *synchronized_text, gboolean something_in_clipboard) { GPasteHistory *history = priv->history; g_debug ("clipboards-manager: notify finish"); if (item) g_paste_history_add (history, item); if (!something_in_clipboard) g_paste_clipboard_ensure_not_empty (clipboard, history); if (synchronized_text) { g_debug ("clipboards-manager: synchronizing clipboards"); for (GSList *_clipboard = priv->clipboards; _clipboard; _clipboard = g_slist_next (_clipboard)) { _Clipboard *_clip = _clipboard->data; GPasteClipboard *clip = _clip->clipboard; if (clipboard == clip) continue; const gchar *text = g_paste_clipboard_get_text (clip); if (!text || !g_paste_str_equal (text, synchronized_text)) g_paste_clipboard_select_text (clip, synchronized_text); } } } typedef struct { GPasteClipboardsManagerPrivate *priv; GPasteClipboard *clip; gboolean track; gboolean uris_available; gboolean fallback; gboolean special_atom_available[G_PASTE_SPECIAL_ATOM_LAST]; } GPasteClipboardsManagerCallbackData; typedef struct { GPasteHistory *history; GPasteItem *item; GPasteSpecialAtom atom; } GPasteSpecialAtomCallbackData; // TODO: move that to g_paste_clipboard ? static void special_contents_received (GtkClipboard *clipboard G_GNUC_UNUSED, GtkSelectionData *selection_data, gpointer data) { g_autofree GPasteSpecialAtomCallbackData *d = data; g_autoptr (GPasteHistory) history = d->history; g_autoptr (GPasteItem) item = d->item; gint length; const guchar *raw_val = gtk_selection_data_get_data_with_length (selection_data, &length); if (raw_val) { g_autofree gchar *val = g_base64_encode (raw_val, length); g_autofree GPasteSpecialValue *v = g_new (GPasteSpecialValue, 1); v->mime = d->atom; v->data = val; guint64 old_size = g_paste_item_get_size (item); g_paste_item_add_special_value (item, v); g_paste_history_refresh_item_size (history, item, old_size); } } static void g_paste_clipboards_manager_text_ready (GPasteClipboard *clipboard, const gchar *text, gpointer user_data) { g_autofree GPasteClipboardsManagerCallbackData *data = user_data; GPasteClipboardsManagerPrivate *priv = data->priv; GPasteItem *item = NULL; const gchar *synchronized_text = NULL; g_debug ("clipboards-manager: text ready"); /* Did we already have some contents, or did we get some now? */ gboolean something_in_clipboard = !!g_paste_clipboard_get_text (clipboard); /* If our contents got updated */ if (text) { if (data->track) { if (data->uris_available) item = G_PASTE_ITEM (g_paste_uris_item_new (text)); else item = G_PASTE_ITEM (g_paste_text_item_new (text)); } if (g_paste_settings_get_synchronize_clipboards (priv->settings)) synchronized_text = text; } else if (data->fallback) { g_debug ("clipboards-manager: no target ready and text fallback failed"); /* We tried to get some text as fallback (no target advertised) but didn't get any */ g_paste_clipboard_clear (data->clip); g_paste_clipboard_ensure_not_empty (data->clip, priv->history); return; } if (item && g_paste_settings_get_rich_text_support (priv->settings)) { for (GPasteSpecialAtom atom = G_PASTE_SPECIAL_ATOM_FIRST; atom < G_PASTE_SPECIAL_ATOM_LAST; ++atom) { if (data->special_atom_available[atom]) { GPasteSpecialAtomCallbackData *d = g_new (GPasteSpecialAtomCallbackData, 1); d->history = g_object_ref (priv->history); d->item = g_object_ref (item); d->atom = atom; gtk_clipboard_request_contents (g_paste_clipboard_get_real (clipboard), g_paste_special_atom_get (atom), special_contents_received, d); } } } g_paste_clipboards_manager_notify_finish (priv, clipboard, item, synchronized_text, something_in_clipboard); } static void g_paste_clipboards_manager_image_ready (GPasteClipboard *clipboard, GdkPixbuf *image, gpointer user_data) { g_autofree GPasteClipboardsManagerCallbackData *data = user_data; GPasteClipboardsManagerPrivate *priv = data->priv; GPasteItem *item = NULL; g_debug ("clipboards-manager: image ready"); /* Did we already have some contents, or did we get some now? */ gboolean something_in_clipboard = !!g_paste_clipboard_get_image_checksum (clipboard); /* If our contents got updated */ if (image && data->track) item = G_PASTE_ITEM (g_paste_image_item_new (image)); g_paste_clipboards_manager_notify_finish (priv, clipboard, item, NULL, something_in_clipboard); } /* TODO: move part of this to GPasteClipboard to drop all set_* */ static void g_paste_clipboards_manager_targets_ready (GtkClipboard *clipboard G_GNUC_UNUSED, GtkSelectionData *_targets, gpointer user_data) { g_autofree GPasteClipboardsManagerCallbackData *data = user_data; GPasteClipboardsManagerPrivate *priv = data->priv; g_debug ("clipboards-manager: targets ready"); if (gtk_selection_data_get_length (_targets) >= 0) { g_autofree GdkAtom *targets = NULL; gint n_targets; gtk_selection_data_get_targets (_targets, &targets, &n_targets); data->uris_available = gtk_targets_include_uri (targets, n_targets); for (GPasteSpecialAtom atom = G_PASTE_SPECIAL_ATOM_FIRST; atom < G_PASTE_SPECIAL_ATOM_LAST; ++atom) { for (gint i = 0; i < n_targets; ++i) { if (targets[i] == g_paste_special_atom_get (atom)) data->special_atom_available[atom] = TRUE; } } if (data->uris_available || gtk_targets_include_text (targets, n_targets)) { /* Update our cache from the real Clipboard */ g_paste_clipboard_set_text (data->clip, g_paste_clipboards_manager_text_ready, data); data = NULL; } else if (g_paste_settings_get_images_support (priv->settings) && gtk_targets_include_image (targets, n_targets, FALSE)) { /* Update our cache from the real Clipboard */ g_paste_clipboard_set_image (data->clip, g_paste_clipboards_manager_image_ready, data); data = NULL; } } else { g_debug ("clipboards-manager: no target ready, trying text as fallback"); data->fallback = TRUE; g_paste_clipboard_set_text (data->clip, g_paste_clipboards_manager_text_ready, data); data = NULL; } } static void g_paste_clipboards_manager_notify (GPasteClipboard *clipboard, GdkEventOwnerChange *event, gpointer user_data) { GPasteClipboardsManagerPrivate *priv = user_data; if (event->reason != GDK_OWNER_CHANGE_NEW_OWNER) { g_debug ("clipboards-manager: ignoring deletion event"); return; } g_debug ("clipboards-manager: notify"); GPasteSettings *settings = priv->settings; gboolean track = (g_paste_settings_get_track_changes (settings) && (g_paste_clipboard_is_clipboard (clipboard) || // We're not primary g_paste_settings_get_primary_to_history (settings) || // Or we asked that primary affects clipboard g_paste_settings_get_synchronize_clipboards (settings))); // Or primary and clipboards are synchronized hence primary will affect history through clipboard GPasteClipboardsManagerCallbackData *data = g_new0 (GPasteClipboardsManagerCallbackData, 1); data->priv = priv; data->clip = clipboard; data->track = track; gtk_clipboard_request_contents (g_paste_clipboard_get_real (clipboard), gdk_atom_intern_static_string ("TARGETS"), g_paste_clipboards_manager_targets_ready, data); } /** * g_paste_clipboards_manager_activate: * @self: a #GPasteClipboardsManager instance * * Activate the #GPasteClipboardsManager */ G_PASTE_VISIBLE void g_paste_clipboards_manager_activate (GPasteClipboardsManager *self) { g_return_if_fail (_G_PASTE_IS_CLIPBOARDS_MANAGER (self)); GPasteClipboardsManagerPrivate *priv = g_paste_clipboards_manager_get_instance_private (self); for (GSList *clipboard = priv->clipboards; clipboard; clipboard = g_slist_next (clipboard)) { _Clipboard *clip = clipboard->data; clip->c_signals[C_CLIP_OWNER_CHANGE] = g_signal_connect (clip->clipboard, "owner-change", G_CALLBACK (g_paste_clipboards_manager_notify), priv); } } /** * g_paste_clipboards_manager_select: * @self: a #GPasteClipboardsManager instance * @item: the #GPasteItem to select * * Select a new #GPasteItem * * Returns: %FALSE if the item was invalid, %TRUE otherwise */ G_PASTE_VISIBLE gboolean g_paste_clipboards_manager_select (GPasteClipboardsManager *self, GPasteItem *item) { g_return_val_if_fail (_G_PASTE_IS_CLIPBOARDS_MANAGER (self), FALSE); g_return_val_if_fail (_G_PASTE_IS_ITEM (item), FALSE); const GPasteClipboardsManagerPrivate *priv = _g_paste_clipboards_manager_get_instance_private (self); g_debug ("clipboards-manager: select"); for (GSList *clipboard = priv->clipboards; clipboard; clipboard = g_slist_next (clipboard)) { _Clipboard *clip = clipboard->data; if (!g_paste_clipboard_select_item (clip->clipboard, item)) { g_debug ("clipboards-manager: item was invalid, deleting it"); return FALSE; } } return TRUE; } /** * g_paste_clipboards_manager_store: * @self: a #GPasteClipboardsManager instance * * Store clipboards contents before exiting */ G_PASTE_VISIBLE void g_paste_clipboards_manager_store (GPasteClipboardsManager *self) { g_return_if_fail (_G_PASTE_IS_CLIPBOARDS_MANAGER (self)); const GPasteClipboardsManagerPrivate *priv = _g_paste_clipboards_manager_get_instance_private (self); g_debug ("clipboards-manager: store"); for (GSList *clipboard = priv->clipboards; clipboard; clipboard = g_slist_next (clipboard)) { _Clipboard *clip = clipboard->data; g_paste_clipboard_store (clip->clipboard); } } static void on_item_selected (GPasteClipboardsManager *self, GPasteItem *item, GPasteHistory *history G_GNUC_UNUSED) { GPasteClipboardsManagerPrivate *priv = g_paste_clipboards_manager_get_instance_private (G_PASTE_CLIPBOARDS_MANAGER (self)); if (!g_paste_clipboards_manager_select (self, item)) g_paste_history_remove (priv->history, 0); } static void _clipboard_free (gpointer data) { _Clipboard *clip = data; g_signal_handler_disconnect (clip->clipboard, clip->c_signals[C_CLIP_OWNER_CHANGE]); g_object_unref (clip->clipboard); g_free (clip); } static void g_paste_clipboards_manager_dispose (GObject *object) { GPasteClipboardsManagerPrivate *priv = g_paste_clipboards_manager_get_instance_private (G_PASTE_CLIPBOARDS_MANAGER (object)); GPasteSettings *settings = priv->settings; if (settings) { g_signal_handler_disconnect (settings, priv->c_signals[C_SELECTED]); g_clear_object (&priv->settings); g_clear_object (&priv->history); } if (priv->clipboards) { g_slist_free_full (priv->clipboards, _clipboard_free); priv->clipboards = NULL; } G_OBJECT_CLASS (g_paste_clipboards_manager_parent_class)->dispose (object); } static void g_paste_clipboards_manager_class_init (GPasteClipboardsManagerClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_clipboards_manager_dispose; } static void g_paste_clipboards_manager_init (GPasteClipboardsManager *self G_GNUC_UNUSED) { } /** * g_paste_clipboards_manager_new: * @history: (transfer none): a #GPasteHistory instance * @settings: (transfer none): a #GPasteSettings instance * * Create a new instance of #GPasteClipboardsManager * * Returns: a newly allocated #GPasteClipboardsManager * free it with g_object_unref */ G_PASTE_VISIBLE GPasteClipboardsManager * g_paste_clipboards_manager_new (GPasteHistory *history, GPasteSettings *settings) { g_return_val_if_fail (_G_PASTE_IS_HISTORY (history), NULL); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); GPasteClipboardsManager *self = g_object_new (G_PASTE_TYPE_CLIPBOARDS_MANAGER, NULL); GPasteClipboardsManagerPrivate *priv = g_paste_clipboards_manager_get_instance_private (self); priv->history = g_object_ref (history); priv->settings = g_object_ref (settings); priv->c_signals[C_SELECTED] = g_signal_connect_swapped (history, "selected", G_CALLBACK (on_item_selected), self); return self; } gpaste-3.42.6/src/libgpaste/core/gpaste-clipboards-manager.h000066400000000000000000000026531421222064600237530ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_CLIPBOARDS_MANAGER_H__ #define __G_PASTE_CLIPBOARDS_MANAGER_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_CLIPBOARDS_MANAGER (g_paste_clipboards_manager_get_type ()) G_PASTE_FINAL_TYPE (ClipboardsManager, clipboards_manager, CLIPBOARDS_MANAGER, GObject) void g_paste_clipboards_manager_add_clipboard (GPasteClipboardsManager *self, GPasteClipboard *clipboard); void g_paste_clipboards_manager_sync_from_to (GPasteClipboardsManager *self, gboolean from_clipboard); void g_paste_clipboards_manager_activate (GPasteClipboardsManager *self); gboolean g_paste_clipboards_manager_select (GPasteClipboardsManager *self, GPasteItem *item); void g_paste_clipboards_manager_store (GPasteClipboardsManager *self); GPasteClipboardsManager *g_paste_clipboards_manager_new (GPasteHistory *history, GPasteSettings *settings); G_END_DECLS #endif /*__G_PASTE_CLIPBOARDS_MANAGER_H__*/ gpaste-3.42.6/src/libgpaste/core/gpaste-history.c000066400000000000000000001130211421222064600217050ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include #include #include #include #include #define G_PASTE_LOCK_HISTORY \ g_debug ("%s: Locking history", G_STRFUNC); \ g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&priv->lock) struct _GPasteHistory { GObject parent_instance; }; enum { C_CHANGED, C_LAST_SIGNAL }; typedef struct { GMutex lock; GPasteStorageBackend *backend; GPasteSettings *settings; GList *history; guint64 size; gchar *name; /* Note: we never track the first (active) item here */ const gchar *biggest_uuid; guint64 biggest_size; guint64 c_signals[C_LAST_SIGNAL]; } GPasteHistoryPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (History, history, G_TYPE_OBJECT) enum { SELECTED, SWITCH, UPDATE, LAST_SIGNAL }; static guint64 signals[LAST_SIGNAL] = { 0 }; static void g_paste_history_private_elect_new_biggest (GPasteHistoryPrivate *priv) { g_debug ("history: elect biggest"); priv->biggest_uuid = NULL; priv->biggest_size = 0; GList *history = priv->history; if (history) { for (history = history->next; history; history = history->next) { GPasteItem *item = history->data; guint64 size = g_paste_item_get_size (item); if (size > priv->biggest_size) { priv->biggest_uuid = g_paste_item_get_uuid (item); priv->biggest_size = size; } } } } static void g_paste_history_private_remove (GPasteHistoryPrivate *priv, GList *elem, gboolean remove_leftovers) { if (!elem) return; GPasteItem *item = elem->data; priv->size -= g_paste_item_get_size (item); if (remove_leftovers) { if (_G_PASTE_IS_IMAGE_ITEM (item)) { g_autoptr (GFile) image = g_file_new_for_path (g_paste_item_get_value (item)); g_file_delete (image, NULL, /* cancellable */ NULL); /* error */ } g_object_unref (item); } priv->history = g_list_delete_link (priv->history, elem); } static void g_paste_history_selected (GPasteHistory *self, GPasteItem *item) { g_debug ("history: selected"); g_signal_emit (self, signals[SELECTED], 0, /* detail */ item, NULL); } static void g_paste_history_emit_switch (GPasteHistory *self, const gchar *name) { g_debug ("history: switch"); g_signal_emit (self, signals[SWITCH], 0, /* detail */ name, NULL); } static void g_paste_history_update (GPasteHistory *self, GPasteUpdateAction action, GPasteUpdateTarget target, guint64 position) { GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); g_paste_storage_backend_write_history (priv->backend, priv->name, priv->history); g_debug ("history: update"); g_signal_emit (self, signals[UPDATE], 0, /* detail */ action, target, position, NULL); } static void g_paste_history_activate_first (GPasteHistory *self, gboolean select) { GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); GList *history = priv->history; if (!history) return; GPasteItem *first = history->data; priv->size -= g_paste_item_get_size (first); g_paste_item_set_state (first, G_PASTE_ITEM_STATE_ACTIVE); priv->size += g_paste_item_get_size (first); if (select) g_paste_history_selected (self, first); } static GList * g_paste_history_private_get_item_by_uuid (const GPasteHistoryPrivate *priv, const gchar *uuid, guint64 *index) { guint64 idx = 0; for (GList *history = priv->history; history; history = history->next, ++idx) { const GPasteItem *item = history->data; if (g_paste_str_equal (g_paste_item_get_uuid (item), uuid)) { if (index) *index = idx; return history; } } return NULL; } static GPasteItem * g_paste_history_private_get_by_uuid (const GPasteHistoryPrivate *priv, const gchar *uuid) { GList *item = g_paste_history_private_get_item_by_uuid (priv, uuid, NULL); return (item) ? item->data : NULL; } static void g_paste_history_private_check_memory_usage (GPasteHistoryPrivate *priv) { guint64 max_memory = g_paste_settings_get_max_memory_usage (priv->settings) * 1024 * 1024; while (priv->size > max_memory && priv->biggest_uuid) { GList *biggest = g_paste_history_private_get_item_by_uuid (priv, priv->biggest_uuid, NULL); g_return_if_fail (biggest); g_paste_history_private_remove (priv, biggest, TRUE); g_paste_history_private_elect_new_biggest (priv); } } static void g_paste_history_private_check_size (GPasteHistoryPrivate *priv) { GList *history = priv->history; guint64 max_history_size = g_paste_settings_get_max_history_size (priv->settings); guint64 length = g_list_length (history); if (length > max_history_size) { history = g_list_nth (history, max_history_size); g_return_if_fail (history); history->prev->next = NULL; history->prev = NULL; for (GList *_history = history; _history; _history = g_list_next (_history)) priv->size -= g_paste_item_get_size (_history->data); g_list_free_full (history, g_object_unref); } } static gboolean g_paste_history_private_is_growing_line (GPasteHistoryPrivate *priv, GPasteItem *old, GPasteItem *new) { if (_G_PASTE_IS_IMAGE_ITEM (old) && _G_PASTE_IS_IMAGE_ITEM (new)) return g_paste_image_item_is_growing (_G_PASTE_IMAGE_ITEM (new), _G_PASTE_IMAGE_ITEM (old)); if (!(g_paste_settings_get_growing_lines (priv->settings) && _G_PASTE_IS_TEXT_ITEM (old) && _G_PASTE_IS_TEXT_ITEM (new) && !_G_PASTE_IS_PASSWORD_ITEM (old) && !_G_PASTE_IS_PASSWORD_ITEM (new))) return FALSE; const gchar *n = g_paste_item_get_value (new); const gchar *o = g_paste_item_get_value (old); return (g_str_has_prefix (n, o) || g_str_has_suffix (n, o)); } static void _g_paste_history_add (GPasteHistory *self, GPasteItem *item, gboolean new_selection) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); g_return_if_fail (_G_PASTE_IS_ITEM (item)); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); guint64 max_memory = g_paste_settings_get_max_memory_usage (priv->settings) * 1024 * 1024; if (g_paste_item_get_size (item) > max_memory) return; GList *history = priv->history; gboolean election_needed = FALSE; GPasteUpdateTarget target = G_PASTE_UPDATE_TARGET_ALL; g_debug ("history: add"); if (history) { GPasteItem *old_first = history->data; if (g_paste_item_equals (old_first, item)) return; if (new_selection && g_paste_history_private_is_growing_line (priv, old_first, item)) { target = G_PASTE_UPDATE_TARGET_POSITION; g_paste_history_private_remove (priv, history, FALSE); } else { /* size may change when state is idle */ priv->size -= g_paste_item_get_size (old_first); g_paste_item_set_state (old_first, G_PASTE_ITEM_STATE_IDLE); guint64 size = g_paste_item_get_size (old_first); priv->size += size; if (size >= priv->biggest_size) { priv->biggest_uuid = g_paste_item_get_uuid (old_first); priv->biggest_size = size; } for (history = history->next; history; history = history->next) { if (g_paste_item_equals (history->data, item) || (new_selection && g_paste_history_private_is_growing_line (priv, history->data, item))) { if (g_paste_str_equal (priv->biggest_uuid, g_paste_item_get_uuid (history->data))) election_needed = TRUE; g_paste_history_private_remove (priv, history, FALSE); break; } } } } priv->history = g_list_prepend (priv->history, item); g_paste_history_activate_first (self, FALSE); priv->size += g_paste_item_get_size (item); g_paste_history_private_check_size (priv); if (election_needed) g_paste_history_private_elect_new_biggest (priv); g_paste_history_private_check_memory_usage (priv); g_paste_history_update (self, G_PASTE_UPDATE_ACTION_REPLACE, target, 0); } /** * g_paste_history_add: * @self: a #GPasteHistory instance * @item: (transfer full): the #GPasteItem to add * * Add a #GPasteItem to the #GPasteHistory */ G_PASTE_VISIBLE void g_paste_history_add (GPasteHistory *self, GPasteItem *item) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); g_return_if_fail (_G_PASTE_IS_ITEM (item)); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; _g_paste_history_add (self, item, TRUE); } static void g_paste_history_remove_common (GPasteHistory *self, GPasteHistoryPrivate *priv, GList *item, guint64 index) { if (!item) return; gboolean was_biggest = g_paste_str_equal (priv->biggest_uuid, g_paste_item_get_uuid (item->data)); g_paste_history_private_remove (priv, item, TRUE); if (!index) g_paste_history_activate_first (self, TRUE); if (was_biggest) g_paste_history_private_elect_new_biggest (priv); g_paste_history_update (self, G_PASTE_UPDATE_ACTION_REMOVE, G_PASTE_UPDATE_TARGET_POSITION, index); } static void g_paste_history_remove_locked (GPasteHistory *self, GPasteHistoryPrivate *priv, guint64 index) { GList *history = priv->history; g_debug ("history: remove '%" G_GUINT64_FORMAT "'", index); if (index >= g_list_length (history)) return; GList *item = g_list_nth (history, index); g_paste_history_remove_common (self, priv, item, index); } /** * g_paste_history_remove: * @self: a #GPasteHistory instance * @index: the index of the #GPasteItem to delete * * Delete a #GPasteItem from the #GPasteHistory */ G_PASTE_VISIBLE void g_paste_history_remove (GPasteHistory *self, guint64 index) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; g_paste_history_remove_locked (self, priv, index); } /** * g_paste_history_remove_by_uuid: * @self: a #GPasteHistory instance * @uuid: the uuid of the #GPasteItem to delete * * Delete a #GPasteItem from the #GPasteHistory * * Returns: whether we removed anything */ G_PASTE_VISIBLE gboolean g_paste_history_remove_by_uuid (GPasteHistory *self, const gchar *uuid) { g_return_val_if_fail (_G_PASTE_IS_HISTORY (self), FALSE); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; g_debug ("history: remove '%s", uuid); guint64 index; GList *item = g_paste_history_private_get_item_by_uuid (priv, uuid, &index); if (!item) return FALSE; g_paste_history_remove_common (self, priv, item, index); return TRUE; } /** * g_paste_history_refresh_item_size: * @self: a #GPasteHistory instance * @item: the #GPasteItem to refresh * @old_size: the former size of the item * * Refresh the cached size of the #GPasteItem */ G_PASTE_VISIBLE void g_paste_history_refresh_item_size (GPasteHistory *self, const GPasteItem *item, guint64 old_size) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); g_return_if_fail (_G_PASTE_IS_ITEM (item)); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; if (!g_list_find (priv->history, item)) return; guint64 size = g_paste_item_get_size (item); g_return_if_fail (old_size <= size); priv->size += (size - old_size); if (size > priv->biggest_size) g_paste_history_private_elect_new_biggest (priv); g_paste_history_private_check_memory_usage (priv); } static GPasteItem * g_paste_history_private_get (const GPasteHistoryPrivate *priv, guint64 index) { GList *history = priv->history; if (index >= g_list_length (history)) return NULL; return G_PASTE_ITEM (g_list_nth_data (history, index)); } /** * g_paste_history_get: * @self: a #GPasteHistory instance * @index: the index of the #GPasteItem * * Get a #GPasteItem from the #GPasteHistory * * Returns: a read-only #GPasteItem */ G_PASTE_VISIBLE const GPasteItem * g_paste_history_get (GPasteHistory *self, guint64 index) { g_return_val_if_fail (_G_PASTE_IS_HISTORY (self), NULL); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; return g_paste_history_private_get (priv, index); } /** * g_paste_history_get_by_uuid: * @self: a #GPasteHistory instance * @uuid: the uuid of the #GPasteItem * * Get a #GPasteItem from the #GPasteHistory * * Returns: a read-only #GPasteItem */ G_PASTE_VISIBLE const GPasteItem * g_paste_history_get_by_uuid (GPasteHistory *self, const gchar *uuid) { g_return_val_if_fail (_G_PASTE_IS_HISTORY (self), NULL); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; return g_paste_history_private_get_by_uuid (priv, uuid); } /** * g_paste_history_dup: * @self: a #GPasteHistory instance * @index: the index of the #GPasteItem * * Get a #GPasteItem from the #GPasteHistory * free it with g_object_unref * * Returns: (transfer full): a #GPasteItem */ G_PASTE_VISIBLE GPasteItem * g_paste_history_dup (GPasteHistory *self, guint64 index) { g_return_val_if_fail (_G_PASTE_IS_HISTORY (self), NULL); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; return g_object_ref (g_paste_history_private_get (priv, index)); } /** * g_paste_history_select: * @self: a #GPasteHistory instance * @uuid: the uuid of the #GPasteItem to select * * Select a #GPasteItem from the #GPasteHistory * * Returns: whether the item could be selected */ G_PASTE_VISIBLE gboolean g_paste_history_select (GPasteHistory *self, const gchar *uuid) { g_return_val_if_fail (_G_PASTE_IS_HISTORY (self), FALSE); g_debug ("history: select '%s'", uuid); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; GPasteItem *item = g_paste_history_private_get_by_uuid (priv, uuid); if (!item) return FALSE; _g_paste_history_add (self, item, FALSE); g_paste_history_selected (self, item); return TRUE; } static void _g_paste_history_replace (GPasteHistory *self, guint64 index, GPasteItem *new, GList *todel) { GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); GPasteItem *old = todel->data; gboolean was_biggest = g_paste_str_equal (priv->biggest_uuid, g_paste_item_get_uuid (old)); priv->size -= g_paste_item_get_size (old); priv->size += g_paste_item_get_size (new); g_object_unref (old); todel->data = new; if (was_biggest) g_paste_history_private_elect_new_biggest (priv); g_paste_history_update (self, G_PASTE_UPDATE_ACTION_REPLACE, G_PASTE_UPDATE_TARGET_POSITION, index); } /** * g_paste_history_replace: * @self: a #GPasteHistory instance * @uuid: the uuid of the #GPasteTextItem to replace * @contents: the new contents * * Replace the contents of text item at index @index */ G_PASTE_VISIBLE void g_paste_history_replace (GPasteHistory *self, const gchar *uuid, const gchar *contents) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); g_return_if_fail (!contents || g_utf8_validate (contents, -1, NULL)); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; guint64 index; GList *todel = g_paste_history_private_get_item_by_uuid (priv, uuid, &index); if (!todel) return; GPasteItem *item = todel->data; g_return_if_fail (_G_PASTE_IS_TEXT_ITEM (item) && g_paste_str_equal (g_paste_item_get_kind (item), "Text")); GPasteItem *new = g_paste_text_item_new (contents); _g_paste_history_replace (self, index, new, todel); if (!index) g_paste_history_selected (self, new); } static GPasteItem * _g_paste_history_private_get_password (const GPasteHistoryPrivate *priv, const gchar *name, guint64 *index) { guint64 idx = 0; for (GList *h = priv->history; h; h = g_list_next (h), ++idx) { GPasteItem *i = h->data; if (_G_PASTE_IS_PASSWORD_ITEM (i) && g_paste_str_equal (g_paste_password_item_get_name ((GPastePasswordItem *) i), name)) { if (index) *index = idx; return i; } } if (index) *index = -1; return NULL; } /** * g_paste_history_set_password: * @self: a #GPasteHistory instance * @uuid: the uuid of the #GPasteTextItem to change as password * @name: (nullable): the name to give to the password * * Mark a text item as password */ G_PASTE_VISIBLE void g_paste_history_set_password (GPasteHistory *self, const gchar *uuid, const gchar *name) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); g_return_if_fail (!name || g_utf8_validate (name, -1, NULL)); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; guint64 index; GList *todel = g_paste_history_private_get_item_by_uuid (priv, uuid, &index); g_return_if_fail (todel); GPasteItem *item = todel->data; g_return_if_fail (_G_PASTE_IS_TEXT_ITEM (item) && g_paste_str_equal (g_paste_item_get_kind (item), "Text")); g_return_if_fail (!_g_paste_history_private_get_password (priv, name, NULL)); GPasteItem *password = g_paste_password_item_new (name, g_paste_item_get_real_value (item)); _g_paste_history_replace (self, index, password, todel); } /** * g_paste_history_get_password: * @self: a #GPasteHistory instance * @name: the name of the #GPastePasswordItem * * Get the first password matching name * * Returns: (nullable): a #GPastePasswordItem or %NULL */ G_PASTE_VISIBLE const GPastePasswordItem * g_paste_history_get_password (GPasteHistory *self, const gchar *name) { g_return_val_if_fail (_G_PASTE_IS_HISTORY (self), NULL); g_return_val_if_fail (!name || g_utf8_validate (name, -1, NULL), NULL); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; GPasteItem *item = _g_paste_history_private_get_password (priv, name, NULL); return (item) ? G_PASTE_PASSWORD_ITEM (item) : NULL; } /** * g_paste_history_delete_password: * @self: a #GPasteHistory instance * @name: the name of the #GPastePasswordItem * * Delete the password matching name */ G_PASTE_VISIBLE void g_paste_history_delete_password (GPasteHistory *self, const gchar *name) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); g_return_if_fail (!name || g_utf8_validate (name, -1, NULL)); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; guint64 index; if (_g_paste_history_private_get_password (priv, name, &index)) g_paste_history_remove_locked (self, priv, index); } /** * g_paste_history_rename_password: * @self: a #GPasteHistory instance * @old_name: the old name of the #GPastePasswordItem * @new_name: (nullable): the new name of the #GPastePasswordItem * * Rename the password item */ G_PASTE_VISIBLE void g_paste_history_rename_password (GPasteHistory *self, const gchar *old_name, const gchar *new_name) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); g_return_if_fail (!old_name || g_utf8_validate (old_name, -1, NULL)); g_return_if_fail (!new_name || g_utf8_validate (new_name, -1, NULL)); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; guint64 index = 0; GPasteItem *item = _g_paste_history_private_get_password (priv, old_name, &index); if (item) { g_paste_password_item_set_name (G_PASTE_PASSWORD_ITEM (item), new_name); g_paste_history_update (self, G_PASTE_UPDATE_ACTION_REPLACE, G_PASTE_UPDATE_TARGET_POSITION, index); } } /** * g_paste_history_empty: * @self: a #GPasteHistory instance * * Empty the #GPasteHistory */ G_PASTE_VISIBLE void g_paste_history_empty (GPasteHistory *self) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; g_list_free_full (priv->history, g_object_unref); priv->history = NULL; priv->size = 0; g_paste_history_private_elect_new_biggest (priv); g_paste_history_update (self, G_PASTE_UPDATE_ACTION_REMOVE, G_PASTE_UPDATE_TARGET_ALL, 0); } /** * g_paste_history_save: * @self: a #GPasteHistory instance * @name: (nullable): the name to save the history to (defaults to the configured one) * * Save the #GPasteHistory to the history file */ G_PASTE_VISIBLE void g_paste_history_save (GPasteHistory *self, const gchar *name) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; g_paste_storage_backend_write_history (priv->backend, (name) ? name : priv->name, priv->history); } static void g_paste_history_load_locked (GPasteHistory *self, GPasteHistoryPrivate *priv, const gchar *name) { g_list_free_full (priv->history, g_object_unref); priv->history = NULL; priv->size = 0; g_free (priv->name); priv->name = g_strdup ((name) ? name : g_paste_settings_get_history_name (priv->settings)); g_paste_storage_backend_read_history (priv->backend, priv->name, &priv->history, &priv->size); if (priv->history) { g_paste_history_activate_first (self, TRUE); g_paste_history_private_elect_new_biggest (priv); } } /** * g_paste_history_load: * @self: a #GPasteHistory instance * @name: (nullable): the name of the history to load, defaults to the configured one * * Load the #GPasteHistory from the history file */ G_PASTE_VISIBLE void g_paste_history_load (GPasteHistory *self, const gchar *name) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); g_return_if_fail (!name || g_utf8_validate (name, -1, NULL)); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; if (priv->name && g_paste_str_equal(name, priv->name)) return; g_paste_history_load_locked (self, priv, name); } /** * g_paste_history_switch: * @self: a #GPasteHistory instance * @name: the name of the new history * * Switch to a new history */ G_PASTE_VISIBLE void g_paste_history_switch (GPasteHistory *self, const gchar *name) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); g_return_if_fail (name); g_return_if_fail (g_utf8_validate (name, -1, NULL)); const GPasteHistoryPrivate *priv = _g_paste_history_get_instance_private (self); g_paste_settings_set_history_name (priv->settings, name); } /** * g_paste_history_delete: * @self: a #GPasteHistory instance * @name: (nullable): the history to delete (defaults to the configured one) * @error: a #GError * * Delete the current #GPasteHistory */ G_PASTE_VISIBLE void g_paste_history_delete (GPasteHistory *self, const gchar *name, GError **error) { g_return_if_fail (_G_PASTE_IS_HISTORY (self)); const GPasteHistoryPrivate *priv = _g_paste_history_get_instance_private (self); g_autoptr (GFile) history_file = g_paste_util_get_history_file ((name) ? name : priv->name, "xml"); if (g_paste_str_equal (name, priv->name)) g_paste_history_empty (self); if (g_file_query_exists (history_file, NULL)) /* cancellable */ { g_file_delete (history_file, NULL, /* cancellable */ error); } } static void g_paste_history_history_name_changed (GPasteHistory *self) { GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); g_debug ("history: name changed to '%s'", priv->name); g_paste_history_load_locked (self, priv, NULL); g_paste_history_emit_switch (self, priv->name); g_paste_history_update (self, G_PASTE_UPDATE_ACTION_REPLACE, G_PASTE_UPDATE_TARGET_ALL, 0); } static void g_paste_history_settings_changed (GPasteSettings *settings G_GNUC_UNUSED, const gchar *key, gpointer user_data) { GPasteHistory *self = user_data; GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; /* FIXME: track text item size settings */ if (g_paste_str_equal(key, G_PASTE_MAX_HISTORY_SIZE_SETTING)) g_paste_history_private_check_size (priv); else if (g_paste_str_equal (key, G_PASTE_MAX_MEMORY_USAGE_SETTING)) g_paste_history_private_check_memory_usage (priv); else if (g_paste_str_equal (key, G_PASTE_HISTORY_NAME_SETTING)) g_paste_history_history_name_changed (self); } static void g_paste_history_dispose (GObject *object) { GPasteHistory *self = G_PASTE_HISTORY (object); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); GPasteSettings *settings = priv->settings; g_clear_object (&priv->backend); if (settings) { g_signal_handler_disconnect (settings, priv->c_signals[C_CHANGED]); g_clear_object (&priv->settings); } G_OBJECT_CLASS (g_paste_history_parent_class)->dispose (object); } static void g_paste_history_finalize (GObject *object) { GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (G_PASTE_HISTORY (object)); g_free (priv->name); g_list_free_full (priv->history, g_object_unref); g_mutex_clear (&priv->lock); G_OBJECT_CLASS (g_paste_history_parent_class)->finalize (object); } static void g_paste_history_class_init (GPasteHistoryClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = g_paste_history_dispose; object_class->finalize = g_paste_history_finalize; /** * GPasteHistory::selected: * @history: the object on which the signal was emitted * @item: the new selected item * * The "selected" signal is emitted when the user has just * selected a new item form the history. */ signals[SELECTED] = g_signal_new ("selected", G_PASTE_TYPE_HISTORY, G_SIGNAL_RUN_LAST, 0, /* class offset */ NULL, /* accumulator */ NULL, /* accumulator data */ g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, /* number of params */ G_PASTE_TYPE_ITEM); /** * GPasteHistory::switch: * @history: the object on which the signal was emitted * @name: the new history name * * The "switch" signal is emitted when the user has just * switched to a new history */ signals[SWITCH] = g_signal_new ("switch", G_PASTE_TYPE_HISTORY, G_SIGNAL_RUN_LAST, 0, /* class offset */ NULL, /* accumulator */ NULL, /* accumulator data */ g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, /* number of params */ G_TYPE_STRING); /** * GPasteHistory::update: * @history: the object on which the signal was emitted * @action: the kind of update * @target: the items which need updating * @index: the index of the item, when the target is POSITION * * The "update" signal is emitted whenever anything changed * in the history (something was added, removed, selected, replaced...). */ signals[UPDATE] = g_signal_new ("update", G_PASTE_TYPE_HISTORY, G_SIGNAL_RUN_LAST, 0, /* class offset */ NULL, /* accumulator */ NULL, /* accumulator data */ g_cclosure_marshal_generic, G_TYPE_NONE, 3, /* number of params */ G_PASTE_TYPE_UPDATE_ACTION, G_PASTE_TYPE_UPDATE_TARGET, G_TYPE_UINT64); } static void g_paste_history_init (GPasteHistory *self) { GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); g_mutex_init (&priv->lock); G_PASTE_LOCK_HISTORY; g_paste_history_private_elect_new_biggest (priv); } /** * g_paste_history_get_history: * @self: a #GPasteHistory instance * * Get the inner history of a #GPasteHistory * * Returns: (element-type GPasteItem) (transfer none): The inner history */ G_PASTE_VISIBLE const GList * g_paste_history_get_history (const GPasteHistory *self) { g_return_val_if_fail (_G_PASTE_IS_HISTORY (self), NULL); const GPasteHistoryPrivate *priv = _g_paste_history_get_instance_private (self); return priv->history; } /** * g_paste_history_get_length: * @self: a #GPasteHistory instance * * Get the length of a #GPasteHistory * * Returns: The length of the inner history */ G_PASTE_VISIBLE guint64 g_paste_history_get_length (GPasteHistory *self) { g_return_val_if_fail (_G_PASTE_IS_HISTORY (self), 0); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; return g_list_length (priv->history); } /** * g_paste_history_get_current: * @self: a #GPasteHistory instance * * Get the name of the current history * * Returns: The name of the current history */ G_PASTE_VISIBLE const gchar * g_paste_history_get_current (const GPasteHistory *self) { g_return_val_if_fail (_G_PASTE_IS_HISTORY (self), 0); const GPasteHistoryPrivate *priv = _g_paste_history_get_instance_private (self); return priv->name; } /** * g_paste_history_search: * @self: a #GPasteHistory instance * @pattern: the pattern to match * * Get the elements matching @pattern in the history * * Returns: (transfer full): The uuids of the matching elements */ G_PASTE_VISIBLE GStrv g_paste_history_search (GPasteHistory *self, const gchar *pattern) { g_return_val_if_fail (_G_PASTE_IS_HISTORY (self), NULL); g_return_val_if_fail (pattern && g_utf8_validate (pattern, -1, NULL), NULL); g_debug ("history: search '%s'", pattern); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); G_PASTE_LOCK_HISTORY; g_autoptr (GError) error = NULL; g_autoptr (GRegex) regex = g_regex_new (pattern, G_REGEX_CASELESS|G_REGEX_MULTILINE|G_REGEX_DOTALL|G_REGEX_OPTIMIZE, G_REGEX_MATCH_NOTEMPTY|G_REGEX_MATCH_NEWLINE_ANY, &error); if (error) { g_warning ("error while creating regex: %s", error->message); return NULL; } if (!regex) return NULL; g_autoptr (GArray) results = g_array_new (TRUE, /* zero-terminated */ TRUE, /* clear */ sizeof (gchar *)); guint64 index = 0; for (GList *history = priv->history; history; history = g_list_next (history), ++index) { const GPasteItem *item = (GPasteItem *) history->data; const gchar *uuid = g_paste_item_get_uuid (item); gboolean match = FALSE; if (g_paste_str_equal (pattern, uuid)) match = TRUE; else if (_G_PASTE_IS_PASSWORD_ITEM (item) && g_paste_str_equal(pattern, g_paste_password_item_get_name (_G_PASTE_PASSWORD_ITEM (item)))) match = TRUE; else if (g_regex_match (regex, g_paste_item_get_value (item), G_REGEX_MATCH_NOTEMPTY|G_REGEX_MATCH_NEWLINE_ANY, NULL)) match = TRUE; if (match) { gchar *id = g_strdup (uuid); g_array_append_val (results, id); } } return g_array_steal (results, NULL); } /** * g_paste_history_new: * @settings: (transfer none): a #GPasteSettings instance * * Create a new instance of #GPasteHistory * * Returns: a newly allocated #GPasteHistory * free it with g_object_unref */ G_PASTE_VISIBLE GPasteHistory * g_paste_history_new (GPasteSettings *settings) { g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); GPasteHistory *self = g_object_new (G_PASTE_TYPE_HISTORY, NULL); GPasteHistoryPrivate *priv = g_paste_history_get_instance_private (self); priv->backend = g_paste_storage_backend_new (G_PASTE_STORAGE_DEFAULT, settings); priv->settings = g_object_ref (settings); priv->c_signals[C_CHANGED] = g_signal_connect (settings, "changed", G_CALLBACK (g_paste_history_settings_changed), self); return self; } /** * g_paste_history_list: * @error: a #GError * * Get the list of available histories * * Returns: (transfer full): The list of history names * free it with g_array_unref */ G_PASTE_VISIBLE GStrv g_paste_history_list (GError **error) { g_return_val_if_fail (!error || !(*error), NULL); g_autoptr (GArray) history_names = g_array_new (TRUE, /* zero-terminated */ TRUE, /* clear */ sizeof (gchar *)); g_autoptr (GFile) history_dir = g_paste_util_get_history_dir (); g_autoptr (GFileEnumerator) histories = g_file_enumerate_children (history_dir, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME, G_FILE_QUERY_INFO_NONE, NULL, /* cancellable */ error); if (error && *error) { if ((*error)->domain == G_FILE_ERROR && (*error)->code == G_IO_ERROR_NOT_FOUND) return g_strdupv ((GStrv) (gpointer) history_names->data); return NULL; } GFileInfo *history; while ((history = g_file_enumerator_next_file (histories, NULL, /* cancellable */ error))) /* error */ { g_autoptr (GFileInfo) h = history; if (error && *error) { g_array_unref (history_names); return NULL; } const gchar *raw_name = g_file_info_get_display_name (h); if (g_str_has_suffix (raw_name, ".xml")) { gchar *name = g_strdup (raw_name); name[strlen (name) - 4] = '\0'; g_array_append_val (history_names, name); } } return g_strdupv ((GStrv) (gpointer) history_names->data); } gpaste-3.42.6/src/libgpaste/core/gpaste-history.h000066400000000000000000000075601421222064600217240ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_HISTORY_H__ #define __G_PASTE_HISTORY_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_HISTORY (g_paste_history_get_type ()) G_PASTE_FINAL_TYPE (History, history, HISTORY, GObject) void g_paste_history_add (GPasteHistory *self, GPasteItem *item); void g_paste_history_remove (GPasteHistory *self, guint64 index); gboolean g_paste_history_remove_by_uuid (GPasteHistory *self, const gchar *uuid); const GPasteItem *g_paste_history_get (GPasteHistory *self, guint64 index); const GPasteItem *g_paste_history_get_by_uuid (GPasteHistory *self, const gchar *uuid); GPasteItem *g_paste_history_dup (GPasteHistory *self, guint64 index); gboolean g_paste_history_select (GPasteHistory *self, const gchar *uuid); void g_paste_history_replace (GPasteHistory *self, const gchar *uuid, const gchar *contents); void g_paste_history_refresh_item_size (GPasteHistory *self, const GPasteItem *item, guint64 old_size); void g_paste_history_set_password (GPasteHistory *self, const gchar *uuid, const gchar *name); const GPastePasswordItem *g_paste_history_get_password (GPasteHistory *self, const gchar *name); void g_paste_history_delete_password (GPasteHistory *self, const gchar *name); void g_paste_history_rename_password (GPasteHistory *self, const gchar *old_name, const gchar *new_name); void g_paste_history_empty (GPasteHistory *self); void g_paste_history_save (GPasteHistory *self, const gchar *name); void g_paste_history_load (GPasteHistory *self, const gchar *name); void g_paste_history_switch (GPasteHistory *self, const gchar *name); void g_paste_history_delete (GPasteHistory *self, const gchar *name, GError **error); const GList *g_paste_history_get_history (const GPasteHistory *self); guint64 g_paste_history_get_length (GPasteHistory *self); const gchar *g_paste_history_get_current (const GPasteHistory *self); GStrv g_paste_history_search (GPasteHistory *self, const gchar *pattern); GPasteHistory *g_paste_history_new (GPasteSettings *settings); GStrv g_paste_history_list (GError **error); G_END_DECLS #endif /*__G_PASTE_HISTORY_H__*/ gpaste-3.42.6/src/libgpaste/core/gpaste-image-item.c000066400000000000000000000227671421222064600222420ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include #include struct _GPasteImageItem { GPasteItem parent_instance; }; typedef struct _GPasteImageItemPrivate { gchar *checksum; GDateTime *date; GdkPixbuf *image; guint64 additional_size; } GPasteImageItemPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (ImageItem, image_item, G_PASTE_TYPE_ITEM) /** * g_paste_image_item_get_checksum: * @self: a #GPasteImageItem instance * * Get the checksum of the GdkPixbuf contained in the #GPasteImageItem * * Returns: read-only string representatig the SHA256 checksum of the image */ G_PASTE_VISIBLE const gchar * g_paste_image_item_get_checksum (const GPasteImageItem *self) { g_return_val_if_fail (_G_PASTE_IS_IMAGE_ITEM (self), NULL); const GPasteImageItemPrivate *priv = _g_paste_image_item_get_instance_private (self); return priv->checksum; } /** * g_paste_image_item_get_date: * @self: a #GPasteImageItem instance * * Get the date at which the image was created * * Returns: read-only GDateTime containing the image's creation date */ G_PASTE_VISIBLE const GDateTime * g_paste_image_item_get_date (const GPasteImageItem *self) { g_return_val_if_fail (_G_PASTE_IS_IMAGE_ITEM (self), NULL); const GPasteImageItemPrivate *priv = _g_paste_image_item_get_instance_private (self); return priv->date; } /** * g_paste_image_item_get_image: * @self: a #GPasteImageItem instance * * Get the image contained in the #GPasteImageItem * * Returns: (transfer none): the GdkPixbuf of the image */ G_PASTE_VISIBLE GdkPixbuf * g_paste_image_item_get_image (const GPasteImageItem *self) { g_return_val_if_fail (_G_PASTE_IS_IMAGE_ITEM (self), NULL); const GPasteImageItemPrivate *priv = _g_paste_image_item_get_instance_private (self); return priv->image; } G_PASTE_VISIBLE gboolean g_paste_image_item_is_growing (const GPasteImageItem *self, const GPasteImageItem *other) { g_return_val_if_fail (_G_PASTE_IS_IMAGE_ITEM (self), FALSE); g_return_val_if_fail (_G_PASTE_IS_IMAGE_ITEM (other), FALSE); const GPasteImageItemPrivate *priv = _g_paste_image_item_get_instance_private (self); const GPasteImageItemPrivate *_priv = _g_paste_image_item_get_instance_private (other); if (!priv->image || !_priv->image) return FALSE; gsize len = MIN (gdk_pixbuf_get_byte_length (priv->image), gdk_pixbuf_get_byte_length (_priv->image)); return !memcmp (gdk_pixbuf_read_pixels (priv->image), gdk_pixbuf_read_pixels (_priv->image), len); } static gboolean g_paste_image_item_equals (const GPasteItem *self, const GPasteItem *other) { if (!_G_PASTE_IS_IMAGE_ITEM (other)) return FALSE; const GPasteImageItemPrivate *priv = _g_paste_image_item_get_instance_private (_G_PASTE_IMAGE_ITEM (self)); const GPasteImageItemPrivate *_priv = _g_paste_image_item_get_instance_private (_G_PASTE_IMAGE_ITEM (other)); return g_paste_str_equal (priv->checksum, _priv->checksum); } static void g_paste_image_item_set_size (GPasteItem *self) { GPasteImageItemPrivate *priv = g_paste_image_item_get_instance_private (G_PASTE_IMAGE_ITEM (self)); GdkPixbuf *image = priv->image; if (image) { if (!priv->additional_size) { priv->additional_size += strlen (priv->checksum) + 1 + gdk_pixbuf_get_byte_length (image); g_paste_item_add_size (self, priv->additional_size); } } else { g_paste_item_remove_size (self, priv->additional_size); priv->additional_size = 0; } } static const gchar * g_paste_image_item_get_kind (const GPasteItem *self G_GNUC_UNUSED) { return "Image"; } static void g_paste_image_item_set_state (GPasteItem *self, GPasteItemState state) { GPasteImageItemPrivate *priv = g_paste_image_item_get_instance_private (G_PASTE_IMAGE_ITEM (self)); switch (state) { case G_PASTE_ITEM_STATE_IDLE: if (priv->image) { g_clear_object (&priv->image); g_clear_pointer (&priv->checksum, g_free); } break; case G_PASTE_ITEM_STATE_ACTIVE: if (!priv->image) { priv->image = gdk_pixbuf_new_from_file (g_paste_item_get_value (self), NULL); /* Error */ priv->checksum = g_paste_util_compute_checksum (priv->image); } break; } g_paste_image_item_set_size (self); } static void g_paste_image_item_dispose (GObject *object) { GPasteImageItemPrivate *priv = g_paste_image_item_get_instance_private (G_PASTE_IMAGE_ITEM (object)); GDateTime *date = priv->date; if (date) { g_date_time_unref (date); if (priv->image) g_object_unref (priv->image); priv->date = NULL; } G_OBJECT_CLASS (g_paste_image_item_parent_class)->dispose (object); } static void g_paste_image_item_finalize (GObject *object) { const GPasteImageItemPrivate *priv = _g_paste_image_item_get_instance_private (G_PASTE_IMAGE_ITEM (object)); g_free (priv->checksum); G_OBJECT_CLASS (g_paste_image_item_parent_class)->finalize (object); } static void g_paste_image_item_class_init (GPasteImageItemClass *klass) { GPasteItemClass *item_class = G_PASTE_ITEM_CLASS (klass); item_class->equals = g_paste_image_item_equals; item_class->get_kind = g_paste_image_item_get_kind; item_class->set_state = g_paste_image_item_set_state; GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gobject_class->dispose = g_paste_image_item_dispose; gobject_class->finalize = g_paste_image_item_finalize; } static void g_paste_image_item_init (GPasteImageItem *self G_GNUC_UNUSED) { } static GPasteItem * _g_paste_image_item_new (const gchar *path, GDateTime *date, GdkPixbuf *image, gchar *checksum) { GPasteItem *self = g_paste_item_new (G_PASTE_TYPE_IMAGE_ITEM, path); GPasteImageItemPrivate *priv = g_paste_image_item_get_instance_private (G_PASTE_IMAGE_ITEM (self)); priv->date = date; priv->image = image; if (image) priv->checksum = (checksum) ? checksum : g_paste_util_compute_checksum (image); else g_paste_image_item_set_state (G_PASTE_ITEM (self), G_PASTE_ITEM_STATE_ACTIVE); if (!priv->image || !GDK_IS_PIXBUF (priv->image)) { g_object_unref (self); return NULL; } /* This is the date format "month/day/year time" */ g_autofree gchar *formatted_date = g_date_time_format (date, _("%m/%d/%y %T")); /* This gets displayed in history when selecting an image */ g_autofree gchar *display_string = g_strdup_printf (_("[Image, %d x %d (%s)]"), gdk_pixbuf_get_width (priv->image), gdk_pixbuf_get_height (priv->image), formatted_date); g_paste_item_set_display_string (self, display_string); if (image) g_paste_image_item_set_size (self); else g_paste_image_item_set_state (G_PASTE_ITEM (self), G_PASTE_ITEM_STATE_IDLE); return self; } /** * g_paste_image_item_new: * @img: (transfer none): the GdkPixbuf we want to be contained in the #GPasteImageItem * * Create a new instance of #GPasteImageItem * * Returns: a newly allocated #GPasteImageItem * free it with g_object_unref */ G_PASTE_VISIBLE GPasteItem * g_paste_image_item_new (GdkPixbuf *img) { g_return_val_if_fail (GDK_IS_PIXBUF (img), NULL); gchar *checksum = g_paste_util_compute_checksum (img); g_autofree gchar *images_dir_path = g_build_filename (g_get_user_data_dir (), "gpaste", "images", NULL); g_autoptr (GFile) images_dir = g_file_new_for_path (images_dir_path); if (!g_file_query_exists (images_dir, NULL)) mkdir (images_dir_path, (mode_t) 0700); g_autofree gchar *filename = g_strconcat (checksum, ".png", NULL); g_autofree gchar *path = g_build_filename (images_dir_path, filename, NULL); GPasteItem *self = _g_paste_image_item_new (path, g_date_time_new_now_local (), g_object_ref (img), checksum); gdk_pixbuf_save (img, g_paste_item_get_value (self), "png", NULL, /* Error */ NULL); /* Params */ return self; } /** * g_paste_image_item_new_from_file: * @path: the path to the image we want to be contained in the #GPasteImageItem * @date: (transfer none): the date at which the image was created * * Create a new instance of #GPasteImageItem * * Returns: a newly allocated #GPasteImageItem * free it with g_object_unref */ G_PASTE_VISIBLE GPasteItem * g_paste_image_item_new_from_file (const gchar *path, GDateTime *date) { g_return_val_if_fail (path, NULL); g_return_val_if_fail (g_utf8_validate (path, -1, NULL), NULL); g_return_val_if_fail (date, NULL); return _g_paste_image_item_new (path, g_date_time_ref (date), NULL, /* GdkPixbuf */ NULL); /* Checksum */ } gpaste-3.42.6/src/libgpaste/core/gpaste-image-item.h000066400000000000000000000022011421222064600222240ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_IMAGE_ITEM_H__ #define __G_PASTE_IMAGE_ITEM_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_IMAGE_ITEM (g_paste_image_item_get_type ()) G_PASTE_FINAL_TYPE (ImageItem, image_item, IMAGE_ITEM, GPasteItem) const gchar *g_paste_image_item_get_checksum (const GPasteImageItem *self); const GDateTime *g_paste_image_item_get_date (const GPasteImageItem *self); GdkPixbuf *g_paste_image_item_get_image (const GPasteImageItem *self); gboolean g_paste_image_item_is_growing (const GPasteImageItem *self, const GPasteImageItem *other); GPasteItem *g_paste_image_item_new (GdkPixbuf *img); GPasteItem *g_paste_image_item_new_from_file (const gchar *path, GDateTime *date); G_END_DECLS #endif /*__G_PASTE_IMAGE_ITEM_H__*/ gpaste-3.42.6/src/libgpaste/core/gpaste-item-enums.c000066400000000000000000000016351421222064600222760ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include G_PASTE_VISIBLE GType g_paste_item_kind_get_type (void) { static GType etype = 0; if (!etype) { static const GEnumValue values[] = { { G_PASTE_ITEM_KIND_TEXT, "G_PASTE_ITEM_KIND_TEXT", "Text" }, { G_PASTE_ITEM_KIND_URIS, "G_PASTE_ITEM_KIND_URIS", "Uris" }, { G_PASTE_ITEM_KIND_IMAGE, "G_PASTE_ITEM_KIND_IMAGE", "Image" }, { G_PASTE_ITEM_KIND_PASSWORD, "G_PASTE_ITEM_KIND_PASSWORD", "Password" }, { G_PASTE_ITEM_KIND_INVALID, NULL, NULL } }; etype = g_enum_register_static (g_intern_static_string ("GPasteItemKind"), values); g_type_class_ref (etype); } return etype; } gpaste-3.42.6/src/libgpaste/core/gpaste-item-enums.h000066400000000000000000000012751421222064600223030ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_ITEM_ENUMS_H__ #define __G_PASTE_ITEM_ENUMS_H__ #include G_BEGIN_DECLS typedef enum { G_PASTE_ITEM_KIND_TEXT = 1, G_PASTE_ITEM_KIND_URIS, G_PASTE_ITEM_KIND_IMAGE, G_PASTE_ITEM_KIND_PASSWORD, G_PASTE_ITEM_KIND_INVALID = 0 } GPasteItemKind; #define G_PASTE_TYPE_ITEM_KIND (g_paste_item_kind_get_type ()) GType g_paste_item_kind_get_type (void); G_END_DECLS #endif /*__G_PASTE_ITEM_ENUMS_H__*/ gpaste-3.42.6/src/libgpaste/core/gpaste-item.c000066400000000000000000000246651421222064600211610ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include typedef struct { gchar *uuid; gchar *value; GSList *special_values; gchar *display_string; guint64 size; } GPasteItemPrivate; G_PASTE_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (Item, item, G_TYPE_OBJECT) /** * g_paste_item_get_uuid: * @self: a #GPasteItem instance * * Get the uuid of the given item * * Returns: read-only string containing the uuid */ G_PASTE_VISIBLE const gchar * g_paste_item_get_uuid (const GPasteItem *self) { g_return_val_if_fail (_G_PASTE_IS_ITEM (self), NULL); const GPasteItemPrivate *priv = _g_paste_item_get_instance_private (self); return priv->uuid; } /** * g_paste_item_get_value: * @self: a #GPasteItem instance * * Get the value of the given item (text, uris or path to the image) * * Returns: read-only string containing the value */ G_PASTE_VISIBLE const gchar * g_paste_item_get_value (const GPasteItem *self) { g_return_val_if_fail (_G_PASTE_IS_ITEM (self), NULL); return _G_PASTE_ITEM_GET_CLASS (self)->get_value (self); } /** * g_paste_item_get_real_value: * @self: a #GPasteItem instance * * Get the real value of the given item (text, uris or path to the image) * This is different from get_value only for #GPastePasswordItem * * Returns: read-only string containing the real value */ G_PASTE_VISIBLE const gchar * g_paste_item_get_real_value (const GPasteItem *self) { g_return_val_if_fail (_G_PASTE_IS_ITEM (self), NULL); const GPasteItemPrivate *priv = _g_paste_item_get_instance_private (self); return priv->value; } /** * g_paste_item_get_special_values: * @self: a #GPasteItem instance * * Get the special values (special mime types) for an item * * Returns: (element-type GPasteSpecialValue): read-only list containing the special values */ G_PASTE_VISIBLE const GSList * g_paste_item_get_special_values (const GPasteItem *self) { g_return_val_if_fail (_G_PASTE_IS_ITEM (self), NULL); const GPasteItemPrivate *priv = _g_paste_item_get_instance_private (self); return priv->special_values; } /** * g_paste_item_get_special_value: * @self: a #GPasteItem instance * @atom: the value we want to get * * Get the special value (special mime type) for an item * * Returns: read-only special value */ G_PASTE_VISIBLE const gchar * g_paste_item_get_special_value (const GPasteItem *self, GPasteSpecialAtom atom) { g_return_val_if_fail (_G_PASTE_IS_ITEM (self), NULL); const GPasteItemPrivate *priv = _g_paste_item_get_instance_private (self); for (GSList *sv = priv->special_values; sv; sv = sv->next) { GPasteSpecialValue *v = sv->data; if (v->mime == atom) return v->data; } return NULL; } /** * g_paste_item_get_display_string: * @self: a #GPasteItem instance * * Get the string we should use to display the #GPasteItem * * Returns: read-only display string */ G_PASTE_VISIBLE const gchar * g_paste_item_get_display_string (const GPasteItem *self) { g_return_val_if_fail (_G_PASTE_IS_ITEM (self), NULL); const GPasteItemPrivate *priv = _g_paste_item_get_instance_private (self); const gchar *display_string = priv->display_string; return (display_string) ? display_string : priv->value; } /** * g_paste_item_equals: * @self: a #GPasteItem instance * @other: another #GPasteItem instance * * Compare the two instances * * Returns: true if equals, false otherwise */ G_PASTE_VISIBLE gboolean g_paste_item_equals (const GPasteItem *self, const GPasteItem *other) { g_return_val_if_fail (_G_PASTE_IS_ITEM (self), FALSE); g_return_val_if_fail (_G_PASTE_IS_ITEM (other), FALSE); if (self == other) return TRUE; return _G_PASTE_ITEM_GET_CLASS (self)->equals (self, other) && _G_PASTE_ITEM_GET_CLASS (other)->equals (other, self); } /** * g_paste_item_get_kind: * @self: a #GPasteItem instance * * Get the kind of #GPasteItem as string (for serialization) * * Returns: read-only string containing the kind of GPasteItem * can be "Text", "Uris" or "Image" */ G_PASTE_VISIBLE const gchar * g_paste_item_get_kind (const GPasteItem *self) { g_return_val_if_fail (_G_PASTE_IS_ITEM (self), NULL); const GPasteItemClass *klass = _G_PASTE_ITEM_GET_CLASS (self); g_return_val_if_fail (klass->get_kind, NULL); return klass->get_kind (self); } /** * g_paste_item_get_size: * @self: a #GPasteItem instance * * Get the size of the #GPasteItem * * Returns: The size of its contents */ G_PASTE_VISIBLE guint64 g_paste_item_get_size (const GPasteItem *self) { g_return_val_if_fail (_G_PASTE_IS_ITEM (self), 0); const GPasteItemPrivate *priv = _g_paste_item_get_instance_private (self); return priv->size; } /** * g_paste_item_set_size: * @self: a #GPasteItem instance * @size: the new size * * Set the size of the item */ G_PASTE_VISIBLE void g_paste_item_set_size (GPasteItem *self, guint64 size) { g_return_if_fail (_G_PASTE_IS_ITEM (self)); GPasteItemPrivate *priv = g_paste_item_get_instance_private (self); priv->size = size; } /** * g_paste_item_add_size: * @self: a #GPasteItem instance * @size: the size to add * * Add some size of the item */ G_PASTE_VISIBLE void g_paste_item_add_size (GPasteItem *self, guint64 size) { g_return_if_fail (_G_PASTE_IS_ITEM (self)); GPasteItemPrivate *priv = g_paste_item_get_instance_private (self); priv->size += size; } /** * g_paste_item_remove_size: * @self: a #GPasteItem instance * @size: the size to remove * * Remove some size from the item */ G_PASTE_VISIBLE void g_paste_item_remove_size (GPasteItem *self, guint64 size) { g_return_if_fail (_G_PASTE_IS_ITEM (self)); GPasteItemPrivate *priv = g_paste_item_get_instance_private (self); g_return_if_fail (priv->size >= size); priv->size -= size; } /** * g_paste_item_set_display_string: * @self: a #GPasteItem instance * @display_string: the new display string * * Set the string to display */ G_PASTE_VISIBLE void g_paste_item_set_display_string (GPasteItem *self, const gchar *display_string) { g_return_if_fail (_G_PASTE_IS_ITEM (self)); GPasteItemPrivate *priv = g_paste_item_get_instance_private (self); if (priv->display_string) { priv->size -= (strlen (priv->display_string) + 1); g_free (priv->display_string); } if (display_string) { priv->display_string = g_strdup (display_string); priv->size += strlen (display_string) + 1; } else priv->display_string = NULL; } /** * g_paste_item_add_special_value: * @self: a #GPasteItem instance * @special_value: the special value * * Add the special values (special mime types) for an item */ G_PASTE_VISIBLE void g_paste_item_add_special_value (GPasteItem *self, const GPasteSpecialValue *special_value) { g_return_if_fail (_G_PASTE_IS_ITEM (self)); GPasteItemPrivate *priv = g_paste_item_get_instance_private (self); GPasteSpecialValue *gsv = g_new (GPasteSpecialValue, 1); gsv->mime = special_value->mime; gsv->data = g_strdup (special_value->data); priv->special_values = g_slist_prepend (priv->special_values, gsv); priv->size += strlen (gsv->data); } /** * g_paste_item_set_state: * @self: a #GPasteItem instance * @state: a #GPasteItemState * * Set whether this item is Active or Idle */ G_PASTE_VISIBLE void g_paste_item_set_state (GPasteItem *self, GPasteItemState state) { g_return_if_fail (_G_PASTE_IS_ITEM (self)); g_debug ("item: set state: %d", state); G_PASTE_ITEM_GET_CLASS (self)->set_state (self, state); } /** * g_paste_item_set_uuid: * @self: a #GPasteItem instance * @uuid: the new uuid * * Set the uuid of the item */ G_PASTE_VISIBLE void g_paste_item_set_uuid (GPasteItem *self, const gchar *uuid) { g_return_if_fail (_G_PASTE_IS_ITEM (self)); g_return_if_fail (g_uuid_string_is_valid (uuid)); GPasteItemPrivate *priv = g_paste_item_get_instance_private (self); g_free (priv->uuid); priv->uuid = g_strdup (uuid); } static void g_paste_item_finalize (GObject *object) { const GPasteItemPrivate *priv = _g_paste_item_get_instance_private (G_PASTE_ITEM (object)); g_free (priv->uuid); g_free (priv->value); g_free (priv->display_string); for (GSList *sv = priv->special_values; sv; sv = sv->next) { GPasteSpecialValue *gsv = sv->data; g_free (gsv->data); g_free (gsv); } g_slist_free (priv->special_values); G_OBJECT_CLASS (g_paste_item_parent_class)->finalize (object); } static gboolean g_paste_item_default_equals (const GPasteItem *self, const GPasteItem *other) { if (self == other) return TRUE; const GPasteItemPrivate *priv = _g_paste_item_get_instance_private (self); const GPasteItemPrivate *_priv = _g_paste_item_get_instance_private (other); return g_paste_str_equal (priv->value, _priv->value); } static void g_paste_item_default_set_state (GPasteItem *self G_GNUC_UNUSED, GPasteItemState state G_GNUC_UNUSED) { } static void g_paste_item_class_init (GPasteItemClass *klass) { klass->equals = g_paste_item_default_equals; klass->get_value = g_paste_item_get_real_value; klass->get_kind = NULL; klass->set_state = g_paste_item_default_set_state; G_OBJECT_CLASS (klass)->finalize = g_paste_item_finalize; } static void g_paste_item_init (GPasteItem *self G_GNUC_UNUSED) { } /** * g_paste_item_new: * @type: the type of the subclass to instantiate * @value: the value of the item * * Create a new instance of #GPasteItem * * Returns: a newly allocated #GPasteItem * free it with g_object_unref */ G_PASTE_VISIBLE GPasteItem * g_paste_item_new (GType type, const gchar *value) { g_return_val_if_fail (g_type_is_a (type, G_PASTE_TYPE_ITEM), NULL); g_return_val_if_fail (value, NULL); GPasteItem *self = g_object_new (type, NULL); GPasteItemPrivate *priv = g_paste_item_get_instance_private (self); priv->uuid = g_uuid_string_random (); priv->value = g_strdup (value); priv->display_string = NULL; priv->size = strlen (priv->value) + 1; return self; } gpaste-3.42.6/src/libgpaste/core/gpaste-item.h000066400000000000000000000054251421222064600211570ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_ITEM_H__ #define __G_PASTE_ITEM_H__ #include G_BEGIN_DECLS typedef enum { G_PASTE_ITEM_STATE_IDLE, G_PASTE_ITEM_STATE_ACTIVE } GPasteItemState; typedef struct { GPasteSpecialAtom mime; gchar *data; } GPasteSpecialValue; #define G_PASTE_TYPE_ITEM (g_paste_item_get_type ()) G_PASTE_DERIVABLE_TYPE (Item, item, ITEM, GObject) struct _GPasteItemClass { GObjectClass parent_class; /*< virtual >*/ const gchar * (*get_value) (const GPasteItem *self); gboolean (*equals) (const GPasteItem *self, const GPasteItem *other); void (*set_state) (GPasteItem *self, GPasteItemState state); /*< pure virtual >*/ const gchar *(*get_kind) (const GPasteItem *self); }; const gchar *g_paste_item_get_uuid (const GPasteItem *self); const gchar *g_paste_item_get_value (const GPasteItem *self); const gchar *g_paste_item_get_real_value (const GPasteItem *self); const GSList *g_paste_item_get_special_values (const GPasteItem *self); const gchar *g_paste_item_get_special_value (const GPasteItem *self, GPasteSpecialAtom atom); const gchar *g_paste_item_get_display_string (const GPasteItem *self); gboolean g_paste_item_equals (const GPasteItem *self, const GPasteItem *other); const gchar *g_paste_item_get_kind (const GPasteItem *self); guint64 g_paste_item_get_size (const GPasteItem *self); void g_paste_item_set_state (GPasteItem *self, GPasteItemState state); void g_paste_item_set_uuid (GPasteItem *self, const gchar *uuid); void g_paste_item_set_display_string (GPasteItem *self, const gchar *display_string); void g_paste_item_add_special_value (GPasteItem *self, const GPasteSpecialValue *special_value); void g_paste_item_set_size (GPasteItem *self, guint64 size); void g_paste_item_add_size (GPasteItem *self, guint64 size); void g_paste_item_remove_size (GPasteItem *self, guint64 size); GPasteItem *g_paste_item_new (GType type, const gchar *value); G_END_DECLS #endif /*__G_PASTE_ITEM_H__*/ gpaste-3.42.6/src/libgpaste/core/gpaste-password-item.c000066400000000000000000000077621421222064600230200ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include struct _GPastePasswordItem { GPasteTextItem parent_instance; }; typedef struct { gchar *name; } GPastePasswordItemPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (PasswordItem, password_item, G_PASTE_TYPE_TEXT_ITEM) /** * g_paste_password_item_get_name: * @self: a #GPastePasswordItem instance * * Get the name of the given item * * Returns: read-only string containing the name */ G_PASTE_VISIBLE const gchar * g_paste_password_item_get_name (const GPastePasswordItem *self) { g_return_val_if_fail (_G_PASTE_IS_PASSWORD_ITEM (self), NULL); const GPastePasswordItemPrivate *priv = _g_paste_password_item_get_instance_private (self); return priv->name; } /** * g_paste_password_item_set_name: * @self: a #GPastePasswordItem instance * @name: (nullable): the new name * * Set the name of the given item */ G_PASTE_VISIBLE void g_paste_password_item_set_name (GPastePasswordItem *self, const gchar *name) { g_return_if_fail (_G_PASTE_IS_PASSWORD_ITEM (self)); g_return_if_fail (!name || g_utf8_validate (name, -1, NULL)); GPastePasswordItemPrivate *priv = g_paste_password_item_get_instance_private (self); if (!name) name = "******"; GPasteItem *item = G_PASTE_ITEM (self); g_paste_item_add_size (item, strlen (name) - ((priv->name) ? strlen(priv->name) : 0)); g_free (priv->name); priv->name = g_strdup (name); // This is the prefix displayed in history to identify a password g_autofree gchar *full_display_string = g_strdup_printf ("[%s] %s", _("Password"), name); g_paste_item_set_display_string (item, full_display_string); } static const gchar * g_paste_password_item_get_value (const GPasteItem *self G_GNUC_UNUSED) { return "******"; } static const gchar * g_paste_password_item_get_kind (const GPasteItem *self G_GNUC_UNUSED) { return "Password"; } static gboolean g_paste_password_item_equals (const GPasteItem *self, const GPasteItem *other) { g_return_val_if_fail (_G_PASTE_IS_PASSWORD_ITEM (self), FALSE); g_return_val_if_fail (_G_PASTE_IS_ITEM (other), FALSE); /* Passwords are never considered equals, except when it's the exact same object */ return FALSE; } static void g_paste_password_item_finalize (GObject *object) { const GPastePasswordItemPrivate *priv = _g_paste_password_item_get_instance_private (G_PASTE_PASSWORD_ITEM (object)); g_free (priv->name); G_OBJECT_CLASS (g_paste_password_item_parent_class)->finalize (object); } static void g_paste_password_item_class_init (GPastePasswordItemClass *klass) { GPasteItemClass *item_class = G_PASTE_ITEM_CLASS (klass); item_class->get_kind = g_paste_password_item_get_kind; item_class->get_value = g_paste_password_item_get_value; item_class->equals = g_paste_password_item_equals; G_OBJECT_CLASS (klass)->finalize = g_paste_password_item_finalize; } static void g_paste_password_item_init (GPastePasswordItem *self G_GNUC_UNUSED) { } /** * g_paste_password_item_new: * @name: (nullable): the name used to identify the password * @password: the content of the desired #GPastePasswordItem * * Create a new instance of #GPastePasswordItem * * Returns: a newly allocated #GPastePasswordItem * free it with g_object_unref */ G_PASTE_VISIBLE GPasteItem * g_paste_password_item_new (const gchar *name, const gchar *password) { g_return_val_if_fail (password, NULL); g_return_val_if_fail (g_utf8_validate (password, -1, NULL), NULL); g_return_val_if_fail (!name || g_utf8_validate (name, -1, NULL), NULL); GPasteItem *self = g_paste_item_new (G_PASTE_TYPE_PASSWORD_ITEM, password); /* override password value length */ g_paste_item_set_size (self, 0); g_paste_password_item_set_name (G_PASTE_PASSWORD_ITEM (self), name); return self; } gpaste-3.42.6/src/libgpaste/core/gpaste-password-item.h000066400000000000000000000016071421222064600230150ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_PASSWORD_ITEM_H__ #define __G_PASTE_PASSWORD_ITEM_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_PASSWORD_ITEM (g_paste_password_item_get_type ()) G_PASTE_FINAL_TYPE (PasswordItem, password_item, PASSWORD_ITEM, GPasteTextItem) const gchar *g_paste_password_item_get_name (const GPastePasswordItem *self); void g_paste_password_item_set_name (GPastePasswordItem *self, const char *name); GPasteItem *g_paste_password_item_new (const gchar *name, const gchar *password); G_END_DECLS #endif /*__G_PASTE_PASSWORD_ITEM_H__*/ gpaste-3.42.6/src/libgpaste/core/gpaste-special-atom.c000066400000000000000000000035651421222064600225750ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include static GdkAtom special_atoms[G_PASTE_SPECIAL_ATOM_LAST] = { 0 }; static void g_paste_special_atom_init(void) { static gboolean inited = FALSE; if (!inited) { g_debug("atoms init"); special_atoms[G_PASTE_SPECIAL_ATOM_GNOME_COPIED_FILES] = gdk_atom_intern_static_string ("x-special/gnome-copied-files"); special_atoms[G_PASTE_SPECIAL_ATOM_TEXT_HTML] = gdk_atom_intern_static_string ("text/html"); special_atoms[G_PASTE_SPECIAL_ATOM_TEXT_XML] = gdk_atom_intern_static_string ("text/xml"); inited = TRUE; } } G_PASTE_VISIBLE GType g_paste_special_atom_get_type (void) { static GType etype = 0; if (!etype) { g_paste_special_atom_init (); static const GEnumValue values[] = { { G_PASTE_SPECIAL_ATOM_GNOME_COPIED_FILES, "G_PASTE_SPECIAL_ATOM_GNOME_COPIED_FILES", "gnome-copied-files" }, { G_PASTE_SPECIAL_ATOM_TEXT_HTML, "G_PASTE_SPECIAL_ATOM_TEXT_HTML", "text-html" }, { G_PASTE_SPECIAL_ATOM_TEXT_XML, "G_PASTE_SPECIAL_ATOM_TEXT_XML", "text-xml" }, { G_PASTE_SPECIAL_ATOM_INVALID, NULL, NULL }, }; etype = g_enum_register_static (g_intern_static_string ("GPasteSpecialAtom"), values); g_type_class_ref (etype); } return etype; } /** * g_paste_special_atom_get * @atom: the atom we want to get * * Find special atoms handled by GPaste * * Returns: (transfer none): the atom corresponding to @atom */ G_PASTE_VISIBLE GdkAtom g_paste_special_atom_get (GPasteSpecialAtom atom) { g_paste_special_atom_init (); return special_atoms[atom]; } gpaste-3.42.6/src/libgpaste/core/gpaste-special-atom.h000066400000000000000000000015521421222064600225740ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #include #ifndef __G_PASTE_SPECIAL_ATOM_H__ #define __G_PASTE_SPECIAL_ATOM_H__ G_BEGIN_DECLS typedef enum { G_PASTE_SPECIAL_ATOM_FIRST, G_PASTE_SPECIAL_ATOM_GNOME_COPIED_FILES = G_PASTE_SPECIAL_ATOM_FIRST, G_PASTE_SPECIAL_ATOM_TEXT_HTML, G_PASTE_SPECIAL_ATOM_TEXT_XML, G_PASTE_SPECIAL_ATOM_LAST, G_PASTE_SPECIAL_ATOM_INVALID = -1 } GPasteSpecialAtom; #define G_PASTE_TYPE_SPECIAL_ATOM (g_paste_special_atom_get_type ()) GType g_paste_special_atom_get_type (void); GdkAtom g_paste_special_atom_get (GPasteSpecialAtom atom); G_END_DECLS #endif /*__G_PASTE_SPECIAL_ATOM_H__*/ gpaste-3.42.6/src/libgpaste/core/gpaste-text-item.c000066400000000000000000000025261421222064600221330ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include G_PASTE_DEFINE_TYPE (TextItem, text_item, G_PASTE_TYPE_ITEM) static gboolean g_paste_text_item_equals (const GPasteItem *self, const GPasteItem *other) { return (_G_PASTE_IS_TEXT_ITEM (other) && G_PASTE_ITEM_CLASS (g_paste_text_item_parent_class)->equals (self, other)); } static const gchar * g_paste_text_item_get_kind (const GPasteItem *self G_GNUC_UNUSED) { return "Text"; } static void g_paste_text_item_class_init (GPasteTextItemClass *klass) { GPasteItemClass *item_class = G_PASTE_ITEM_CLASS (klass); item_class->equals = g_paste_text_item_equals; item_class->get_kind = g_paste_text_item_get_kind; } static void g_paste_text_item_init (GPasteTextItem *self G_GNUC_UNUSED) { } /** * g_paste_text_item_new: * @text: the content of the desired #GPasteTextItem * * Create a new instance of #GPasteTextItem * * Returns: a newly allocated #GPasteTextItem * free it with g_object_unref */ G_PASTE_VISIBLE GPasteItem * g_paste_text_item_new (const gchar *text) { g_return_val_if_fail (text, NULL); g_return_val_if_fail (g_utf8_validate (text, -1, NULL), NULL); return g_paste_item_new (G_PASTE_TYPE_TEXT_ITEM, text); } gpaste-3.42.6/src/libgpaste/core/gpaste-text-item.h000066400000000000000000000012251421222064600221330ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_TEXT_ITEM_H__ #define __G_PASTE_TEXT_ITEM_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_TEXT_ITEM (g_paste_text_item_get_type ()) G_PASTE_DERIVABLE_TYPE (TextItem, text_item, TEXT_ITEM, GPasteItem) struct _GPasteTextItemClass { GPasteItemClass parent_class; }; GPasteItem *g_paste_text_item_new (const gchar *text); G_END_DECLS #endif /*__G_PASTE_TEXT_ITEM_H__*/ gpaste-3.42.6/src/libgpaste/core/gpaste-update-enums.c000066400000000000000000000025501421222064600226170ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include G_PASTE_VISIBLE GType g_paste_update_action_get_type (void) { static GType etype = 0; if (!etype) { static const GEnumValue values[] = { { G_PASTE_UPDATE_ACTION_REPLACE, "G_PASTE_UPDATE_ACTION_REPLACE", "REPLACE" }, { G_PASTE_UPDATE_ACTION_REMOVE, "G_PASTE_UPDATE_ACTION_REMOVE", "REMOVE" }, { G_PASTE_UPDATE_ACTION_INVALID, NULL, NULL } }; etype = g_enum_register_static (g_intern_static_string ("GPasteUpdateAction"), values); g_type_class_ref (etype); } return etype; } G_PASTE_VISIBLE GType g_paste_update_target_get_type (void) { static GType etype = 0; if (!etype) { static const GEnumValue values[] = { { G_PASTE_UPDATE_TARGET_ALL, "G_PASTE_UPDATE_TARGET_ALL", "ALL" }, { G_PASTE_UPDATE_TARGET_POSITION, "G_PASTE_UPDATE_TARGET_POSITION", "POSITION" }, { G_PASTE_UPDATE_TARGET_INVALID, NULL, NULL } }; etype = g_enum_register_static (g_intern_static_string ("GPasteUpdateTarget"), values); g_type_class_ref (etype); } return etype; } gpaste-3.42.6/src/libgpaste/core/gpaste-update-enums.h000066400000000000000000000016571421222064600226330ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UPDATE_ENUMS_H__ #define __G_PASTE_UPDATE_ENUMS_H__ #include G_BEGIN_DECLS typedef enum { G_PASTE_UPDATE_ACTION_REPLACE = 1, G_PASTE_UPDATE_ACTION_REMOVE, G_PASTE_UPDATE_ACTION_INVALID = 0 } GPasteUpdateAction; #define G_PASTE_TYPE_UPDATE_ACTION (g_paste_update_action_get_type ()) GType g_paste_update_action_get_type (void); typedef enum { G_PASTE_UPDATE_TARGET_ALL = 1, G_PASTE_UPDATE_TARGET_POSITION, G_PASTE_UPDATE_TARGET_INVALID = 0 } GPasteUpdateTarget; #define G_PASTE_TYPE_UPDATE_TARGET (g_paste_update_target_get_type ()) GType g_paste_update_target_get_type (void); G_END_DECLS #endif /*__G_PASTE_UPDATE_ENUMS_H__*/ gpaste-3.42.6/src/libgpaste/core/gpaste-uris-item.c000066400000000000000000000065411421222064600221320ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include struct _GPasteUrisItem { GPasteTextItem parent_instance; }; typedef struct { GStrv uris; } GPasteUrisItemPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UrisItem, uris_item, G_PASTE_TYPE_TEXT_ITEM) /** * g_paste_uris_item_get_uris: * @self: a #GPasteUrisItem instance * * Get the list of uris contained in the #GPasteUrisItem * * Returns: (transfer none): read-only array of read-only uris (strings) */ G_PASTE_VISIBLE const gchar * const * g_paste_uris_item_get_uris (const GPasteUrisItem *self) { g_return_val_if_fail (_G_PASTE_IS_URIS_ITEM (self), FALSE); const GPasteUrisItemPrivate *priv = _g_paste_uris_item_get_instance_private (self); return (const gchar * const *) priv->uris; } static gboolean g_paste_uris_item_equals (const GPasteItem *self, const GPasteItem *other) { return (_G_PASTE_IS_URIS_ITEM (other) && G_PASTE_ITEM_CLASS (g_paste_uris_item_parent_class)->equals (self, other)); } static const gchar * g_paste_uris_item_get_kind (const GPasteItem *self G_GNUC_UNUSED) { return "Uris"; } static void g_paste_uris_item_finalize (GObject *object) { const GPasteUrisItemPrivate *priv = _g_paste_uris_item_get_instance_private (G_PASTE_URIS_ITEM (object)); g_strfreev (priv->uris); G_OBJECT_CLASS (g_paste_uris_item_parent_class)->finalize (object); } static void g_paste_uris_item_class_init (GPasteUrisItemClass *klass) { GPasteItemClass *item_class = G_PASTE_ITEM_CLASS (klass); item_class->equals = g_paste_uris_item_equals; item_class->get_kind = g_paste_uris_item_get_kind; G_OBJECT_CLASS (klass)->finalize = g_paste_uris_item_finalize; } static void g_paste_uris_item_init (GPasteUrisItem *self G_GNUC_UNUSED) { } /** * g_paste_uris_item_new: * @uris: a string containing the paths separated by "\n" (as returned by gtk_clipboard_wait_for_uris) * * Create a new instance of #GPasteUrisItem * * Returns: a newly allocated #GPasteUrisItem * free it with g_object_unref */ G_PASTE_VISIBLE GPasteItem * g_paste_uris_item_new (const gchar *uris) { g_return_val_if_fail (uris, NULL); g_return_val_if_fail (g_utf8_validate (uris, -1, NULL), NULL); GPasteItem *self = g_paste_item_new (G_PASTE_TYPE_URIS_ITEM, uris); GPasteUrisItemPrivate *priv = g_paste_uris_item_get_instance_private (G_PASTE_URIS_ITEM (self)); g_autofree gchar *display_string_with_newlines = g_paste_util_replace (uris, g_get_home_dir (), "~"); g_autofree gchar *display_string = g_paste_util_replace (display_string_with_newlines, "\n", " "); // This is the prefix displayed in history to identify selected files g_autofree gchar *full_display_string = g_strconcat (_("[Files] "), display_string, NULL); g_paste_item_set_display_string (self, full_display_string); g_auto (GStrv) paths = g_strsplit (uris, "\n", 0); guint64 length = g_strv_length (paths); g_paste_item_add_size (self, length + 1); GStrv _uris = priv->uris = g_new (gchar *, length + 1); for (guint64 i = 0; i < length; ++i) { _uris[i] = g_strconcat ("file://", paths[i], NULL); g_paste_item_add_size (self, strlen (_uris[i]) + 1); } _uris[length] = NULL; return self; } gpaste-3.42.6/src/libgpaste/core/gpaste-uris-item.h000066400000000000000000000012451421222064600221330ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_URIS_ITEM_H__ #define __G_PASTE_URIS_ITEM_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_URIS_ITEM (g_paste_uris_item_get_type ()) G_PASTE_FINAL_TYPE (UrisItem, uris_item, URIS_ITEM, GPasteTextItem) const gchar * const *g_paste_uris_item_get_uris (const GPasteUrisItem *self); GPasteItem *g_paste_uris_item_new (const gchar *uris); G_END_DECLS #endif /*__G_PASTE_URIS_ITEM_H__*/ gpaste-3.42.6/src/libgpaste/daemon/000077500000000000000000000000001421222064600170745ustar00rootroot00000000000000gpaste-3.42.6/src/libgpaste/daemon/gpaste-bus-object.c000066400000000000000000000022421421222064600225560ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include "gpaste-bus-object.h" G_PASTE_DEFINE_ABSTRACT_TYPE (BusObject, bus_object, G_TYPE_OBJECT) /** * g_paste_bus_object_register_on_connection: * @self: a #GPasteBusObject * @connection: a #GDBusConnection * @error: a #GError * * Register the #GPasteBusObject on the connection * * Returns: Whether the action succeeded or not */ G_PASTE_VISIBLE gboolean g_paste_bus_object_register_on_connection (GPasteBusObject *self, GDBusConnection *connection, GError **error) { g_return_val_if_fail (_G_PASTE_IS_BUS_OBJECT (self), FALSE); g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), FALSE); g_return_val_if_fail (!error || !(*error), FALSE); return G_PASTE_BUS_OBJECT_GET_CLASS (self)->register_on_connection (self, connection, error); } static void g_paste_bus_object_class_init (GPasteBusObjectClass *klass) { klass->register_on_connection = NULL; } static void g_paste_bus_object_init (GPasteBusObject *self G_GNUC_UNUSED) { } gpaste-3.42.6/src/libgpaste/daemon/gpaste-bus-object.h000066400000000000000000000020531421222064600225630ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_BUS_OBJECT_H__ #define __G_PASTE_BUS_OBJECT_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_BUS_OBJECT (g_paste_bus_object_get_type ()) G_PASTE_DERIVABLE_TYPE (BusObject, bus_object, BUS_OBJECT, GObject) struct _GPasteBusObjectClass { GObjectClass parent_class; /*< pure virtual >*/ gboolean (*register_on_connection) (GPasteBusObject *self, GDBusConnection *connection, GError **error); }; gboolean g_paste_bus_object_register_on_connection (GPasteBusObject *self, GDBusConnection *connection, GError **error); G_END_DECLS #endif /*__G_PASTE_BUS_OBJECT_H__*/ gpaste-3.42.6/src/libgpaste/daemon/gpaste-bus.c000066400000000000000000000106751421222064600213230ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include struct _GPasteBus { GObject parent_instance; }; typedef struct { GDBusConnection *connection; guint64 id_on_bus; GPasteBusAcquiredCallback on_bus_acquired; gpointer user_data; } GPasteBusPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (Bus, bus, G_TYPE_OBJECT) enum { NAME_LOST, LAST_SIGNAL }; static guint64 signals[LAST_SIGNAL] = { 0 }; static void g_paste_bus_on_bus_acquired (GDBusConnection *connection, const char *name G_GNUC_UNUSED, gpointer user_data) { GPasteBus *self = user_data; GPasteBusPrivate *priv = g_paste_bus_get_instance_private (self); priv->connection = g_object_ref (connection); if (priv->on_bus_acquired) priv->on_bus_acquired (self, priv->user_data); } static void g_paste_bus_on_name_lost (GDBusConnection *connection G_GNUC_UNUSED, const char *name G_GNUC_UNUSED, gpointer user_data) { g_signal_emit (G_PASTE_BUS (user_data), signals[NAME_LOST], 0, /* detail */ NULL); } /** * g_paste_bus_own_name: * @self: the #GPasteBus * * Own the bus name */ G_PASTE_VISIBLE void g_paste_bus_own_name (GPasteBus *self) { g_return_if_fail (_G_PASTE_IS_BUS (self)); GPasteBusPrivate *priv = g_paste_bus_get_instance_private (self); g_return_if_fail (!priv->id_on_bus); priv->id_on_bus = g_bus_own_name (G_BUS_TYPE_SESSION, G_PASTE_BUS_NAME, G_BUS_NAME_OWNER_FLAGS_NONE, g_paste_bus_on_bus_acquired, NULL, /* on_name_acquired */ g_paste_bus_on_name_lost, g_object_ref (self), g_object_unref); } /** * g_paste_bus_get_connection: * @self: the #GPasteBus * * returns the #GDBusConnection * * Returns: (transfer none) (nullable): the connection */ G_PASTE_VISIBLE GDBusConnection * g_paste_bus_get_connection (const GPasteBus *self) { g_return_val_if_fail (_G_PASTE_IS_BUS (self), NULL); const GPasteBusPrivate *priv = _g_paste_bus_get_instance_private (self); return priv->connection; } static void g_paste_bus_dispose (GObject *object) { GPasteBusPrivate *priv = g_paste_bus_get_instance_private (G_PASTE_BUS (object)); if (priv->connection) { g_bus_unown_name (priv->id_on_bus); g_clear_object (&priv->connection); } G_OBJECT_CLASS (g_paste_bus_parent_class)->dispose (object); } static void g_paste_bus_class_init (GPasteBusClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_bus_dispose; /** * GPasteDaemon::name-lost: * @gpaste_daemon: the object on which the signal was emitted * * The "name-lost" signal is emitted when the daemon has lost * its name on the bus. */ signals[NAME_LOST] = g_signal_new ("name-lost", G_PASTE_TYPE_BUS, G_SIGNAL_RUN_LAST, 0, /* class offset */ NULL, /* accumulator */ NULL, /* accumulator data */ g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } static void g_paste_bus_init (GPasteBus *self G_GNUC_UNUSED) { } /** * g_paste_bus_new: * @on_bus_acquired: (closure user_data) (scope notified) (nullable): handler to invoke when name is acquired or %NULL * * Create a new instance of #GPasteBus * * Returns: a newly allocated #GPasteBus * free it with g_object_unref */ G_PASTE_VISIBLE GPasteBus * g_paste_bus_new (GPasteBusAcquiredCallback on_bus_acquired, gpointer user_data) { GPasteBus *self = G_PASTE_BUS (g_object_new (G_PASTE_TYPE_BUS, NULL)); GPasteBusPrivate *priv = g_paste_bus_get_instance_private (self); priv->on_bus_acquired = on_bus_acquired; priv->user_data = user_data; return self; } gpaste-3.42.6/src/libgpaste/daemon/gpaste-bus.h000066400000000000000000000015411421222064600213200ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_BUS_H__ #define __G_PASTE_BUS_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_BUS (g_paste_bus_get_type ()) G_PASTE_FINAL_TYPE (Bus, bus, BUS, GObject) typedef void (*GPasteBusAcquiredCallback) (GPasteBus *bus, gpointer user_data); void g_paste_bus_own_name (GPasteBus *self); GDBusConnection *g_paste_bus_get_connection (const GPasteBus *self); GPasteBus *g_paste_bus_new (GPasteBusAcquiredCallback on_bus_acquired, gpointer user_data); G_END_DECLS #endif /*__G_PASTE_BUS_H__*/ gpaste-3.42.6/src/libgpaste/daemon/gpaste-daemon.c000066400000000000000000001343611421222064600217740ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include "gpaste-gdbus-macros.h" #include #include #include #include #include #include #include #include #include #include #include #include #define G_PASTE_SEND_DBUS_SIGNAL_FULLER(interface, sig, data, error) \ g_dbus_connection_emit_signal (priv->connection, \ NULL, /* destination_bus_name */ \ G_PASTE_DAEMON_OBJECT_PATH, \ interface, \ sig, \ data, \ error) #define G_PASTE_SEND_DBUS_SIGNAL_FULL(sig,data,error) \ G_PASTE_SEND_DBUS_SIGNAL_FULLER (G_PASTE_DAEMON_INTERFACE_NAME, G_PASTE_DAEMON_SIG_##sig, data, error) #define G_PASTE_SEND_DBUS_PROPERTIES_CHANGED(property, value) \ GVariantDict dict; \ g_variant_dict_init (&dict, NULL); \ g_variant_dict_insert_value (&dict, property, value); \ GVariant *data = g_variant_new ("(s@a{sv}@as)", \ G_PASTE_DAEMON_INTERFACE_NAME, \ g_variant_dict_end (&dict), \ g_variant_new_strv (NULL, 0)); \ G_PASTE_SEND_DBUS_SIGNAL_FULLER ("org.freedesktop.DBus.Properties", "PropertiesChanged", data, NULL) #define __NODATA g_variant_new_tuple (NULL, 0) #define __DATA(data) g_variant_new_tuple (&data, 1) #define G_PASTE_SEND_DBUS_SIGNAL(sig) G_PASTE_SEND_DBUS_SIGNAL_FULL(sig, __NODATA, NULL) #define G_PASTE_SEND_DBUS_SIGNAL_WITH_ERROR(sig) G_PASTE_SEND_DBUS_SIGNAL_FULL(sig, __NODATA, error) #define G_PASTE_SEND_DBUS_SIGNAL_WITH_DATA(sig,d) G_PASTE_SEND_DBUS_SIGNAL_FULL(sig, __DATA(d), NULL) #define G_PASTE_DBUS_ASSERT_FULL(cond, _msg, ret) \ do { \ if (!(cond)) \ { \ *err = _err (G_PASTE_BUS_NAME ".Error", _msg); \ return ret; \ } \ } while (FALSE) #define G_PASTE_DBUS_ASSERT(cond, _msg) G_PASTE_DBUS_ASSERT_FULL (cond, _msg, ;) enum { C_UPDATE, C_SWITCH, C_TRACK, C_ACTIVE_CHANGED, C_LAST_SIGNAL }; struct _GPasteDaemon { GPasteBusObject parent_instance; }; typedef struct { GDBusConnection *connection; guint64 id_on_bus; gboolean registered; GPasteHistory *history; GPasteSettings *settings; GPasteClipboardsManager *clipboards_manager; GPasteKeybinder *keybinder; GPasteScreensaverClient *screensaver; GDBusNodeInfo *g_paste_daemon_dbus_info; GDBusInterfaceVTable g_paste_daemon_dbus_vtable; guint64 c_signals[C_LAST_SIGNAL]; } GPasteDaemonPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (Daemon, daemon, G_PASTE_TYPE_BUS_OBJECT) enum { REEXECUTE_SELF, LAST_SIGNAL }; static guint64 signals[LAST_SIGNAL] = { 0 }; typedef struct { const gchar *name; const gchar *msg; } GPasteDBusError; static inline GPasteDBusError * _err (const gchar *name, const gchar *msg) { GPasteDBusError *err = g_malloc (sizeof (GPasteDBusError)); err->name = name; err->msg = msg; return err; } static gchar * g_paste_daemon_get_dbus_string_parameter (GVariant *parameters, guint64 *length) { GVariantIter parameters_iter; g_variant_iter_init (¶meters_iter, parameters); g_autoptr (GVariant) variant = g_variant_iter_next_value (¶meters_iter); return g_variant_dup_string (variant, length); } static void _variant_iter_read_strings_parameter (GVariantIter *parameters_iter, gchar **str1, gchar **str2) { g_autoptr (GVariant) variant1 = g_variant_iter_next_value (parameters_iter); g_autoptr (GVariant) variant2 = g_variant_iter_next_value (parameters_iter); guint64 length; *str1 = g_variant_dup_string (variant1, &length); *str2 = g_variant_dup_string (variant2, &length); } static void g_paste_daemon_get_dbus_strings_parameter (GVariant *parameters, gchar **str1, gchar **str2) { GVariantIter parameters_iter; g_variant_iter_init (¶meters_iter, parameters); _variant_iter_read_strings_parameter (¶meters_iter, str1, str2); } static guint64 g_paste_daemon_get_dbus_uint64_parameter (GVariant *parameters) { GVariantIter parameters_iter; g_variant_iter_init (¶meters_iter, parameters); g_autoptr (GVariant) variant = g_variant_iter_next_value (¶meters_iter); return g_variant_get_uint64 (variant); } /****************/ /* DBus Signals */ /****************/ static void g_paste_daemon_update (GPasteDaemon *self, GPasteUpdateAction action, GPasteUpdateTarget target, guint64 position) { const GPasteDaemonPrivate *priv = _g_paste_daemon_get_instance_private (self); GVariant *data[] = { g_variant_new_string (g_enum_get_value (g_type_class_peek (G_PASTE_TYPE_UPDATE_ACTION), action)->value_nick), g_variant_new_string (g_enum_get_value (g_type_class_peek (G_PASTE_TYPE_UPDATE_TARGET), target)->value_nick), g_variant_new_uint64 (position) }; G_PASTE_SEND_DBUS_SIGNAL_FULL (UPDATE, g_variant_new_tuple (data, 3), NULL); } /** * g_paste_daemon_show_history: * @self: (transfer none): the #GPasteDaemon * @error: a #GError * * Emit the signal to show history */ G_PASTE_VISIBLE void g_paste_daemon_show_history (GPasteDaemon *self, GError **error) { g_return_if_fail (_G_PASTE_IS_DAEMON (self)); const GPasteDaemonPrivate *priv = _g_paste_daemon_get_instance_private (self); G_PASTE_SEND_DBUS_SIGNAL_WITH_ERROR (SHOW_HISTORY); } static void g_paste_daemon_tracking (GPasteDaemon *self, gboolean tracking_state, GPasteSettings *settings G_GNUC_UNUSED) { const GPasteDaemonPrivate *priv = _g_paste_daemon_get_instance_private (self); GVariant *variant = g_variant_new_boolean (tracking_state); G_PASTE_SEND_DBUS_PROPERTIES_CHANGED (G_PASTE_DAEMON_PROP_ACTIVE, variant); } /****************/ /* DBus Mathods */ /****************/ static void g_paste_daemon_private_do_add_item (const GPasteDaemonPrivate *priv, GPasteItem *item) { g_paste_history_add (priv->history, item); if (!g_paste_clipboards_manager_select (priv->clipboards_manager, item)) g_paste_history_remove (priv->history, 0); } static void g_paste_daemon_private_do_add (const GPasteDaemonPrivate *priv, const gchar *text, guint64 length, GPasteDBusError **err) { G_PASTE_DBUS_ASSERT (text && length, "no content to add"); GPasteSettings *settings = priv->settings; g_autofree gchar *stripped = g_strstrip (g_strdup (text)); if (length >= g_paste_settings_get_min_text_item_size (settings) && length <= g_paste_settings_get_max_text_item_size (settings) && strlen (stripped) != 0) { g_paste_daemon_private_do_add_item (priv, g_paste_text_item_new (g_paste_settings_get_trim_items (settings) ? stripped : text)); } } static void g_paste_daemon_private_add (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { guint64 length; g_autofree gchar *text = g_paste_daemon_get_dbus_string_parameter (parameters, &length); g_paste_daemon_private_do_add (priv, text, length, err); } static void g_paste_daemon_private_add_file (const GPasteDaemonPrivate *priv, GVariant *parameters, GError **error, GPasteDBusError **err) { guint64 length; g_autofree gchar *file = g_paste_daemon_get_dbus_string_parameter (parameters, &length); g_autofree gchar *content = NULL; G_PASTE_DBUS_ASSERT (file, "no file to add"); if (g_file_get_contents (file, &content, &length, error)) { if (g_utf8_validate (content, length, NULL)) { g_paste_daemon_private_do_add (priv, content, length, err); } else { g_autoptr (GdkPixbuf) img = gdk_pixbuf_new_from_file (file, NULL /* Error */); g_paste_daemon_private_do_add_item (priv, g_paste_image_item_new (img)); } } } static void g_paste_daemon_private_add_password (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { g_autofree gchar *name = NULL; g_autofree gchar *password = NULL; g_paste_daemon_get_dbus_strings_parameter (parameters, &name, &password); G_PASTE_DBUS_ASSERT (name && password, "no password to add"); g_paste_history_delete_password (priv->history, name); g_paste_daemon_private_do_add_item (priv, g_paste_password_item_new (name, password)); } static void g_paste_daemon_private_delete_history_signal (const GPasteDaemonPrivate *priv, const gchar *history) { GVariant *variant = g_variant_new_string (history); G_PASTE_SEND_DBUS_SIGNAL_WITH_DATA (DELETE_HISTORY, variant); } static void g_paste_daemon_private_empty_history_signal (const GPasteDaemonPrivate *priv, const gchar *history) { GVariant *variant = g_variant_new_string (history); G_PASTE_SEND_DBUS_SIGNAL_WITH_DATA (EMPTY_HISTORY, variant); } static void g_paste_daemon_private_switch_history_signal (const GPasteDaemonPrivate *priv, const gchar *history) { GVariant *variant = g_variant_new_string (history); G_PASTE_SEND_DBUS_SIGNAL_WITH_DATA (SWITCH_HISTORY, variant); } static void g_paste_daemon_private_backup_history (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { g_autofree gchar *history = NULL; g_autofree gchar *backup = NULL; g_paste_daemon_get_dbus_strings_parameter (parameters, &history, &backup); G_PASTE_DBUS_ASSERT (history && backup, "no history to backup"); GPasteSettings *settings = priv->settings; /* create a new history to do the backup without polluting the current one */ g_autoptr (GPasteHistory) _history = g_paste_history_new (settings); const gchar *old_name = g_paste_history_get_current (priv->history); /* We emit all those signals to be sure that all the guis have their histories list updated */ g_paste_history_load (_history, history); g_paste_daemon_private_switch_history_signal (priv, history); g_paste_history_save (_history, backup); g_paste_daemon_private_switch_history_signal (priv, backup); g_paste_daemon_private_switch_history_signal (priv, old_name); } static void g_paste_daemon_private_delete (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { g_autofree gchar *uuid = g_paste_daemon_get_dbus_string_parameter (parameters, NULL); G_PASTE_DBUS_ASSERT (g_paste_history_remove_by_uuid (priv->history, uuid), "Provided uuid doesn't match any item."); } static void g_paste_daemon_private_delete_history (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { g_autofree gchar *name = g_paste_daemon_get_dbus_string_parameter (parameters, NULL); G_PASTE_DBUS_ASSERT (name, "no history to delete"); GPasteHistory *history = priv->history; g_paste_history_delete (history, name, NULL); g_paste_daemon_private_delete_history_signal (priv, name); if (g_paste_str_equal (name, g_paste_history_get_current (priv->history))) g_paste_history_switch (history, G_PASTE_DEFAULT_HISTORY); } static void g_paste_daemon_private_delete_password (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { g_autofree gchar *name = g_paste_daemon_get_dbus_string_parameter (parameters, NULL); G_PASTE_DBUS_ASSERT (name, "no password to delete"); g_paste_history_delete_password (priv->history, name); } static void g_paste_daemon_private_empty_history (const GPasteDaemonPrivate *priv, GVariant *parameters) { g_autofree gchar *name = g_paste_daemon_get_dbus_string_parameter (parameters, NULL); if (g_paste_str_equal (name, g_paste_history_get_current (priv->history))) { g_paste_history_empty (priv->history); } else { g_autoptr (GPasteHistory) history = g_paste_history_new (priv->settings); g_paste_history_save (history, name); } g_paste_daemon_private_empty_history_signal (priv, name); } static GVariant * g_paste_daemon_private_get_element (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { g_autofree gchar *uuid = g_paste_daemon_get_dbus_string_parameter (parameters, NULL); const GPasteItem *item = g_paste_history_get_by_uuid (priv->history, uuid); G_PASTE_DBUS_ASSERT_FULL (item, "Provided uuid doesn't match any item.", NULL); GVariant *variant = g_variant_new_string (g_paste_item_get_display_string (item)); return g_variant_new_tuple (&variant, 1); } static GVariant * g_paste_daemon_private_get_element_at_index (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { GPasteHistory *history = priv->history; guint64 index = g_paste_daemon_get_dbus_uint64_parameter (parameters); G_PASTE_DBUS_ASSERT_FULL (index < g_paste_history_get_length (history), "invalid index received", NULL); const GPasteItem *item = g_paste_history_get (history, index); G_PASTE_DBUS_ASSERT_FULL (item, "received no value for this index", NULL); GVariant *data[] = { g_variant_new_string (g_paste_item_get_uuid (item)), g_variant_new_string (g_paste_item_get_display_string (item)) }; return g_variant_new_tuple (data, 2); } static GVariant * g_paste_daemon_private_get_element_kind (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { GPasteHistory *history = priv->history; g_autofree gchar *uuid = g_paste_daemon_get_dbus_string_parameter (parameters, NULL); const GPasteItem *item = g_paste_history_get_by_uuid (history, uuid); G_PASTE_DBUS_ASSERT_FULL (item, "received no item for this index", NULL); GVariant *variant = g_variant_new_string (g_paste_item_get_kind (item)); return g_variant_new_tuple (&variant, 1); } static GVariant * g_paste_daemon_private_get_elements (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { GPasteHistory *history = priv->history; GVariantIter parameters_iter; GVariantBuilder builder; g_variant_iter_init (¶meters_iter, parameters); g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ss)")); g_autoptr (GVariant) variant = g_variant_iter_next_value (¶meters_iter); guint64 len; g_autofree const gchar **uuids = g_variant_get_strv (variant, &len); for (guint64 i = 0; i < len; ++i) { const GPasteItem *item = g_paste_history_get_by_uuid (history, uuids[i]); G_PASTE_DBUS_ASSERT_FULL (item, "received no value for this index", NULL); g_variant_builder_add (&builder, "(ss)", g_paste_item_get_uuid (item), g_paste_item_get_display_string (item)); } GVariant *ans = g_variant_builder_end (&builder); return g_variant_new_tuple (&ans, 1); } static GVariant * g_paste_daemon_private_get_history (const GPasteDaemonPrivate *priv) { const GList *history = g_paste_history_get_history (priv->history); guint64 length = g_list_length ((GList *) history); GVariantBuilder builder; g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ss)")); for (guint64 i = 0; i < length; ++i, history = g_list_next (history)) { const GPasteItem *item = history->data; g_variant_builder_add (&builder, "(ss)", g_paste_item_get_uuid (item), g_paste_item_get_display_string (item)); } GVariant *variant = g_variant_builder_end (&builder); return g_variant_new_tuple (&variant, 1); } static GVariant * g_paste_daemon_private_get_history_name (const GPasteDaemonPrivate *priv) { GVariant *variant = g_variant_new_string (g_paste_history_get_current (priv->history)); return g_variant_new_tuple (&variant, 1); } static GVariant * g_paste_daemon_private_get_history_size (const GPasteDaemonPrivate *priv, GVariant *parameters) { g_autofree gchar *name = g_paste_daemon_get_dbus_string_parameter (parameters, NULL); guint64 size; if (g_paste_str_equal (name, g_paste_history_get_current (priv->history))) { size = g_paste_history_get_length (priv->history); } else { g_autoptr (GPasteHistory) history = g_paste_history_new (priv->settings); g_paste_history_load (history, name); size = g_paste_history_get_length (history); } GVariant *variant = g_variant_new_uint64 (size); return g_variant_new_tuple (&variant, 1); } static GVariant * g_paste_daemon_private_get_raw_element (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { g_autofree gchar *uuid = g_paste_daemon_get_dbus_string_parameter (parameters, NULL); const GPasteItem *item = g_paste_history_get_by_uuid (priv->history, uuid); G_PASTE_DBUS_ASSERT_FULL (item, "Provided uuid doesn't match any item.", NULL); GVariant *variant = g_variant_new_string (g_paste_item_get_value (item)); return g_variant_new_tuple (&variant, 1); } static GVariant * g_paste_daemon_private_get_raw_history (const GPasteDaemonPrivate *priv) { const GList *history = g_paste_history_get_history (priv->history); guint64 length = g_list_length ((GList *) history); GVariantBuilder builder; g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ss)")); for (guint64 i = 0; i < length; ++i, history = g_list_next (history)) { const GPasteItem *item = history->data; g_variant_builder_add (&builder, "(ss)", g_paste_item_get_uuid (item), g_paste_item_get_value (item)); } GVariant *variant = g_variant_builder_end (&builder); return g_variant_new_tuple (&variant, 1); } static GVariant * g_paste_daemon_list_histories (GError **error) { g_auto (GStrv) history_names = g_paste_history_list (error); if (!history_names) return NULL; GVariant *variant = g_variant_new_strv ((const gchar * const *) history_names, -1); return g_variant_new_tuple (&variant, 1); } static void g_paste_daemon_private_merge (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { GVariantIter parameters_iter; g_variant_iter_init (¶meters_iter, parameters); g_autofree gchar *decoration = NULL; g_autofree gchar *separator = NULL; _variant_iter_read_strings_parameter (¶meters_iter, &decoration, &separator); g_autoptr (GVariant) v_uuids = g_variant_iter_next_value (¶meters_iter); guint64 length; const GStrv uuids = (const GStrv) g_variant_get_strv (v_uuids, &length); G_PASTE_DBUS_ASSERT (length, "nothing to merge"); GPasteHistory *history = priv->history; g_autoptr (GString) str = g_string_new (NULL); for (guint64 i = 0; i < length; ++i) { const GPasteItem *item = g_paste_history_get_by_uuid (history, uuids[i]); G_PASTE_DBUS_ASSERT (item, "no item matching this uuid"); g_string_append_printf (str, "%s%s%s%s", (i) ? separator : "", decoration, g_paste_item_get_value (item), decoration); } g_paste_daemon_private_do_add (priv, str->str, str->len, err); } static void g_paste_daemon_track (GPasteDaemon *self, GVariant *parameters) { GVariantIter parameters_iter; g_variant_iter_init (¶meters_iter, parameters); g_autoptr (GVariant) variant = g_variant_iter_next_value (¶meters_iter); gboolean tracking_state = g_variant_get_boolean (variant); const GPasteDaemonPrivate *priv = _g_paste_daemon_get_instance_private (self); g_paste_settings_set_track_changes (priv->settings, tracking_state); } static void g_paste_daemon_on_extension_state_changed (GPasteDaemon *self, GVariant *parameters) { const GPasteDaemonPrivate *priv = _g_paste_daemon_get_instance_private (self); if (g_paste_settings_get_track_extension_state (priv->settings)) g_paste_daemon_track (self, parameters); } static void g_paste_daemon_reexecute (GPasteDaemon *self) { const GPasteDaemonPrivate *priv = _g_paste_daemon_get_instance_private (self); g_paste_clipboards_manager_store (priv->clipboards_manager); g_signal_emit (self, signals[REEXECUTE_SELF], 0, /* detail */ NULL); } static void g_paste_daemon_private_rename_password (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { g_autofree gchar *old_name = NULL; g_autofree gchar *new_name = NULL; g_paste_daemon_get_dbus_strings_parameter (parameters, &old_name, &new_name); G_PASTE_DBUS_ASSERT (old_name, "no password to rename"); g_paste_history_rename_password (priv->history, old_name, new_name); } static GVariant * g_paste_daemon_private_search (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { g_autofree gchar *search = g_paste_daemon_get_dbus_string_parameter (parameters, NULL); g_auto (GStrv) results = g_paste_history_search (priv->history, search); G_PASTE_DBUS_ASSERT_FULL (results, "Error while performing search", NULL); GVariant *variant = g_variant_new_strv ((const gchar * const *) results, -1); return g_variant_new_tuple (&variant, 1); } static void g_paste_daemon_select (const GPasteDaemon *self, GVariant *parameters, GPasteDBusError **err) { const GPasteDaemonPrivate *priv = _g_paste_daemon_get_instance_private (self); g_autofree gchar *uuid = g_paste_daemon_get_dbus_string_parameter (parameters, NULL); G_PASTE_DBUS_ASSERT (g_paste_history_select (priv->history, uuid), "Provided uuid doesn't match any item."); } static void g_paste_daemon_private_replace (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { GPasteHistory *history = priv->history; GVariantIter parameters_iter; guint64 length; g_variant_iter_init (¶meters_iter, parameters); g_autoptr (GVariant) variant1 = g_variant_iter_next_value (¶meters_iter); const gchar *uuid = g_variant_get_string (variant1, NULL); const GPasteItem *item = g_paste_history_get_by_uuid (history, uuid); G_PASTE_DBUS_ASSERT (item, "Provided uuid doesn't match any item."); G_PASTE_DBUS_ASSERT (_G_PASTE_IS_TEXT_ITEM (item) && g_paste_str_equal (g_paste_item_get_kind (item), "Text"), "attempted to replace an item other than GPasteTextItem"); g_autoptr (GVariant) variant2 = g_variant_iter_next_value (¶meters_iter); g_autofree gchar *contents = g_variant_dup_string (variant2, &length); G_PASTE_DBUS_ASSERT (contents, "no contents given"); g_paste_history_replace (priv->history, uuid, contents); } static void g_paste_daemon_private_set_password (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { GPasteHistory *history = priv->history; GVariantIter parameters_iter; guint64 length; g_variant_iter_init (¶meters_iter, parameters); g_autoptr (GVariant) variant1 = g_variant_iter_next_value (¶meters_iter); const gchar *uuid = g_variant_get_string (variant1, NULL); const GPasteItem *item = g_paste_history_get_by_uuid (history, uuid); G_PASTE_DBUS_ASSERT (item, "Provided uuid doesn't match any item."); G_PASTE_DBUS_ASSERT (_G_PASTE_IS_TEXT_ITEM (item) && g_paste_str_equal (g_paste_item_get_kind (item), "Text"), "attempted to replace an item other than GPasteTextItem"); g_autoptr (GVariant) variant2 = g_variant_iter_next_value (¶meters_iter); g_autofree gchar *name = g_variant_dup_string (variant2, &length); G_PASTE_DBUS_ASSERT (name, "no password name given"); G_PASTE_DBUS_ASSERT (!g_paste_history_get_password (priv->history, name), "a password with tat name already exists"); g_paste_history_set_password (priv->history, uuid, name); } static void g_paste_daemon_private_switch_history (const GPasteDaemonPrivate *priv, GVariant *parameters, GPasteDBusError **err) { g_autofree gchar *name = g_paste_daemon_get_dbus_string_parameter (parameters, NULL); G_PASTE_DBUS_ASSERT (name, "no history to switch to"); g_paste_history_switch (priv->history, name); } static void g_paste_daemon_private_upload_finish (GObject *source_object, GAsyncResult *res, gpointer user_data) { g_autoptr (GSubprocess) upload = G_SUBPROCESS (source_object); g_autofree gchar *url = NULL; g_autofree GPasteDBusError *err = NULL; GPasteDaemonPrivate *priv = user_data; g_subprocess_communicate_utf8_finish (upload, res, &url, NULL, /* stderr */ NULL); /* error */ if (url) g_paste_daemon_private_do_add (priv, url, strlen (url), &err); } /** * g_paste_daemon_upload: * @self: (transfer none): the #GPasteDaemon * @uuid: the uuid of the item to upload * * Upload an item to a pastebin service * * Returns: whether there was something to upload */ G_PASTE_VISIBLE gboolean g_paste_daemon_upload (GPasteDaemon *self, const gchar *uuid) { g_return_val_if_fail (_G_PASTE_IS_DAEMON (self), FALSE); GPasteDaemonPrivate *priv = g_paste_daemon_get_instance_private (self); const GPasteItem *item = (uuid) ? g_paste_history_get_by_uuid (priv->history, uuid) : g_paste_history_get (priv->history, 0); if (!item) return FALSE; GSubprocess *upload = g_subprocess_new (G_SUBPROCESS_FLAGS_STDIN_PIPE|G_SUBPROCESS_FLAGS_STDOUT_PIPE, NULL, "wgetpaste", NULL); const gchar *value = g_paste_item_get_value (item); g_subprocess_communicate_utf8_async (upload, value, NULL, /* cancellable */ g_paste_daemon_private_upload_finish, priv); return TRUE; } static void _g_paste_daemon_upload (GPasteDaemon *self, GVariant *parameters, GPasteDBusError **err) { g_autofree gchar *uuid = g_paste_daemon_get_dbus_string_parameter (parameters, NULL); G_PASTE_DBUS_ASSERT (g_paste_daemon_upload (self, uuid), "Provided uuid doesn't match any item."); } static void g_paste_daemon_activate_default_keybindings (GPasteDaemon *self) { const GPasteDaemonPrivate *priv = _g_paste_daemon_get_instance_private (self); GPasteKeybinder *keybinder = priv->keybinder; GPasteHistory *history = priv->history; GPasteClipboardsManager *clipboards_manager = priv->clipboards_manager; GPasteKeybinding *keybindings[] = { g_paste_make_password_keybinding_new (history), g_paste_pop_keybinding_new (history), g_paste_show_history_keybinding_new (self), g_paste_sync_clipboard_to_primary_keybinding_new (clipboards_manager), g_paste_sync_primary_to_clipboard_keybinding_new (clipboards_manager), g_paste_ui_keybinding_new (), g_paste_upload_keybinding_new (self) }; for (guint64 k = 0; k < G_N_ELEMENTS (keybindings); ++k) g_paste_keybinder_add_keybinding (keybinder, keybindings[k]); g_paste_keybinder_activate_all (keybinder); } static void g_paste_daemon_dbus_method_call (GDBusConnection *connection G_GNUC_UNUSED, const gchar *sender G_GNUC_UNUSED, const gchar *object_path G_GNUC_UNUSED, const gchar *interface_name G_GNUC_UNUSED, const gchar *method_name, GVariant *parameters, GDBusMethodInvocation *invocation, gpointer user_data) { GPasteDaemon *self = user_data; const GPasteDaemonPrivate *priv = _g_paste_daemon_get_instance_private (self); GVariant *answer = NULL; GError *error = NULL; g_autofree GPasteDBusError *err = NULL; if (g_paste_str_equal (method_name, G_PASTE_DAEMON_ABOUT)) g_paste_util_activate_ui ("about", NULL); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_ADD)) g_paste_daemon_private_add (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_ADD_FILE)) g_paste_daemon_private_add_file (priv, parameters, &error, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_ADD_PASSWORD)) g_paste_daemon_private_add_password (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_BACKUP_HISTORY)) g_paste_daemon_private_backup_history (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_DELETE)) g_paste_daemon_private_delete (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_DELETE_HISTORY)) g_paste_daemon_private_delete_history (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_DELETE_PASSWORD)) g_paste_daemon_private_delete_password (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_EMPTY_HISTORY)) g_paste_daemon_private_empty_history (priv, parameters); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_GET_ELEMENT)) answer = g_paste_daemon_private_get_element (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_GET_ELEMENT_AT_INDEX)) answer = g_paste_daemon_private_get_element_at_index (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_GET_ELEMENT_KIND)) answer = g_paste_daemon_private_get_element_kind (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_GET_ELEMENTS)) answer = g_paste_daemon_private_get_elements (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_GET_HISTORY)) answer = g_paste_daemon_private_get_history (priv); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_GET_HISTORY_NAME)) answer = g_paste_daemon_private_get_history_name (priv); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_GET_HISTORY_SIZE)) answer = g_paste_daemon_private_get_history_size (priv, parameters); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_GET_RAW_ELEMENT)) answer = g_paste_daemon_private_get_raw_element (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_GET_RAW_HISTORY)) answer = g_paste_daemon_private_get_raw_history (priv); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_LIST_HISTORIES)) answer = g_paste_daemon_list_histories (&error); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_MERGE)) g_paste_daemon_private_merge (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_ON_EXTENSION_STATE_CHANGED)) g_paste_daemon_on_extension_state_changed (self, parameters); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_REEXECUTE)) g_paste_daemon_reexecute (self); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_RENAME_PASSWORD)) g_paste_daemon_private_rename_password (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_REPLACE)) g_paste_daemon_private_replace (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_SEARCH)) answer = g_paste_daemon_private_search (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_SELECT)) g_paste_daemon_select (self, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_SET_PASSWORD)) g_paste_daemon_private_set_password (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_SHOW_HISTORY)) g_paste_daemon_show_history (self, &error); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_SWITCH_HISTORY)) g_paste_daemon_private_switch_history (priv, parameters, &err); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_TRACK)) g_paste_daemon_track (self, parameters); else if (g_paste_str_equal (method_name, G_PASTE_DAEMON_UPLOAD)) _g_paste_daemon_upload (self, parameters, &err); if (error) g_dbus_method_invocation_take_error (invocation, error); else if (err) g_dbus_method_invocation_return_dbus_error (invocation, err->name, err->msg); else g_dbus_method_invocation_return_value (invocation, answer); } static GVariant * g_paste_daemon_dbus_get_property (GDBusConnection *connection G_GNUC_UNUSED, const gchar *sender G_GNUC_UNUSED, const gchar *object_path G_GNUC_UNUSED, const gchar *interface_name G_GNUC_UNUSED, const gchar *property_name, GError **error G_GNUC_UNUSED, gpointer user_data) { const GPasteDaemonPrivate *priv = _g_paste_daemon_get_instance_private (G_PASTE_DAEMON (user_data)); if (g_paste_str_equal (property_name, G_PASTE_DAEMON_PROP_ACTIVE)) return g_variant_new_boolean (g_paste_settings_get_track_changes (priv->settings)); else if (g_paste_str_equal (property_name, G_PASTE_DAEMON_PROP_VERSION)) return g_variant_new_string (VERSION); return NULL; } static void g_paste_daemon_unregister_object (gpointer user_data) { g_autoptr (GPasteDaemon) self = G_PASTE_DAEMON (user_data); GPasteDaemonPrivate *priv = g_paste_daemon_get_instance_private (self); guint64 *c_signals = priv->c_signals; g_signal_handler_disconnect (priv->settings, c_signals[C_TRACK]); g_signal_handler_disconnect (priv->history, c_signals[C_UPDATE]); g_signal_handler_disconnect (priv->history, c_signals[C_SWITCH]); if (priv->screensaver) g_signal_handler_disconnect (priv->screensaver, c_signals[C_ACTIVE_CHANGED]); priv->registered = FALSE; } static void g_paste_daemon_on_history_update (GPasteDaemon *self, GPasteUpdateAction action, GPasteUpdateTarget target, guint64 position, gpointer user_data G_GNUC_UNUSED) { g_paste_daemon_update (self, action, target, position); } static void g_paste_daemon_on_history_switch (GPasteDaemonPrivate *priv, const gchar *name, gpointer user_data G_GNUC_UNUSED) { g_paste_daemon_private_switch_history_signal (priv, name); } static void g_paste_daemon_on_screensaver_active_changed (GPasteDaemonPrivate *priv, gboolean active, gpointer user_data G_GNUC_UNUSED) { if (!priv->registered) return; /* The deactivate signal is always sent, but not the activate one */ /* We always do the activate action, so that the deactivate one works anyways */ { g_autoptr (GPasteItem) item = g_paste_text_item_new (""); /* will always return TRUE */ g_paste_clipboards_manager_select (priv->clipboards_manager, item); } if (!active) { g_autoptr (GPasteItem) item = g_paste_history_dup (priv->history, 0); if (item) { if (!g_paste_clipboards_manager_select (priv->clipboards_manager, item)) g_paste_history_remove (priv->history, 0); } } } static gboolean _g_paste_daemon_changed (gpointer data) { GPasteDaemon *self = G_PASTE_DAEMON (data); g_paste_daemon_update (self, G_PASTE_UPDATE_ACTION_REPLACE, G_PASTE_UPDATE_TARGET_ALL, 0); return G_SOURCE_REMOVE; } static void g_paste_daemon_dispose (GObject *object) { GPasteDaemonPrivate *priv = g_paste_daemon_get_instance_private (G_PASTE_DAEMON (object)); if (priv->settings) { g_dbus_connection_unregister_object (priv->connection, priv->id_on_bus); g_clear_object (&priv->connection); g_clear_object (&priv->history); g_clear_object (&priv->settings); g_clear_object (&priv->clipboards_manager); g_clear_object (&priv->keybinder); g_clear_object (&priv->screensaver); g_dbus_node_info_unref (priv->g_paste_daemon_dbus_info); } G_OBJECT_CLASS (g_paste_daemon_parent_class)->dispose (object); } static gboolean g_paste_daemon_register_on_connection (GPasteBusObject *self, GDBusConnection *connection, GError **error) { GPasteDaemonPrivate *priv = g_paste_daemon_get_instance_private (G_PASTE_DAEMON (self)); g_clear_object (&priv->connection); priv->connection = g_object_ref (connection); priv->id_on_bus = g_dbus_connection_register_object (connection, G_PASTE_DAEMON_OBJECT_PATH, priv->g_paste_daemon_dbus_info->interfaces[0], &priv->g_paste_daemon_dbus_vtable, g_object_ref (self), g_paste_daemon_unregister_object, error); if (!priv->id_on_bus) return FALSE; guint64 *c_signals = priv->c_signals; c_signals[C_TRACK] = g_signal_connect_swapped (priv->settings, "track", G_CALLBACK (g_paste_daemon_tracking), self); c_signals[C_UPDATE] = g_signal_connect_swapped (priv->history, "update", G_CALLBACK (g_paste_daemon_on_history_update), self); c_signals[C_SWITCH] = g_signal_connect_swapped (priv->history, "switch", G_CALLBACK (g_paste_daemon_on_history_switch), priv); priv->registered = TRUE; g_source_set_name_by_id (g_timeout_add_seconds (1, _g_paste_daemon_changed, self), "[GPaste] Startup - changed"); return TRUE; } static void g_paste_daemon_class_init (GPasteDaemonClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_daemon_dispose; G_PASTE_BUS_OBJECT_CLASS (klass)->register_on_connection = g_paste_daemon_register_on_connection; /** * GPasteDaemon::reexecute-self: * @gpaste_daemon: the object on which the signal was emitted * * The "reexecute-self" signal is emitted when the daemon is about * to reexecute itself into a new freshly spawned daemon */ signals[REEXECUTE_SELF] = g_signal_new ("reexecute-self", G_PASTE_TYPE_DAEMON, G_SIGNAL_RUN_LAST, 0, /* class offset */ NULL, /* accumulator */ NULL, /* accumulator data */ g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } static void on_screensaver_client_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { GPasteDaemonPrivate *priv = user_data; g_autoptr (GError) error = NULL; GPasteScreensaverClient *screensaver = priv->screensaver = g_paste_screensaver_client_new_finish (res, &error); if (error) { g_warning ("Couldn't watch screensaver state: %s", error->message); g_clear_object (&priv->screensaver); } else if (screensaver) { priv->c_signals[C_ACTIVE_CHANGED] = g_signal_connect_swapped (priv->screensaver, "active-changed", G_CALLBACK (g_paste_daemon_on_screensaver_active_changed), priv); } } static void on_shell_client_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { GPasteDaemon *self = user_data; GPasteDaemonPrivate *priv = g_paste_daemon_get_instance_private (self); g_autoptr (GError) error = NULL; g_autoptr (GPasteGnomeShellClient) shell_client = g_paste_gnome_shell_client_new_finish (res, &error); if (error) { g_warning ("Couldn't connect to gnome-shell: %s", error->message); g_clear_object (&shell_client); } g_paste_screensaver_client_new (on_screensaver_client_ready, priv); priv->keybinder = g_paste_keybinder_new (priv->settings, shell_client); g_paste_daemon_activate_default_keybindings (self); } static void g_paste_daemon_init (GPasteDaemon *self) { GPasteDaemonPrivate *priv = g_paste_daemon_get_instance_private (self); GDBusInterfaceVTable *vtable = &priv->g_paste_daemon_dbus_vtable; priv->id_on_bus = 0; priv->g_paste_daemon_dbus_info = g_dbus_node_info_new_for_xml (G_PASTE_DAEMON_INTERFACE, NULL); /* Error */ vtable->method_call = g_paste_daemon_dbus_method_call; vtable->get_property = g_paste_daemon_dbus_get_property; vtable->set_property = NULL; GPasteSettings *settings = priv->settings = g_paste_settings_new (); GPasteHistory *history = priv->history = g_paste_history_new (settings); GPasteClipboardsManager *clipboards_manager = priv->clipboards_manager = g_paste_clipboards_manager_new (history, settings); g_autoptr (GPasteClipboard) clipboard = g_paste_clipboard_new_clipboard (settings); g_autoptr (GPasteClipboard) primary = g_paste_clipboard_new_primary (settings); g_paste_clipboards_manager_add_clipboard (clipboards_manager, clipboard); g_paste_clipboards_manager_add_clipboard (clipboards_manager, primary); g_paste_clipboards_manager_activate (clipboards_manager); g_paste_history_load (history, NULL); g_paste_gnome_shell_client_new (on_shell_client_ready, self); } /** * g_paste_daemon_new: * * Create a new instance of #GPasteDaemon * * Returns: a newly allocated #GPasteDaemon * free it with g_object_unref */ G_PASTE_VISIBLE GPasteDaemon * g_paste_daemon_new (void) { return G_PASTE_DAEMON (g_object_new (G_PASTE_TYPE_DAEMON, NULL)); } gpaste-3.42.6/src/libgpaste/daemon/gpaste-daemon.h000066400000000000000000000014171421222064600217740ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_DAEMON_H__ #define __G_PASTE_DAEMON_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_DAEMON (g_paste_daemon_get_type ()) G_PASTE_FINAL_TYPE (Daemon, daemon, DAEMON, GPasteBusObject) void g_paste_daemon_show_history (GPasteDaemon *self, GError **error); gboolean g_paste_daemon_upload (GPasteDaemon *self, const gchar *uuid); GPasteDaemon *g_paste_daemon_new (void); G_END_DECLS #endif /*__G_PASTE_DAEMON_H__*/ gpaste-3.42.6/src/libgpaste/daemon/gpaste-search-provider.c000066400000000000000000000317241421222064600236250ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include #include struct _GPasteSearchProvider { GPasteBusObject parent_instance; }; typedef struct { GDBusConnection *connection; guint64 id_on_bus; gboolean registered; GPasteClient *client; GDBusNodeInfo *g_paste_search_provider_dbus_info; GDBusInterfaceVTable g_paste_search_provider_dbus_vtable; } GPasteSearchProviderPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (SearchProvider, search_provider, G_PASTE_TYPE_BUS_OBJECT) static char * g_paste_dbus_get_as_result (GVariant *variant) { guint64 _len; g_autofree const gchar **r = g_variant_get_strv (variant, &_len); return g_strjoinv (" ", (gchar **) r); } static char * _g_paste_dbus_get_as_result (GVariant *parameters) { GVariantIter parameters_iter; g_variant_iter_init (¶meters_iter, parameters); g_autoptr (GVariant) variant = g_variant_iter_next_value (¶meters_iter); return g_paste_dbus_get_as_result (variant); } /****************/ /* DBus Mathods */ /****************/ static void on_search_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { g_autofree gpointer *data = (gpointer *) user_data; GPasteClient *client = data[0]; GDBusMethodInvocation *invocation = data[1]; g_auto (GStrv) results = g_paste_client_search_finish (client, res, NULL /* Error */); GVariant *ans = g_variant_new_strv ((const char * const *) results, -1); g_dbus_method_invocation_return_value (invocation, g_variant_new_tuple (&ans, 1)); } static gboolean _do_search (const GPasteSearchProviderPrivate *priv, gchar *search, GDBusMethodInvocation *invocation) { if (strlen (search) < 3 || !priv->client) { GVariant *ans = g_variant_new_strv (NULL, 0); g_dbus_method_invocation_return_value (invocation, g_variant_new_tuple (&ans, 1)); } else { gpointer *data = g_new (gpointer, 2); data[0] = priv->client; data[1] = invocation; g_paste_client_search (priv->client, search, on_search_ready, data); } return TRUE; } static gboolean g_paste_search_provider_private_get_initial_result_set (const GPasteSearchProviderPrivate *priv, GDBusMethodInvocation *invocation, GVariant *parameters) { g_autofree gchar *search = _g_paste_dbus_get_as_result (parameters); return _do_search (priv, search, invocation); } static gboolean g_paste_search_provider_private_get_subsearch_result_set (const GPasteSearchProviderPrivate *priv, GDBusMethodInvocation *invocation, GVariant *parameters) { GVariantIter parameters_iter; g_variant_iter_init (¶meters_iter, parameters); G_GNUC_UNUSED g_autoptr (GVariant) old_results = g_variant_iter_next_value (¶meters_iter); g_autoptr (GVariant) variant = g_variant_iter_next_value (¶meters_iter); g_autofree gchar *search = g_paste_dbus_get_as_result (variant); return _do_search (priv, search, invocation); } static void append_dict_entry (GVariantBuilder *dict, const gchar *key, const gchar *value) { g_variant_builder_add_value (dict, g_variant_new_dict_entry (g_variant_new_string (key), g_variant_new_variant (g_variant_new_string (value)))); } typedef struct { GPasteClient *client; GDBusMethodInvocation *invocation; const gchar **uuids; } GetResultMetasData; static void on_elements_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { g_autofree GetResultMetasData *data = user_data; GPasteClient *client = data->client; g_autofree const gchar **uuids = data->uuids; g_auto (GVariantBuilder) builder; g_variant_builder_init (&builder, (GVariantType *) "aa{sv}"); GList *results = g_paste_client_get_elements_finish (client, res, NULL /* Error */); guint64 n = 0; for (const GList *i = results; i; i = i->next, ++n) { const GPasteClientItem *item = i->data; const gchar *value = g_paste_client_item_get_value (item); g_auto (GVariantBuilder) dict; g_autofree gchar *result = g_paste_util_replace (value, "\n", " "); g_variant_builder_init (&dict, G_VARIANT_TYPE_VARDICT); append_dict_entry (&dict, "id", uuids[n]); append_dict_entry (&dict, "name", result); append_dict_entry (&dict, "gicon", G_PASTE_ICON_NAME); append_dict_entry (&dict, "clipboardText", value); g_variant_builder_add_value (&builder, g_variant_builder_end (&dict)); } GVariant *ans = g_variant_builder_end (&builder); g_dbus_method_invocation_return_value (data->invocation, g_variant_new_tuple (&ans, 1)); g_list_free_full (results, g_object_unref); } static gboolean g_paste_search_provider_private_get_result_metas (const GPasteSearchProviderPrivate *priv, GDBusMethodInvocation *invocation, GVariant *parameters) { GVariantIter parameters_iter; g_variant_iter_init (¶meters_iter, parameters); g_autoptr (GVariant) results = g_variant_iter_next_value (¶meters_iter); guint64 len; g_autofree const gchar **uuids = g_variant_get_strv (results, &len); if (!len) return FALSE; GetResultMetasData *data = g_new (GetResultMetasData, 1); data->client = priv->client; data->invocation = invocation; data->uuids = uuids; uuids = NULL; // don't autofree g_paste_client_get_elements (priv->client, data->uuids, len, on_elements_ready, data); return TRUE; } static gboolean g_paste_search_provider_private_activate_result (const GPasteSearchProviderPrivate *priv G_GNUC_UNUSED, GVariant *parameters) { GVariantIter parameters_iter; g_variant_iter_init (¶meters_iter, parameters); g_autoptr (GVariant) indexv = g_variant_iter_next_value (¶meters_iter); G_GNUC_UNUSED g_autoptr (GVariant) terms = g_variant_iter_next_value (¶meters_iter); G_GNUC_UNUSED g_autoptr (GVariant) timestamp = g_variant_iter_next_value (¶meters_iter); g_paste_client_select (priv->client, g_variant_get_string (indexv, NULL), NULL, NULL); return FALSE; } static gboolean g_paste_search_provider_private_launch_search (const GPasteSearchProviderPrivate *priv G_GNUC_UNUSED, GVariant *parameters) { GVariantIter parameters_iter; g_variant_iter_init (¶meters_iter, parameters); g_autoptr (GVariant) searchv = g_variant_iter_next_value (¶meters_iter); G_GNUC_UNUSED g_autoptr (GVariant) timestamp = g_variant_iter_next_value (¶meters_iter); g_autofree gchar *search = g_paste_dbus_get_as_result (searchv); g_paste_util_activate_ui ("search", g_variant_new_string (search)); return FALSE; } static void g_paste_search_provider_dbus_method_call (GDBusConnection *connection G_GNUC_UNUSED, const gchar *sender G_GNUC_UNUSED, const gchar *object_path G_GNUC_UNUSED, const gchar *interface_name G_GNUC_UNUSED, const gchar *method_name, GVariant *parameters, GDBusMethodInvocation *invocation, gpointer user_data) { GPasteSearchProvider *self = user_data; const GPasteSearchProviderPrivate *priv = _g_paste_search_provider_get_instance_private (self); gboolean async = FALSE; if (g_paste_str_equal (method_name, G_PASTE_SEARCH_PROVIDER_GET_INITIAL_RESULT_SET)) async = g_paste_search_provider_private_get_initial_result_set (priv, invocation, parameters); else if (g_paste_str_equal (method_name, G_PASTE_SEARCH_PROVIDER_GET_SUBSEARCH_RESULT_SET)) async = g_paste_search_provider_private_get_subsearch_result_set (priv, invocation, parameters); else if (g_paste_str_equal (method_name, G_PASTE_SEARCH_PROVIDER_GET_RESULT_METAS)) async = g_paste_search_provider_private_get_result_metas (priv, invocation, parameters); else if (g_paste_str_equal (method_name, G_PASTE_SEARCH_PROVIDER_ACTIVATE_RESULT)) async = g_paste_search_provider_private_activate_result (priv, parameters); else if (g_paste_str_equal (method_name, G_PASTE_SEARCH_PROVIDER_LAUNCH_SEARCH)) async = g_paste_search_provider_private_launch_search (priv, parameters); if (!async) g_dbus_method_invocation_return_value (invocation, NULL); } static void g_paste_search_provider_unregister_object (gpointer user_data) { g_autoptr (GPasteSearchProvider) self = G_PASTE_SEARCH_PROVIDER (user_data); GPasteSearchProviderPrivate *priv = g_paste_search_provider_get_instance_private (self); priv->registered = FALSE; } static void g_paste_search_provider_dispose (GObject *object) { GPasteSearchProviderPrivate *priv = g_paste_search_provider_get_instance_private (G_PASTE_SEARCH_PROVIDER (object)); if (priv->connection) { g_dbus_connection_unregister_object (priv->connection, priv->id_on_bus); g_clear_object (&priv->connection); g_dbus_node_info_unref (priv->g_paste_search_provider_dbus_info); g_clear_object (&priv->client); } G_OBJECT_CLASS (g_paste_search_provider_parent_class)->dispose (object); } static gboolean g_paste_search_provider_register_on_connection (GPasteBusObject *self, GDBusConnection *connection, GError **error) { GPasteSearchProviderPrivate *priv = g_paste_search_provider_get_instance_private (G_PASTE_SEARCH_PROVIDER (self)); g_clear_object (&priv->connection); priv->connection = g_object_ref (connection); priv->id_on_bus = g_dbus_connection_register_object (connection, G_PASTE_SEARCH_PROVIDER_OBJECT_PATH, priv->g_paste_search_provider_dbus_info->interfaces[0], &priv->g_paste_search_provider_dbus_vtable, g_object_ref (self), g_paste_search_provider_unregister_object, error); return (priv->registered = !!priv->id_on_bus); } static void g_paste_search_provider_class_init (GPasteSearchProviderClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_search_provider_dispose; G_PASTE_BUS_OBJECT_CLASS (klass)->register_on_connection = g_paste_search_provider_register_on_connection; } static void on_client_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { GPasteSearchProviderPrivate *priv = user_data; priv->client = g_paste_client_new_finish (res, NULL); /* Error */ } static void g_paste_search_provider_init (GPasteSearchProvider *self) { GPasteSearchProviderPrivate *priv = g_paste_search_provider_get_instance_private (self); GDBusInterfaceVTable *vtable = &priv->g_paste_search_provider_dbus_vtable; priv->id_on_bus = 0; priv->g_paste_search_provider_dbus_info = g_dbus_node_info_new_for_xml (G_PASTE_SEARCH_PROVIDER_INTERFACE, NULL); /* Error */ vtable->method_call = g_paste_search_provider_dbus_method_call; vtable->get_property = NULL; vtable->set_property = NULL; g_paste_client_new (on_client_ready, priv); } /** * g_paste_search_provider_new: * * Create a new instance of #GPasteSearchProvider * * Returns: a newly allocated #GPasteSearchProvider * free it with g_object_unref */ G_PASTE_VISIBLE GPasteBusObject * g_paste_search_provider_new (void) { return G_PASTE_BUS_OBJECT (g_object_new (G_PASTE_TYPE_SEARCH_PROVIDER, NULL)); } gpaste-3.42.6/src/libgpaste/daemon/gpaste-search-provider.h000066400000000000000000000012061421222064600236220ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SEARCH_PROVIDER_H__ #define __G_PASTE_SEARCH_PROVIDER_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_SEARCH_PROVIDER (g_paste_search_provider_get_type ()) G_PASTE_FINAL_TYPE (SearchProvider, search_provider, SEARCH_PROVIDER, GPasteBusObject) GPasteBusObject *g_paste_search_provider_new (void); G_END_DECLS #endif /*__G_PASTE_SEARCH_PROVIDER_H__*/ gpaste-3.42.6/src/libgpaste/gnome-shell-client/000077500000000000000000000000001421222064600213175ustar00rootroot00000000000000gpaste-3.42.6/src/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.c000066400000000000000000000414241421222064600264370ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include "gpaste-gdbus-macros.h" #include #define G_PASTE_GNOME_SHELL_OBJECT_PATH "/org/gnome/Shell" #define G_PASTE_GNOME_SHELL_INTERFACE_NAME "org.gnome.Shell" #define G_PASTE_GNOME_SHELL_GRAB_ACCELERATOR "GrabAccelerator" #define G_PASTE_GNOME_SHELL_GRAB_ACCELERATORS "GrabAccelerators" #define G_PASTE_GNOME_SHELL_UNGRAB_ACCELERATOR "UngrabAccelerator" #define G_PASTE_GNOME_SHELL_SIG_ACCELERATOR_ACTIVATED "AcceleratorActivated" #define G_PASTE_GNOME_SHELL_INTERFACE \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" \ "" struct _GPasteGnomeShellClient { GDBusProxy parent_instance; }; G_PASTE_DEFINE_TYPE (GnomeShellClient, gnome_shell_client, G_TYPE_DBUS_PROXY) enum { ACCELERATOR_ACTIVATED, LAST_SIGNAL }; static guint64 signals[LAST_SIGNAL] = { 0 }; /*******************/ /* Methods / Async */ /*******************/ #define DBUS_CALL_ONE_PARAM_ASYNC(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_ASYNC_BASE (GNOME_SHELL_CLIENT, param_type, param_name, G_PASTE_GNOME_SHELL_##method) #define DBUS_CALL_ONE_PARAMV_ASYNC(method, paramv) \ DBUS_CALL_ONE_PARAMV_ASYNC_BASE (GNOME_SHELL_CLIENT, paramv, G_PASTE_GNOME_SHELL_##method) #define DBUS_CALL_THREE_PARAMS_ASYNC(method, params) \ DBUS_CALL_THREE_PARAMS_ASYNC_BASE (GNOME_SHELL_CLIENT, params, G_PASTE_GNOME_SHELL_##method) /****************************/ /* Methods / Async - Finish */ /****************************/ #define DBUS_ASYNC_FINISH_RET_BOOL \ DBUS_ASYNC_FINISH_RET_BOOL_BASE (GNOME_SHELL_CLIENT) #define DBUS_ASYNC_FINISH_RET_AU \ DBUS_ASYNC_FINISH_RET_AU_BASE (GNOME_SHELL_CLIENT, NULL) #define DBUS_ASYNC_FINISH_RET_UINT32 \ DBUS_ASYNC_FINISH_RET_UINT32_BASE (GNOME_SHELL_CLIENT) /********************************/ /* Methods / Sync - With return */ /********************************/ #define DBUS_CALL_ONE_PARAM_RET_BOOL(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_RET_BOOL_BASE (GNOME_SHELL_CLIENT, param_type, param_name, G_PASTE_GNOME_SHELL_##method) #define DBUS_CALL_ONE_PARAMV_RET_AU(method, paramv) \ DBUS_CALL_ONE_PARAMV_RET_AU_BASE (GNOME_SHELL_CLIENT, G_PASTE_GNOME_SHELL_##method, paramv, NULL) #define DBUS_CALL_THREE_PARAMS_RET_UINT32(method, params) \ DBUS_CALL_THREE_PARAMS_RET_UINT32_BASE (GNOME_SHELL_CLIENT, params, G_PASTE_GNOME_SHELL_##method) /******************/ /* Methods / Sync */ /******************/ /** * g_paste_gnome_shell_client_grab_accelerator_sync: * @self: a #GPasteGnomeShellClient instance * @accelerator: a #GPasteGnomeShellAccelerator instance * @error: a #GError * * Grab a keybinding * * Returns: the action id corresponding */ G_PASTE_VISIBLE guint32 g_paste_gnome_shell_client_grab_accelerator_sync (GPasteGnomeShellClient *self, GPasteGnomeShellAccelerator accelerator, GError **error) { GVariant *accel[] = { g_variant_new_string (accelerator.accelerator), g_variant_new_uint32 (accelerator.grab_flags), g_variant_new_uint32 (accelerator.mode_flags) }; DBUS_CALL_THREE_PARAMS_RET_UINT32 (GRAB_ACCELERATOR, accel); } /** * g_paste_gnome_shell_client_grab_accelerators_sync: * @self: a #GPasteGnomeShellClient instance * @accelerators: (array): an array of #GPasteGnomeShellAccelerator instances * @error: a #GError * * Grab some keybindings * * Returns: the action ids corresponding */ G_PASTE_VISIBLE guint32 * g_paste_gnome_shell_client_grab_accelerators_sync (GPasteGnomeShellClient *self, GPasteGnomeShellAccelerator *accelerators, GError **error) { g_auto (GVariantBuilder) builder; guint64 n_accelerators = 0; g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY); for (GPasteGnomeShellAccelerator *accelerator = &accelerators[0]; accelerator->accelerator; accelerator = &accelerators[++n_accelerators]) { g_variant_builder_open (&builder, G_VARIANT_TYPE_TUPLE); g_variant_builder_add_value (&builder, g_variant_new_string (accelerator->accelerator)); g_variant_builder_add_value (&builder, g_variant_new_uint32 (accelerator->grab_flags)); g_variant_builder_add_value (&builder, g_variant_new_uint32 (accelerator->mode_flags)); g_variant_builder_close (&builder); } GVariant *array = g_variant_builder_end (&builder); DBUS_CALL_ONE_PARAMV_RET_AU (GRAB_ACCELERATORS, array); } /** * g_paste_gnome_shell_client_ungrab_accelerator_sync: * @self: a #GPasteGnomeShellClient instance * @action: the action id corresponding to the keybinding * @error: a #GError * * Ungrab a keybinding * * Returns: whether the ungrab was succesful or not */ G_PASTE_VISIBLE gboolean g_paste_gnome_shell_client_ungrab_accelerator_sync (GPasteGnomeShellClient *self, guint32 action, GError **error) { DBUS_CALL_ONE_PARAM_RET_BOOL (UNGRAB_ACCELERATOR, uint32, action); } /*******************/ /* Methods / Async */ /*******************/ /** * g_paste_gnome_shell_client_grab_accelerator: * @self: a #GPasteGnomeShellClient instance * @accelerator: a #GPasteGnomeShellAccelerator instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Grab a keybinding */ G_PASTE_VISIBLE void g_paste_gnome_shell_client_grab_accelerator (GPasteGnomeShellClient *self, GPasteGnomeShellAccelerator accelerator, GAsyncReadyCallback callback, gpointer user_data) { GVariant *accel[] = { g_variant_new_string (accelerator.accelerator), g_variant_new_uint32 (accelerator.grab_flags), g_variant_new_uint32 (accelerator.mode_flags) }; DBUS_CALL_THREE_PARAMS_ASYNC (GRAB_ACCELERATOR, accel); } /** * g_paste_gnome_shell_client_grab_accelerators: * @self: a #GPasteGnomeShellClient instance * @accelerators: (array): an array of #GPasteGnomeShellAccelerator instances * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Grab some keybindings */ G_PASTE_VISIBLE void g_paste_gnome_shell_client_grab_accelerators (GPasteGnomeShellClient *self, GPasteGnomeShellAccelerator *accelerators, GAsyncReadyCallback callback, gpointer user_data) { g_auto (GVariantBuilder) builder; guint64 n_accelerators = 0; g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY); for (GPasteGnomeShellAccelerator *accelerator = &accelerators[0]; accelerator->accelerator; accelerator = &accelerators[++n_accelerators]) { g_variant_builder_open (&builder, G_VARIANT_TYPE_TUPLE); g_variant_builder_add_value (&builder, g_variant_new_string (accelerator->accelerator)); g_variant_builder_add_value (&builder, g_variant_new_uint32 (accelerator->grab_flags)); g_variant_builder_add_value (&builder, g_variant_new_uint32 (accelerator->mode_flags)); g_variant_builder_close (&builder); } GVariant *array = g_variant_builder_end (&builder); DBUS_CALL_ONE_PARAMV_ASYNC (GRAB_ACCELERATORS, array); } /** * g_paste_gnome_shell_client_ungrab_accelerator: * @self: a #GPasteGnomeShellClient instance * @action: the action id corresponding to the keybinding * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Ungrab a keybinding */ G_PASTE_VISIBLE void g_paste_gnome_shell_client_ungrab_accelerator (GPasteGnomeShellClient *self, guint32 action, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (UNGRAB_ACCELERATOR, uint32, action); } /****************************/ /* Methods / Async - Finish */ /****************************/ /** * g_paste_gnome_shell_client_grab_accelerator_finish: * @self: a #GPasteGnomeShellClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Grab a keybinding * * Returns: the action id corresultponding */ G_PASTE_VISIBLE guint32 g_paste_gnome_shell_client_grab_accelerator_finish (GPasteGnomeShellClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_UINT32; } /** * g_paste_gnome_shell_client_grab_accelerators_finish: * @self: a #GPasteGnomeShellClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Grab some keybindings * * Returns: the action ids corresultponding */ G_PASTE_VISIBLE guint32 * g_paste_gnome_shell_client_grab_accelerators_finish (GPasteGnomeShellClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_AU; } /** * g_paste_gnome_shell_client_ungrab_accelerator_finish: * @self: a #GPasteGnomeShellClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Ungrab a keybinding * * Returns: whether the ungrab was succesful or not */ G_PASTE_VISIBLE gboolean g_paste_gnome_shell_client_ungrab_accelerator_finish (GPasteGnomeShellClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_BOOL; } static void g_paste_gnome_shell_client_g_signal (GDBusProxy *proxy, const gchar *sender_name G_GNUC_UNUSED, const gchar *signal_name, GVariant *parameters) { GPasteGnomeShellClient *self = G_PASTE_GNOME_SHELL_CLIENT (proxy); if (g_paste_str_equal (signal_name, G_PASTE_GNOME_SHELL_SIG_ACCELERATOR_ACTIVATED)) { GVariantIter params_iter; g_variant_iter_init (¶ms_iter, parameters); g_autoptr (GVariant) action = g_variant_iter_next_value (¶ms_iter); /* consume the params but don't use them */ G_GNUC_UNUSED g_autoptr (GVariant) params = g_variant_iter_next_value (¶ms_iter); g_signal_emit (self, signals[ACCELERATOR_ACTIVATED], 0, /* detail */ g_variant_get_uint32 (action), NULL); } } static void g_paste_gnome_shell_client_class_init (GPasteGnomeShellClientClass *klass G_GNUC_UNUSED) { G_DBUS_PROXY_CLASS (klass)->g_signal = g_paste_gnome_shell_client_g_signal; /** * GPasteGnomeShellClient::accelerator-activated: * @gnome_shell: the object on which the signal was emitted * @id: the id of the activated accelerator * * The "accelerator-activated" signal is emitted when gnome-shell notifies us * that an accelerator has been pressed. */ signals[ACCELERATOR_ACTIVATED] = g_signal_new ("accelerator-activated", G_PASTE_TYPE_GNOME_SHELL_CLIENT, G_SIGNAL_RUN_LAST, 0, /* class offset */ NULL, /* accumulator */ NULL, /* accumulator data */ g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); } static void g_paste_gnome_shell_client_init (GPasteGnomeShellClient *self) { GDBusProxy *proxy = G_DBUS_PROXY (self); g_autoptr (GDBusNodeInfo) gnome_shell_dbus_info = g_dbus_node_info_new_for_xml (G_PASTE_GNOME_SHELL_INTERFACE, NULL); /* Error */ g_dbus_proxy_set_interface_info (proxy, gnome_shell_dbus_info->interfaces[0]); } /** * g_paste_gnome_shell_client_new_sync: * @error: Return location for error or %NULL. * * Create a new instance of #GPasteGnomeShellClient * * Returns: a newly allocated #GPasteGnomeShellClient * free it with g_object_unref */ G_PASTE_VISIBLE GPasteGnomeShellClient * g_paste_gnome_shell_client_new_sync (GError **error) { CUSTOM_PROXY_NEW (GNOME_SHELL_CLIENT, GNOME_SHELL, G_PASTE_GNOME_SHELL_BUS_NAME); } /** * g_paste_gnome_shell_client_new: * @callback: Callback function to invoke when the proxy is ready. * @user_data: User data to pass to @callback. * * Create a new instance of #GPasteGnomeShellClient */ G_PASTE_VISIBLE void g_paste_gnome_shell_client_new (GAsyncReadyCallback callback, gpointer user_data) { CUSTOM_PROXY_NEW_ASYNC (GNOME_SHELL_CLIENT, GNOME_SHELL, G_PASTE_GNOME_SHELL_BUS_NAME); } /** * g_paste_gnome_shell_client_new_finsh: * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to the async ctor. * @error: Return location for error or %NULL. * * Create a new instance of #GPasteGnomeShellClient * * Returns: a newly allocated #GPasteGnomeShellClient * free it with g_object_unref */ G_PASTE_VISIBLE GPasteGnomeShellClient * g_paste_gnome_shell_client_new_finish (GAsyncResult *result, GError **error) { CUSTOM_PROXY_NEW_FINISH (GNOME_SHELL_CLIENT); } gpaste-3.42.6/src/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.h000066400000000000000000000156331421222064600264470ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_GNOME_SHELL_CLIENT_H__ #define __G_PASTE_GNOME_SHELL_CLIENT_H__ #include G_BEGIN_DECLS #define G_PASTE_GNOME_SHELL_BUS_NAME "org.gnome.Shell" /* ShellActionMode stolen from gnome-shell */ /** * GPasteGnomeShellActionMode: * @G_PASTE_GNOME_SHELL_ACTION_MODE_NONE: block action * @G_PASTE_GNOME_SHELL_ACTION_MODE_NORMAL: allow action when in window mode, * e.g. when the focus is in an application window * @G_PASTE_GNOME_SHELL_ACTION_MODE_OVERVIEW: allow action while the overview * is active * @G_PASTE_GNOME_SHELL_ACTION_MODE_LOCK_SCREEN: allow action when the screen * is locked, e.g. when the screen shield is shown * @G_PASTE_GNOME_SHELL_ACTION_MODE_UNLOCK_SCREEN: allow action in the unlock * dialog * @G_PASTE_GNOME_SHELL_ACTION_MODE_LOGIN_SCREEN: allow action in the login screen * @G_PASTE_GNOME_SHELL_ACTION_MODE_SYSTEM_MODAL: allow action when a system modal * dialog (e.g. authentification or session dialogs) is open * @G_PASTE_GNOME_SHELL_ACTION_MODE_LOOKING_GLASS: allow action in looking glass * @G_PASTE_GNOME_SHELL_ACTION_MODE_POPUP: allow action while a shell menu is open * @G_PASTE_GNOME_SHELL_ACTION_MODE_ALL: always allow action * * Controls in which GNOME Shell states an action (like keybindings and gestures) * should be handled. */ typedef enum { G_PASTE_GNOME_SHELL_ACTION_MODE_NONE = 0, G_PASTE_GNOME_SHELL_ACTION_MODE_NORMAL = 1 << 0, G_PASTE_GNOME_SHELL_ACTION_MODE_OVERVIEW = 1 << 1, G_PASTE_GNOME_SHELL_ACTION_MODE_LOCK_SCREEN = 1 << 2, G_PASTE_GNOME_SHELL_ACTION_MODE_UNLOCK_SCREEN = 1 << 3, G_PASTE_GNOME_SHELL_ACTION_MODE_LOGIN_SCREEN = 1 << 4, G_PASTE_GNOME_SHELL_ACTION_MODE_SYSTEM_MODAL = 1 << 5, G_PASTE_GNOME_SHELL_ACTION_MODE_LOOKING_GLASS = 1 << 6, G_PASTE_GNOME_SHELL_ACTION_MODE_POPUP = 1 << 7, G_PASTE_GNOME_SHELL_ACTION_MODE_ALL = ~0, } GPasteGnomeShellActionMode; /* MetaKeyBindingFlags stolen from mutter */ /** * GPasteMetaKeyBindingFlags: * @G_PASTE_META_KEY_BINDING_NONE: none * @G_PASTE_META_KEY_BINDING_PER_WINDOW: per-window * @G_PASTE_META_KEY_BINDING_BUILTIN: built-in * @G_PASTE_META_KEY_BINDING_IS_REVERSED: is reversed * @G_PASTE_META_KEY_BINDING_NON_MASKABLE: always active */ typedef enum { G_PASTE_META_KEY_BINDING_NONE = 0, G_PASTE_META_KEY_BINDING_PER_WINDOW = 1 << 0, G_PASTE_META_KEY_BINDING_BUILTIN = 1 << 1, G_PASTE_META_KEY_BINDING_IS_REVERSED = 1 << 2, G_PASTE_META_KEY_BINDING_NON_MASKABLE = 1 << 3, G_PASTE_META_KEY_BINDING_IGNORE_AUTOREPEAT = 1 << 4, } GPasteMetaKeyBindingFlags; #define G_PASTE_TYPE_GNOME_SHELL_CLIENT (g_paste_gnome_shell_client_get_type ()) typedef struct { const gchar *accelerator; GPasteMetaKeyBindingFlags mode_flags; GPasteGnomeShellActionMode grab_flags; } GPasteGnomeShellAccelerator; #define G_PASTE_GNOME_SHELL_ACCELERATOR(accelerator) ((GPasteGnomeShellAccelerator) {accelerator, G_PASTE_META_KEY_BINDING_NONE, G_PASTE_GNOME_SHELL_ACTION_MODE_ALL}) G_PASTE_FINAL_TYPE (GnomeShellClient, gnome_shell_client, GNOME_SHELL_CLIENT, GDBusProxy) /*******************/ /* Methods / Sync */ /*******************/ guint32 g_paste_gnome_shell_client_grab_accelerator_sync (GPasteGnomeShellClient *self, GPasteGnomeShellAccelerator accelerator, GError **error); guint32 *g_paste_gnome_shell_client_grab_accelerators_sync (GPasteGnomeShellClient *self, GPasteGnomeShellAccelerator *accelerators, GError **error); gboolean g_paste_gnome_shell_client_ungrab_accelerator_sync (GPasteGnomeShellClient *self, guint32 action, GError **error); /********************/ /* Methods / Async */ /********************/ void g_paste_gnome_shell_client_grab_accelerator (GPasteGnomeShellClient *self, GPasteGnomeShellAccelerator accelerator, GAsyncReadyCallback callback, gpointer user_data); void g_paste_gnome_shell_client_grab_accelerators (GPasteGnomeShellClient *self, GPasteGnomeShellAccelerator *accelerators, GAsyncReadyCallback callback, gpointer user_data); void g_paste_gnome_shell_client_ungrab_accelerator (GPasteGnomeShellClient *self, guint32 action, GAsyncReadyCallback callback, gpointer user_data); /*****************************/ /* Methods / Async - Finish */ /*****************************/ guint32 g_paste_gnome_shell_client_grab_accelerator_finish (GPasteGnomeShellClient *self, GAsyncResult *result, GError **error); guint32 *g_paste_gnome_shell_client_grab_accelerators_finish (GPasteGnomeShellClient *self, GAsyncResult *result, GError **error); gboolean g_paste_gnome_shell_client_ungrab_accelerator_finish (GPasteGnomeShellClient *self, GAsyncResult *result, GError **error); /****************/ /* Constructors */ /****************/ GPasteGnomeShellClient *g_paste_gnome_shell_client_new_sync (GError **error); void g_paste_gnome_shell_client_new (GAsyncReadyCallback callback, gpointer user_data); GPasteGnomeShellClient *g_paste_gnome_shell_client_new_finish (GAsyncResult *result, GError **error); G_END_DECLS #endif /*__G_PASTE_GNOME_SHELL_CLIENT_H__*/ gpaste-3.42.6/src/libgpaste/gpaste-gdbus-defines.h000066400000000000000000000354661421222064600220200ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_GDBUS_DEFINES_H__ #define __G_PASTE_GDBUS_DEFINES_H__ #include G_BEGIN_DECLS #define G_PASTE_BUS_NAME "org.gnome.GPaste" #define G_PASTE_DAEMON_OBJECT_PATH "/org/gnome/GPaste" #define G_PASTE_DAEMON_INTERFACE_NAME "org.gnome.GPaste2" #define G_PASTE_DAEMON_ABOUT "About" #define G_PASTE_DAEMON_ADD "Add" #define G_PASTE_DAEMON_ADD_FILE "AddFile" #define G_PASTE_DAEMON_ADD_PASSWORD "AddPassword" #define G_PASTE_DAEMON_BACKUP_HISTORY "BackupHistory" #define G_PASTE_DAEMON_DELETE "Delete" #define G_PASTE_DAEMON_DELETE_HISTORY "DeleteHistory" #define G_PASTE_DAEMON_DELETE_PASSWORD "DeletePassword" #define G_PASTE_DAEMON_EMPTY_HISTORY "EmptyHistory" #define G_PASTE_DAEMON_GET_ELEMENT "GetElement" #define G_PASTE_DAEMON_GET_ELEMENT_AT_INDEX "GetElementAtIndex" #define G_PASTE_DAEMON_GET_ELEMENT_KIND "GetElementKind" #define G_PASTE_DAEMON_GET_ELEMENTS "GetElements" #define G_PASTE_DAEMON_GET_HISTORY "GetHistory" #define G_PASTE_DAEMON_GET_HISTORY_NAME "GetHistoryName" #define G_PASTE_DAEMON_GET_HISTORY_SIZE "GetHistorySize" #define G_PASTE_DAEMON_GET_RAW_ELEMENT "GetRawElement" #define G_PASTE_DAEMON_GET_RAW_HISTORY "GetRawHistory" #define G_PASTE_DAEMON_LIST_HISTORIES "ListHistories" #define G_PASTE_DAEMON_MERGE "Merge" #define G_PASTE_DAEMON_ON_EXTENSION_STATE_CHANGED "OnExtensionStateChanged" #define G_PASTE_DAEMON_REEXECUTE "Reexecute" #define G_PASTE_DAEMON_RENAME_PASSWORD "RenamePassword" #define G_PASTE_DAEMON_REPLACE "Replace" #define G_PASTE_DAEMON_SEARCH "Search" #define G_PASTE_DAEMON_SELECT "Select" #define G_PASTE_DAEMON_SET_PASSWORD "SetPassword" #define G_PASTE_DAEMON_SHOW_HISTORY "ShowHistory" #define G_PASTE_DAEMON_SWITCH_HISTORY "SwitchHistory" #define G_PASTE_DAEMON_TRACK "Track" #define G_PASTE_DAEMON_UPLOAD "Upload" #define G_PASTE_DAEMON_SIG_DELETE_HISTORY "DeleteHistory" #define G_PASTE_DAEMON_SIG_EMPTY_HISTORY "EmptyHistory" #define G_PASTE_DAEMON_SIG_SHOW_HISTORY "ShowHistory" #define G_PASTE_DAEMON_SIG_SWITCH_HISTORY "SwitchHistory" #define G_PASTE_DAEMON_SIG_UPDATE "Update" #define G_PASTE_DAEMON_PROP_ACTIVE "Active" #define G_PASTE_DAEMON_PROP_VERSION "Version" #define G_PASTE_DAEMON_INTERFACE \ "" \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ "" #define G_PASTE_SEARCH_PROVIDER_OBJECT_PATH "/org/gnome/GPaste/SearchProvider" #define G_PASTE_SEARCH_PROVIDER_INTERFACE_NAME "org.gnome.Shell.SearchProvider2" #define G_PASTE_SEARCH_PROVIDER_GET_INITIAL_RESULT_SET "GetInitialResultSet" #define G_PASTE_SEARCH_PROVIDER_GET_SUBSEARCH_RESULT_SET "GetSubsearchResultSet" #define G_PASTE_SEARCH_PROVIDER_GET_RESULT_METAS "GetResultMetas" #define G_PASTE_SEARCH_PROVIDER_ACTIVATE_RESULT "ActivateResult" #define G_PASTE_SEARCH_PROVIDER_LAUNCH_SEARCH "LaunchSearch" #define G_PASTE_SEARCH_PROVIDER_INTERFACE \ "" \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ " " \ "" G_END_DECLS #endif /*__G_PASTE_GDBUS_DEFINES_H__*/ gpaste-3.42.6/src/libgpaste/gpaste-gdbus-macros.h000066400000000000000000000476021421222064600216620ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_GDBUS_MACROS_H__ #define __G_PASTE_GDBUS_MACROS_H__ #ifndef __GI_SCANNER__ #include #include G_BEGIN_DECLS /***************/ /* Constructor */ /***************/ #define CUSTOM_PROXY_NEW_ASYNC(TYPE, BUS_ID, BUS_NAME) \ g_async_initable_new_async (G_PASTE_TYPE_##TYPE, \ G_PRIORITY_DEFAULT, \ NULL, /* cancellable */ \ callback, \ user_data, \ "g-bus-type", G_BUS_TYPE_SESSION, \ "g-flags", G_DBUS_PROXY_FLAGS_NONE, \ "g-name", BUS_NAME, \ "g-object-path", G_PASTE_##BUS_ID##_OBJECT_PATH, \ "g-interface-name", G_PASTE_##BUS_ID##_INTERFACE_NAME, \ NULL) #define CUSTOM_PROXY_RET(TYPE) \ if (_error) \ { \ if (error) \ { \ *error = _error; \ _error = NULL; \ } \ return NULL; \ } \ return (self) ? G_PASTE_##TYPE (self) : NULL #define CUSTOM_PROXY_NEW_FINISH(TYPE) \ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), NULL); \ g_return_val_if_fail (!error || !(*error), NULL); \ g_autoptr (GObject) source = g_async_result_get_source_object (result); \ g_autoptr (GError) _error = NULL; \ g_assert (source); \ GObject *self = g_async_initable_new_finish (G_ASYNC_INITABLE (source), \ result, \ &_error); \ CUSTOM_PROXY_RET (TYPE); #define CUSTOM_PROXY_NEW(TYPE, BUS_ID, BUS_NAME) \ g_autoptr (GError) _error = NULL; \ GInitable *self = g_initable_new (G_PASTE_TYPE_##TYPE, \ NULL, /* cancellable */ \ &_error, \ "g-bus-type", G_BUS_TYPE_SESSION, \ "g-flags", G_DBUS_PROXY_FLAGS_NONE, \ "g-name", BUS_NAME, \ "g-object-path", G_PASTE_##BUS_ID##_OBJECT_PATH, \ "g-interface-name", G_PASTE_##BUS_ID##_INTERFACE_NAME, \ NULL); \ CUSTOM_PROXY_RET (TYPE); /********************/ /* Methods / Common */ /********************/ #define DBUS_PREPARE_EXTRACTION(iter) \ g_autoptr (GVariant) _variant = NULL; \ G_GNUC_UNUSED GVariant *variant; \ if (iter) \ { \ GVariantIter result_iter; \ g_variant_iter_init (&result_iter, _result); \ variant = _variant = g_variant_iter_next_value (&result_iter); \ } \ else \ variant = _result #define DBUS_RETURN(if_fail, extract_and_return_answer) \ if (!_result) \ return if_fail; \ extract_and_return_answer /*****************************/ /* Methods / Async / General */ /*****************************/ #define DBUS_CALL_ASYNC_FULL(TYPE_CHECKER, decl, method, params, n_params) \ g_return_if_fail (_G_PASTE_IS_##TYPE_CHECKER (self)); \ decl; \ g_dbus_proxy_call (G_DBUS_PROXY(self), \ method, \ g_variant_new_tuple (params, n_params), \ G_DBUS_CALL_FLAGS_NONE, \ -1, \ NULL, /* cancellable */ \ callback, \ user_data) /**************************/ /* Methods / Async / Impl */ /**************************/ #define DBUS_CALL_NO_PARAM_ASYNC_BASE(TYPE_CHECKER, method) \ DBUS_CALL_ASYNC_FULL (TYPE_CHECKER, {}, method, NULL, 0) #define DBUS_CALL_ONE_PARAM_ASYNC_BASE(TYPE_CHECKER, param_type, param_name, method) \ DBUS_CALL_ASYNC_FULL (TYPE_CHECKER, GVariant *parameter = g_variant_new_##param_type (param_name), method, ¶meter, 1) #define DBUS_CALL_ONE_PARAMV_ASYNC_BASE(TYPE_CHECKER, paramv, method) \ DBUS_CALL_ASYNC_FULL (TYPE_CHECKER, {}, method, ¶mv, 1) #define DBUS_CALL_TWO_PARAMS_ASYNC_BASE(TYPE_CHECKER, params, method) \ DBUS_CALL_ASYNC_FULL (TYPE_CHECKER, {}, method, params, 2) #define DBUS_CALL_THREE_PARAMS_ASYNC_BASE(TYPE_CHECKER, params, method) \ DBUS_CALL_ASYNC_FULL (TYPE_CHECKER, {}, method, params, 3) /**************************************/ /* Methods / Async / General - Finish */ /**************************************/ #define DBUS_ASYNC_FINISH_FULL(guard, if_fail, extract_and_return_answer) \ guard; \ g_autoptr (GVariant) _result = g_dbus_proxy_call_finish (G_DBUS_PROXY (self), \ result, \ error); \ DBUS_RETURN (if_fail, extract_and_return_answer) #define DBUS_ASYNC_FINISH_WITH_RETURN_FULL(TYPE_CHECKER, if_fail, iter, extract_and_return_answer) \ DBUS_ASYNC_FINISH_FULL (g_return_val_if_fail (_G_PASTE_IS_##TYPE_CHECKER (self), if_fail); \ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), if_fail); \ g_return_val_if_fail (!error || !(*error), if_fail), \ if_fail, \ DBUS_PREPARE_EXTRACTION(iter); \ extract_and_return_answer) #define DBUS_ASYNC_FINISH_WITH_RETURN(TYPE_CHECKER, if_fail, extract_and_return_answer) \ DBUS_ASYNC_FINISH_WITH_RETURN_FULL(TYPE_CHECKER, if_fail, TRUE, extract_and_return_answer) /***********************************/ /* Methods / Async / Impl - Finish */ /***********************************/ #define DBUS_ASYNC_FINISH_NO_RETURN_BASE(TYPE_CHECKER) \ DBUS_ASYNC_FINISH_FULL (g_return_if_fail (_G_PASTE_IS_##TYPE_CHECKER (self)); \ g_return_if_fail (G_IS_ASYNC_RESULT (result)); \ g_return_if_fail (!error || !(*error)), ;, {}) #define DBUS_ASYNC_FINISH_RET_BOOL_BASE(TYPE_CHECKER) \ DBUS_ASYNC_FINISH_WITH_RETURN (TYPE_CHECKER, FALSE, return g_variant_get_boolean (variant)) #define DBUS_ASYNC_FINISH_RET_UINT64_BASE(TYPE_CHECKER) \ DBUS_ASYNC_FINISH_WITH_RETURN (TYPE_CHECKER, 0, return g_variant_get_uint64 (variant)) #define DBUS_ASYNC_FINISH_RET_UINT32_BASE(TYPE_CHECKER) \ DBUS_ASYNC_FINISH_WITH_RETURN (TYPE_CHECKER, 0, return g_variant_get_uint32 (variant)) #define DBUS_ASYNC_FINISH_RET_STRING_BASE(TYPE_CHECKER) \ DBUS_ASYNC_FINISH_WITH_RETURN (TYPE_CHECKER, NULL, return g_variant_dup_string (variant, NULL)) #define DBUS_ASYNC_FINISH_RET_ITEM_BASE(TYPE_CHECKER) \ DBUS_ASYNC_FINISH_WITH_RETURN_FULL (TYPE_CHECKER, NULL, FALSE, return g_paste_util_get_dbus_item_result (variant)) #define DBUS_ASYNC_FINISH_RET_STRV_BASE(TYPE_CHECKER) \ DBUS_ASYNC_FINISH_WITH_RETURN (TYPE_CHECKER, NULL, return g_variant_dup_strv (variant, NULL)) #define DBUS_ASYNC_FINISH_RET_ITEMS_BASE(TYPE_CHECKER) \ DBUS_ASYNC_FINISH_WITH_RETURN (TYPE_CHECKER, NULL, return g_paste_util_get_dbus_items_result (variant)) #define DBUS_ASYNC_FINISH_RET_AU_BASE(TYPE_CHECKER, len) \ DBUS_ASYNC_FINISH_WITH_RETURN (TYPE_CHECKER, NULL, return g_paste_util_get_dbus_au_result (variant, len)) /****************************/ /* Methods / Sync / General */ /****************************/ #define DBUS_CALL_FULL(guard, decl, method, params, n_params, if_fail, extract_and_return_answer) \ guard; \ decl; \ g_autoptr (GVariant) _result = g_dbus_proxy_call_sync (G_DBUS_PROXY (self), \ method, \ g_variant_new_tuple (params, n_params), \ G_DBUS_CALL_FLAGS_NONE, \ -1, \ NULL, /* cancellable */ \ error); \ DBUS_RETURN (if_fail, extract_and_return_answer) /****************************************/ /* Methods / Sync / General - No return */ /****************************************/ #define DBUS_CALL_NO_RETURN_BASE(TYPE_CHECKER, decl, method, params, n_params) \ DBUS_CALL_FULL (g_return_if_fail (_G_PASTE_IS_##TYPE_CHECKER (self)), decl, method, params, n_params, ;, {}) /******************************************/ /* Methods / Sync / General - With return */ /******************************************/ #define DBUS_CALL_WITH_RETURN_FULL_BASE(TYPE_CHECKER, decl, method, params, n_params, if_fail, variant_extract, pre_extract) \ DBUS_CALL_FULL (g_return_val_if_fail (_G_PASTE_IS_##TYPE_CHECKER (self), if_fail), decl, method, params, n_params, if_fail, \ pre_extract; \ variant_extract) #define DBUS_CALL_WITH_RETURN_RAW_BASE(TYPE_CHECKER, decl, method, params, n_params, if_fail, variant_extract) \ DBUS_CALL_WITH_RETURN_FULL_BASE (TYPE_CHECKER, decl, method, params, n_params, if_fail, variant_extract, GVariant *variant = _result) #define DBUS_CALL_WITH_RETURN_BASE_FULL(TYPE_CHECKER, decl, method, params, n_params, if_fail, iter, variant_extract) \ DBUS_CALL_WITH_RETURN_FULL_BASE (TYPE_CHECKER, decl, method, params, n_params, if_fail, variant_extract, DBUS_PREPARE_EXTRACTION(iter)) #define DBUS_CALL_WITH_RETURN_BASE(TYPE_CHECKER, decl, method, params, n_params, if_fail, variant_extract) \ DBUS_CALL_WITH_RETURN_BASE_FULL(TYPE_CHECKER, decl, method, params, n_params, if_fail, TRUE, variant_extract) /*************************************/ /* Methods / Sync / Impl - No return */ /*************************************/ #define DBUS_CALL_NO_PARAM_NO_RETURN_BASE(TYPE_CHECKER, method) \ DBUS_CALL_NO_RETURN_BASE (TYPE_CHECKER, {}, method, NULL, 0) #define DBUS_CALL_ONE_PARAMV_NO_RETURN_BASE(TYPE_CHECKER, paramv, method) \ DBUS_CALL_NO_RETURN_BASE (TYPE_CHECKER, {}, method, ¶mv, 1) #define DBUS_CALL_ONE_PARAM_NO_RETURN_BASE(TYPE_CHECKER, param_type, param_name, method) \ DBUS_CALL_NO_RETURN_BASE (TYPE_CHECKER, GVariant *parameter = g_variant_new_##param_type (param_name), method, ¶meter, 1) #define DBUS_CALL_TWO_PARAMS_NO_RETURN_BASE(TYPE_CHECKER, params, method) \ DBUS_CALL_NO_RETURN_BASE (TYPE_CHECKER, {}, method, params, 2) #define DBUS_CALL_THREE_PARAMS_NO_RETURN_BASE(TYPE_CHECKER, params, method) \ DBUS_CALL_NO_RETURN_BASE (TYPE_CHECKER, {}, method, params, 3) /**************************************************/ /* Methods / Sync / Impl - With return - No param */ /**************************************************/ #define DBUS_CALL_NO_PARAM_BASE(TYPE_CHECKER, method, if_fail, variant_extract) \ DBUS_CALL_WITH_RETURN_BASE (TYPE_CHECKER, {}, method, NULL, 0, if_fail, variant_extract) #define DBUS_CALL_NO_PARAM_RET_STRING_BASE(TYPE_CHECKER, method) \ DBUS_CALL_NO_PARAM_BASE (TYPE_CHECKER, method, NULL, return g_variant_dup_string (variant, NULL)) #define DBUS_CALL_NO_PARAM_RET_STRV_BASE(TYPE_CHECKER, method) \ DBUS_CALL_NO_PARAM_BASE (TYPE_CHECKER, method, NULL, return g_variant_dup_strv (variant, NULL)) #define DBUS_CALL_NO_PARAM_RET_ITEMS_BASE(TYPE_CHECKER, method) \ DBUS_CALL_NO_PARAM_BASE (TYPE_CHECKER, method, NULL, return g_paste_util_get_dbus_items_result (variant)) #define DBUS_CALL_ONE_PARAMV_RET_AU_BASE(TYPE_CHECKER, method, paramv, len) \ DBUS_CALL_WITH_RETURN_BASE (TYPE_CHECKER, {}, method, ¶mv, 1, NULL, return g_paste_util_get_dbus_au_result (variant, len)) #define DBUS_CALL_ONE_PARAMV_RET_ITEMS_BASE(TYPE_CHECKER, method, paramv) \ DBUS_CALL_WITH_RETURN_BASE (TYPE_CHECKER, {}, method, ¶mv, 1, NULL, return g_paste_util_get_dbus_items_result (variant)) /******************************************************/ /* Methods / Sync / General - With return - One param */ /******************************************************/ #define DBUS_CALL_ONE_PARAM_RAW_BASE(TYPE_CHECKER, param_type, param_name, method, if_fail, variant_extract) \ DBUS_CALL_WITH_RETURN_RAW_BASE (TYPE_CHECKER, GVariant *parameter = g_variant_new_##param_type (param_name), method, ¶meter, 1, if_fail, variant_extract) #define DBUS_CALL_ONE_PARAM_BASE_FULL(TYPE_CHECKER, param_type, param_name, method, if_fail, iter, variant_extract) \ DBUS_CALL_WITH_RETURN_BASE_FULL (TYPE_CHECKER, GVariant *parameter = g_variant_new_##param_type (param_name), method, ¶meter, 1, if_fail, iter, variant_extract) #define DBUS_CALL_ONE_PARAM_BASE(TYPE_CHECKER, param_type, param_name, method, if_fail, variant_extract) \ DBUS_CALL_ONE_PARAM_BASE_FULL (TYPE_CHECKER, param_type, param_name, method, if_fail, TRUE, variant_extract) /***************************************************/ /* Methods / Sync / Impl - With return - One param */ /***************************************************/ #define DBUS_CALL_ONE_PARAM_RET_BOOL_BASE(TYPE_CHECKER, param_type, param_name, method) \ DBUS_CALL_ONE_PARAM_BASE (TYPE_CHECKER, param_type, param_name, method, FALSE, return g_variant_get_boolean (variant)) #define DBUS_CALL_ONE_PARAM_RET_UINT64_BASE(TYPE_CHECKER, param_type, param_name, method) \ DBUS_CALL_ONE_PARAM_BASE (TYPE_CHECKER, param_type, param_name, method, 0, return g_variant_get_uint64 (variant)) #define DBUS_CALL_ONE_PARAM_RET_STRING_BASE(TYPE_CHECKER, param_type, param_name, method) \ DBUS_CALL_ONE_PARAM_BASE (TYPE_CHECKER, param_type, param_name, method, NULL, return g_variant_dup_string (variant, NULL /* length */)) #define DBUS_CALL_ONE_PARAM_RET_STRV_BASE(TYPE_CHECKER, param_type, param_name, method) \ DBUS_CALL_ONE_PARAM_BASE (TYPE_CHECKER, param_type, param_name, method, NULL, return g_variant_dup_strv (variant, NULL)) #define DBUS_CALL_ONE_PARAM_RET_ITEM_BASE(TYPE_CHECKER, param_type, param_name, method) \ DBUS_CALL_ONE_PARAM_BASE_FULL (TYPE_CHECKER, param_type, param_name, method, NULL, FALSE, return g_paste_util_get_dbus_item_result (variant)) /****************************************************/ /* Methods / Sync / Impl - With return - Two params */ /****************************************************/ #define DBUS_CALL_TWO_PARAMS_BASE(TYPE_CHECKER, params, method, if_fail, variant_extract) \ DBUS_CALL_WITH_RETURN_BASE (TYPE_CHECKER, {}, method, params, 2, if_fail, variant_extract) #define DBUS_CALL_TWO_PARAMS_RET_UINT64_BASE(TYPE_CHECKER, params, method) \ DBUS_CALL_TWO_PARAMS_BASE(TYPE_CHECKER, params, method, 0, return g_variant_get_uint64 (variant)) #define DBUS_CALL_THREE_PARAMS_BASE(TYPE_CHECKER, params, method, if_fail, variant_extract) \ DBUS_CALL_WITH_RETURN_BASE (TYPE_CHECKER, {}, method, params, 3, if_fail, variant_extract) #define DBUS_CALL_THREE_PARAMS_RET_UINT32_BASE(TYPE_CHECKER, params, method) \ DBUS_CALL_THREE_PARAMS_BASE(TYPE_CHECKER, params, method, 0, return g_variant_get_uint32 (variant)) /************************/ /* Properties / Getters */ /************************/ #define DBUS_GET_PROPERTY_INIT(TYPE_CHECKER, property, _default) \ g_return_val_if_fail (_G_PASTE_IS_##TYPE_CHECKER (self), _default); \ g_autoptr (GVariant) result = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (self), \ property); \ if (!result) \ return _default #define DBUS_GET_BOOLEAN_PROPERTY_BASE(TYPE_CHECKER, property) \ DBUS_GET_PROPERTY_INIT (TYPE_CHECKER, property, FALSE); \ return g_variant_get_boolean (result) #define DBUS_GET_STRING_PROPERTY_BASE(TYPE_CHECKER, property) \ DBUS_GET_PROPERTY_INIT (TYPE_CHECKER, property, NULL); \ return g_variant_dup_string (result, NULL) /************************/ /* Properties / Setters */ /************************/ #define DBUS_SET_GENERIC_PROPERTY_BASE(TYPE_CHECKER, iface, property, value, vtype) \ g_return_val_if_fail (_G_PASTE_IS_##TYPE_CHECKER (self), FALSE); \ GVariant *prop[] = { \ g_variant_new_string (iface), \ g_variant_new_string (property), \ g_variant_new_variant (g_variant_new_##vtype (value)) \ }; \ g_autoptr (GVariant) result = g_dbus_proxy_call_sync (G_DBUS_PROXY (self), \ "org.freedesktop.DBus.Properties.Set", \ g_variant_new_tuple (prop, 3), \ G_DBUS_CALL_FLAGS_NONE, \ -1, \ NULL, /* cancellable */ \ error); \ return !!result #define DBUS_SET_BOOLEAN_PROPERTY_BASE(TYPE_CHECKER, iface, property, value) \ DBUS_SET_GENERIC_PROPERTY_BASE (TYPE_CHECKER, iface, property, value, boolean) G_END_DECLS #endif /*__GI_SCANNER__ */ #endif /*__G_PASTE_GDBUS_MACROS_H__*/ gpaste-3.42.6/src/libgpaste/gpaste-gsettings-keys.h000066400000000000000000000046371421222064600222550ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __GPASTE_GSETTINGS_KEYS_H__ #define __GPASTE_GSETTINGS_KEYS_H__ #include G_BEGIN_DECLS #define G_PASTE_SETTINGS_NAME "org.gnome.GPaste" #define G_PASTE_SETTINGS_PATH "/org/gnome/GPaste/" #define G_PASTE_SHELL_SETTINGS_NAME "org.gnome.shell" #define G_PASTE_CLOSE_ON_SELECT_SETTING "close-on-select" #define G_PASTE_ELEMENT_SIZE_SETTING "element-size" #define G_PASTE_EMPTY_HISTORY_CONFIRMATION_SETTING "empty-history-confirmation" #define G_PASTE_GROWING_LINES_SETTING "growing-lines" #define G_PASTE_HISTORY_NAME_SETTING "history-name" #define G_PASTE_IMAGES_SUPPORT_SETTING "images-support" #define G_PASTE_LAUNCH_UI_SETTING "launch-ui" #define G_PASTE_MAKE_PASSWORD_SETTING "make-password" #define G_PASTE_MAX_DISPLAYED_HISTORY_SIZE_SETTING "max-displayed-history-size" #define G_PASTE_MAX_HISTORY_SIZE_SETTING "max-history-size" #define G_PASTE_MAX_MEMORY_USAGE_SETTING "max-memory-usage" #define G_PASTE_MAX_TEXT_ITEM_SIZE_SETTING "max-text-item-size" #define G_PASTE_MIN_TEXT_ITEM_SIZE_SETTING "min-text-item-size" #define G_PASTE_POP_SETTING "pop" #define G_PASTE_PRIMARY_TO_HISTORY_SETTING "primary-to-history" #define G_PASTE_RICH_TEXT_SUPPORT_SETTING "rich-text-support" #define G_PASTE_SAVE_HISTORY_SETTING "save-history" #define G_PASTE_SHOW_HISTORY_SETTING "show-history" #define G_PASTE_SYNC_CLIPBOARD_TO_PRIMARY_SETTING "sync-clipboard-to-primary" #define G_PASTE_SYNC_PRIMARY_TO_CLIPBOARD_SETTING "sync-primary-to-clipboard" #define G_PASTE_SYNCHRONIZE_CLIPBOARDS_SETTING "synchronize-clipboards" #define G_PASTE_TRACK_CHANGES_SETTING "track-changes" #define G_PASTE_TRACK_EXTENSION_STATE_SETTING "track-extension-state" #define G_PASTE_TRIM_ITEMS_SETTING "trim-items" #define G_PASTE_UPLOAD_SETTING "upload" #define G_PASTE_EXTENSION_ENABLED_SETTING "extension-enabled" #define G_PASTE_SHELL_ENABLED_EXTENSIONS_SETTING "enabled-extensions" G_END_DECLS #endif /*__GPASTE_GSETTINGS_KEYS_H__*/ gpaste-3.42.6/src/libgpaste/gpaste-gtk-compat.h000066400000000000000000000015371421222064600213370ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #ifndef __GPASTE_GTK_COMPAT_H__ #define __GPASTE_GTK_COMPAT_H__ #ifndef __GI_SCANNER__ #include G_BEGIN_DECLS #if GTK_API > 3 # define gtk_widget_show_all(widget) gtk_widget_show (widget) # define gtk_box_pack_start(box, child, expand, fill) gtk_box_pack_start (box, child) #else # define gtk_box_pack_start(box, child, expand, fill) gtk_box_pack_start (box, child, expand, fill, 0) # define gtk_box_pack_end(box, child) gtk_box_pack_end (box, child, FALSE, TRUE, 0) # define gtk_widget_measure(widget, orientation, for_size, minimum, natural, minimum_baseline, natural_baseline) gtk_widget_get_preferred_height (widget, minimum, natural) #endif G_END_DECLS #endif /*__GI_SCANNER__ */ #endif /*__GPASTE_GTK_COMPAT_H__*/ gpaste-3.42.6/src/libgpaste/gpaste-macros.h000066400000000000000000000145361421222064600205600ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __GPASTE_MACROS_H__ #define __GPASTE_MACROS_H__ #include #include #include #include G_BEGIN_DECLS #ifdef G_HAVE_GNUC_VISIBILITY # define G_PASTE_VISIBLE __attribute__((visibility("default"))) #else # define G_PASTE_VISIBLE #endif #define g_paste_str_equal(s1, s2) (!g_strcmp0 (s1, s2)) #define G_PASTE_CONST_CHECKER(TYPE_NAME) \ static inline gboolean \ _G_PASTE_IS_##TYPE_NAME (gconstpointer ptr) { \ return G_PASTE_IS_##TYPE_NAME ((gpointer) ptr); \ } #define G_PASTE_CONST_CLASS_GETTER(TypeName, TYPE_NAME) \ static inline const GPaste##TypeName##Class * \ _G_PASTE_##TYPE_NAME##_GET_CLASS (gconstpointer ptr) { \ return G_PASTE_##TYPE_NAME##_GET_CLASS ((gpointer) ptr); \ } #define G_PASTE_CONST_CASTER(TypeName, TYPE_NAME) \ static inline const GPaste##TypeName * \ _G_PASTE_##TYPE_NAME (gconstpointer ptr) { \ return G_PASTE_##TYPE_NAME ((gpointer) ptr); \ } #define G_PASTE_CONST_FUNCS(TypeName, TYPE_NAME) \ G_PASTE_CONST_CHECKER (TYPE_NAME) \ G_PASTE_CONST_CASTER (TypeName, TYPE_NAME) #define G_PASTE_DERIVABLE_TYPE(TypeName, type_name, TYPE_NAME, ParentTypeName) \ G_PASTE_VISIBLE G_DECLARE_DERIVABLE_TYPE (GPaste##TypeName, g_paste_##type_name, G_PASTE, TYPE_NAME, ParentTypeName) \ G_PASTE_CONST_CLASS_GETTER (TypeName, TYPE_NAME) \ G_PASTE_CONST_FUNCS (TypeName, TYPE_NAME) #define G_PASTE_FINAL_TYPE(TypeName, type_name, TYPE_NAME, ParentTypeName) \ G_PASTE_VISIBLE G_DECLARE_FINAL_TYPE (GPaste##TypeName, g_paste_##type_name, G_PASTE, TYPE_NAME, ParentTypeName) \ G_PASTE_CONST_FUNCS (TypeName, TYPE_NAME) #define G_PASTE_CONST_PRIV_ACCESSOR(TypeName, type_name) \ static inline gconstpointer \ _g_paste_##type_name##_get_instance_private (const GPaste##TypeName *self) \ { \ return g_paste_##type_name##_get_instance_private ((GPaste##TypeName *) self); \ } #define G_PASTE_DEFINE_TYPE(TypeName, type_name, ParentTypeName) \ G_DEFINE_TYPE (GPaste##TypeName, g_paste_##type_name, ParentTypeName) \ G_PASTE_CONST_PRIV_ACCESSOR (TypeName, type_name) #define G_PASTE_DEFINE_TYPE_WITH_PRIVATE(TypeName, type_name, ParentTypeName) \ G_DEFINE_TYPE_WITH_PRIVATE (GPaste##TypeName, g_paste_##type_name, ParentTypeName) \ G_PASTE_CONST_PRIV_ACCESSOR (TypeName, type_name) #define G_PASTE_DEFINE_ABSTRACT_TYPE(TypeName, type_name, ParentTypeName) \ G_DEFINE_ABSTRACT_TYPE (GPaste##TypeName, g_paste_##type_name, ParentTypeName) \ G_PASTE_CONST_PRIV_ACCESSOR (TypeName, type_name) #define G_PASTE_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(TypeName, type_name, ParentTypeName) \ G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GPaste##TypeName, g_paste_##type_name, ParentTypeName) \ G_PASTE_CONST_PRIV_ACCESSOR (TypeName, type_name) #define G_PASTE_INIT_GETTEXT() \ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); \ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); \ textdomain (GETTEXT_PACKAGE) #define G_PASTE_INIT_APPLICATION_FULL(name, activate_cb) \ G_PASTE_INIT_GETTEXT (); \ GtkApplication *app = gtk_application_new ("org.gnome.GPaste." name, G_APPLICATION_FLAGS_NONE); \ GApplication *gapp = G_APPLICATION (app); \ g_autoptr (GError) error = NULL; \ G_APPLICATION_GET_CLASS (gapp)->activate = activate_cb; \ g_application_register (gapp, NULL, &error); \ if (error) \ { \ fprintf (stderr, "%s: %s\n", _("Failed to register the gtk application"), error->message); \ return EXIT_FAILURE; \ } \ if (g_application_get_is_remote (gapp)) \ { \ if (G_APPLICATION_GET_CLASS (gapp)->activate) \ { \ g_application_activate (gapp); \ return g_application_run (gapp, argc, argv); \ } \ else \ { \ fprintf (stderr, "GPaste " name " %s\n", _("is already running.")); \ exit (EXIT_FAILURE); \ } \ } \ g_object_set (gtk_settings_get_default (), "gtk-application-prefer-dark-theme", TRUE, NULL) #define G_PASTE_INIT_APPLICATION(name) \ G_PASTE_INIT_APPLICATION_FULL (name, NULL) G_END_DECLS #endif /*__GPASTE_MACROS_H__*/ gpaste-3.42.6/src/libgpaste/gpaste.h000066400000000000000000000034651421222064600172750ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #ifndef __G_PASTE_H__ #define __G_PASTE_H__ #define __G_PASTE_H_INSIDE__ /* Misc. macros */ #include /* Core GPaste Components */ #include #include #include #include #include #include #include #include #include /* GPasteIO */ #include #include /* GPasteUtil */ #include /* GPasteKeybinder */ #include #include #include #include #include #include #include #include #include /* GPasteBus */ #include #include #include /* GPasteBusObject */ #include /* GPasteDaemon */ #include /* GPasteSearchProvider */ #include /* GPasteClient */ #include #include /* GPasteGnomeShellClient */ #include /* GPasteScreensaverClient */ #include /* GPasteSettings */ #include #include /* GPasteSettingsUi */ #include #include #include #undef __G_PASTE_H_INSIDE__ #endif /*__G_PASTE_H__*/ gpaste-3.42.6/src/libgpaste/io/000077500000000000000000000000001421222064600162405ustar00rootroot00000000000000gpaste-3.42.6/src/libgpaste/io/gpaste-file-backend.c000066400000000000000000000467301421222064600222030ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include #include #include G_PASTE_DEFINE_TYPE (FileBackend, file_backend, G_PASTE_TYPE_STORAGE_BACKEND) static gboolean _g_paste_file_backend_write_image_metadata (GOutputStream *stream, const GPasteImageItem *item) { g_autofree gchar *date_str = g_date_time_format ((GDateTime *) g_paste_image_item_get_date (item), "%s"); return g_output_stream_write_all (stream, "\" date=\"", 8, NULL, NULL /* cancellable */, NULL /* error */) && g_output_stream_write_all (stream, date_str, 10, NULL, NULL /* cancellable */, NULL /* error */); } static gboolean _g_paste_file_backend_write_special_values (GOutputStream *stream, const GSList *special_values) { for (const GSList *val = special_values; val; val = val->next) { const GPasteSpecialValue *value = val->data; const gchar *mime = g_enum_get_value (g_type_class_peek (G_PASTE_TYPE_SPECIAL_ATOM), value->mime)->value_nick; g_autofree gchar *text = g_paste_util_xml_encode (value->data); if (!g_output_stream_write_all (stream, " \n", 12, NULL, NULL /* cancellable */, NULL /* error */)) { return FALSE; } } return TRUE; } static void g_paste_file_backend_write_history_file (const GPasteStorageBackend *self, const gchar *history_file_path, const GList *history) { const GPasteSettings *settings = _G_PASTE_STORAGE_BACKEND_GET_CLASS (self)->get_settings (self); if (!g_paste_util_ensure_history_dir_exists (settings)) return; g_autoptr (GFile) history_file = g_file_new_for_path (history_file_path); if (!g_paste_settings_get_save_history (settings)) { g_file_delete (history_file, NULL, /* cancellable*/ NULL); /* error */ return; } const GPasteFileBackend *real_self = _G_PASTE_FILE_BACKEND (self); g_autoptr (GOutputStream) stream = _G_PASTE_FILE_BACKEND_GET_CLASS (real_self)->get_output_stream (real_self, history_file); if (!g_output_stream_write_all (stream, "\n", 39, NULL, NULL /* cancellable */, NULL /* error */) || !g_output_stream_write_all (stream, "\n", 24, NULL, NULL /* cancellable */, NULL /* error */)) return; for (; history; history = g_list_next (history)) { GPasteItem *item = history->data; const gchar *kind = g_paste_item_get_kind (item); const gchar *uuid = g_paste_item_get_uuid (item); if (g_paste_str_equal (kind, "Password")) continue; const GSList *special_values = g_paste_item_get_special_values (item); g_autofree gchar *text = g_paste_util_xml_encode (g_paste_item_get_value (item)); if (!g_output_stream_write_all (stream, " \n \n", 12, NULL, NULL /* cancellable */, NULL /* error */) || (special_values && !_g_paste_file_backend_write_special_values (stream, special_values)) || !g_output_stream_write_all (stream, " \n", 10, NULL, NULL /* cancellable */, NULL /* error */)) { g_warning ("Failed to write an item to history"); continue; } } if (!g_output_stream_write_all (stream, "\n", 11, NULL, NULL /* cancellable */, NULL /* error */) || !g_output_stream_close (stream, NULL /* cancellable */, NULL /* error */)) { g_warning ("Failed to finish writing history"); } } /********************/ /* Begin XML Parser */ /********************/ typedef enum { BEGIN, IN_HISTORY, IN_ITEM, IN_ITEM_WITH_TEXT, IN_VALUE, IN_VALUE_WITH_TEXT, END } State; typedef enum { TEXT, IMAGE, URIS, PASSWORD } Type; typedef enum { HISTORY_1_0, HISTORY_2_0, HISTORY_CURRENT = HISTORY_2_0, HISTORY_INVALID = -1 } HistoryVersion; typedef struct { GList *history; gsize mem_size; State state; Type type; guint64 current_size; guint64 max_size; gboolean images_support; gchar *uuid; gchar *date; gchar *name; gchar *text; GSList *special_values; HistoryVersion version; GPasteSpecialAtom mime; } Data; #define ASSERT_STATE(x) \ if (data->state != x) \ { \ g_warning ("Expected state %" G_GINT32_FORMAT ", but got %" G_GINT32_FORMAT, x, data->state); \ return; \ } #define SWITCH_STATE(x, y) \ ASSERT_STATE (x); \ data->state = y static gboolean history_contains_uuid (const GList *history, const gchar *uuid) { for (; history; history = g_list_next (history)) { const GPasteItem *item = history->data; if (g_paste_str_equal (g_paste_item_get_uuid (item), uuid)) return TRUE; } return FALSE; } static void start_tag (GMarkupParseContext *context G_GNUC_UNUSED, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer user_data, GError **error G_GNUC_UNUSED) { Data *data = user_data; if (g_paste_str_equal (element_name, "history")) { SWITCH_STATE (BEGIN, IN_HISTORY); for (const gchar **a = attribute_names, **v = attribute_values; *a && *v; ++a, ++v) { if (g_paste_str_equal (*a, "version")) { if (g_paste_str_equal (*v, "1.0")) { data->version = HISTORY_1_0; } else if (g_paste_str_equal (*v, "2.0")) { data->version = HISTORY_2_0; } else { g_warning ("Unknown history version: %s", *v); data->version = HISTORY_INVALID; } } } } else if (g_paste_str_equal (element_name, "item")) { SWITCH_STATE (IN_HISTORY, IN_ITEM); g_clear_pointer (&data->uuid, g_free); g_clear_pointer (&data->date, g_free); g_clear_pointer (&data->name, g_free); g_clear_pointer (&data->text, g_free); for (const gchar **a = attribute_names, **v = attribute_values; *a && *v; ++a, ++v) { if (g_paste_str_equal (*a, "kind")) { if (g_paste_str_equal (*v, "Text")) data->type = TEXT; else if (g_paste_str_equal (*v, "Image")) data->type = IMAGE; else if (g_paste_str_equal (*v, "Uris")) data->type = URIS; else if (g_paste_str_equal (*v, "Password")) data->type = PASSWORD; else g_warning ("Unknown item kind: %s", *v); } else if (g_paste_str_equal (*a, "uuid")) { if (g_uuid_string_is_valid (*v) && !history_contains_uuid (data->history, *v)) data->uuid = g_strdup (*v); } else if (g_paste_str_equal (*a, "date")) { if (data->type != IMAGE) { g_warning ("Expected type %" G_GINT32_FORMAT ", but got %" G_GINT32_FORMAT, IMAGE, data->type); return; } data->date = g_strdup (*v); } else if (g_paste_str_equal (*a, "name")) { if (data->type != PASSWORD) { g_warning ("Expected type %" G_GINT32_FORMAT ", but got %" G_GINT32_FORMAT, PASSWORD, data->type); return; } data->name = g_strdup (*v); } else { g_warning ("Unknown item attribute: %s", *a); } } } else if (g_paste_str_equal (element_name, "value")) { SWITCH_STATE (IN_ITEM, IN_VALUE); data->mime = G_PASTE_SPECIAL_ATOM_INVALID; for (const gchar **a = attribute_names, **v = attribute_values; *a && *v; ++a, ++v) { if (g_paste_str_equal (*a, "mime")) { GEnumValue *gev = g_enum_get_value_by_nick (g_type_class_peek (G_PASTE_TYPE_SPECIAL_ATOM), *v); if (gev) data->mime = gev->value; else g_warning ("Unknown mime: %s", *v); } } } else { g_warning ("Unknown element: %s", element_name); } } static void add_item (Data *data) { GPasteItem *item = NULL; switch (data->type) { case TEXT: item = g_paste_text_item_new (data->text); break; case URIS: item = g_paste_uris_item_new (data->text); break; case PASSWORD: item = g_paste_password_item_new (data->name, data->text); break; case IMAGE: if (data->images_support && data->date) { g_autoptr (GDateTime) date_time = g_date_time_new_from_unix_local (g_ascii_strtoll (data->date, NULL, /* end */ 0)); /* base */ item = g_paste_image_item_new_from_file (data->text, date_time); } else { g_autoptr (GFile) img_file = g_file_new_for_path (data->text); if (g_file_query_exists (img_file, NULL)) /* cancellable */ { g_file_delete (img_file, NULL, /* cancellable */ NULL); /* error */ } } break; } if (item) { if (!data->uuid) data->uuid = g_uuid_string_random (); g_paste_item_set_uuid (item, data->uuid); data->mem_size += g_paste_item_get_size (item); data->history = g_list_append (data->history, item); ++data->current_size;; } for (GSList *d = data->special_values; d; d = d->next) { GPasteSpecialValue *v = d->data; if (item) g_paste_item_add_special_value (item, v); g_free (v->data); g_free (v); } g_clear_pointer(&data->special_values, g_slist_free); } static void end_tag (GMarkupParseContext *context G_GNUC_UNUSED, const gchar *element_name, gpointer user_data, GError **error G_GNUC_UNUSED) { Data *data = user_data; if (g_paste_str_equal (element_name, "history")) { SWITCH_STATE (IN_HISTORY, END); } else if (g_paste_str_equal (element_name, "item")) { if (data->current_size < data->max_size) add_item (data); switch (data->version) { case HISTORY_1_0: SWITCH_STATE (IN_ITEM_WITH_TEXT, IN_HISTORY); break; case HISTORY_2_0: SWITCH_STATE (IN_ITEM, IN_HISTORY); break; case HISTORY_INVALID: g_warning ("Invalid history version, ignoring end of item"); break; } } else if (g_paste_str_equal (element_name, "value")) { SWITCH_STATE (IN_VALUE_WITH_TEXT, IN_ITEM); } else { g_warning ("Unknown element: %s", element_name); } } static void on_text (GMarkupParseContext *context G_GNUC_UNUSED, const gchar *text, guint64 text_len, gpointer user_data, GError **error G_GNUC_UNUSED) { Data *data = user_data; g_autofree gchar *txt = g_strndup (text, text_len); switch (data->state) { case IN_HISTORY: case IN_ITEM_WITH_TEXT: case IN_VALUE_WITH_TEXT: if (*g_strstrip (txt)) { g_warning ("Unexpected text: %s", txt); return; } break; case IN_ITEM: { if (data->version == HISTORY_1_0) { data->text = g_paste_util_xml_decode (txt); if (*g_strstrip (txt)) { SWITCH_STATE (IN_ITEM, IN_ITEM_WITH_TEXT); } else { g_clear_pointer (&data->text, g_free); } } else if (*g_strstrip (txt)) { g_warning ("Unexpected text in item for history version != 1.0 %s", txt); } break; } case IN_VALUE: if (data->version == HISTORY_2_0) { gchar *value = g_paste_util_xml_decode (txt); if (*g_strstrip (txt)) { SWITCH_STATE (IN_VALUE, IN_VALUE_WITH_TEXT); if (data->mime == G_PASTE_SPECIAL_ATOM_INVALID) { g_free (data->text); data->text = value; } else { GPasteSpecialValue *sv = g_new (GPasteSpecialValue, 1); sv->mime = data->mime; sv->data = value; data->special_values = g_slist_prepend (data->special_values, sv); } } else { g_free (value); } } else { g_warning ("Unexpected value for history version != 2.0"); } break; default: g_warning ("Unexpected state: %" G_GINT32_FORMAT, data->state); break; } } static void on_error (GMarkupParseContext *context G_GNUC_UNUSED, GError *error, gpointer user_data G_GNUC_UNUSED) { g_warning ("error: %s", error->message); } /******************/ /* End XML Parser */ /******************/ static void g_paste_file_backend_read_history_file (const GPasteStorageBackend *self, const gchar *history_file_path, GList **history, gsize *size) { const GPasteSettings *settings = _G_PASTE_STORAGE_BACKEND_GET_CLASS (self)->get_settings (self); g_autoptr (GFile) history_file = g_file_new_for_path (history_file_path); g_autofree gchar *text = NULL; if (g_file_query_exists (history_file, NULL)) /* cancellable */ { GMarkupParser parser = { start_tag, end_tag, on_text, NULL, on_error }; Data data = { NULL, 0, BEGIN, TEXT, 0, g_paste_settings_get_max_history_size (settings), g_paste_settings_get_images_support (settings), NULL, NULL, NULL, NULL, NULL, HISTORY_INVALID, G_PASTE_SPECIAL_ATOM_INVALID }; GMarkupParseContext *ctx = g_markup_parse_context_new (&parser, G_MARKUP_TREAT_CDATA_AS_TEXT, &data, NULL); guint64 text_length; g_file_get_contents (history_file_path, &text, &text_length, NULL); g_markup_parse_context_parse (ctx, text, text_length, NULL); g_markup_parse_context_end_parse (ctx, NULL); if (data.state != END) g_warning ("Unexpected state adter parsing history: %" G_GINT32_FORMAT, data.state); g_markup_parse_context_unref (ctx); *history = data.history; *size = data.mem_size; g_clear_pointer (&data.date, g_free); g_clear_pointer (&data.name, g_free); g_clear_pointer (&data.text, g_free); if (data.version != HISTORY_CURRENT) g_paste_file_backend_write_history_file (self, history_file_path, *history); } else { /* Create the empty file to be listed as an available history */ if (g_paste_util_ensure_history_dir_exists (settings)) g_object_unref (g_file_create (history_file, G_FILE_CREATE_NONE, NULL, NULL)); } } static const gchar * g_paste_file_backend_get_extension (const GPasteStorageBackend *self G_GNUC_UNUSED) { return "xml"; } static GOutputStream * g_paste_file_backend_get_output_stream (const GPasteFileBackend *self G_GNUC_UNUSED, GFile *output_file) { return G_OUTPUT_STREAM (g_file_replace (output_file, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, NULL, /* cancellable */ NULL)); /* error */ } static void g_paste_file_backend_class_init (GPasteFileBackendClass *klass) { GPasteStorageBackendClass *storage_class = G_PASTE_STORAGE_BACKEND_CLASS (klass); storage_class->read_history_file = g_paste_file_backend_read_history_file; storage_class->write_history_file = g_paste_file_backend_write_history_file; storage_class->get_extension = g_paste_file_backend_get_extension; klass->get_output_stream = g_paste_file_backend_get_output_stream; } static void g_paste_file_backend_init (GPasteFileBackend *self G_GNUC_UNUSED) { } gpaste-3.42.6/src/libgpaste/io/gpaste-file-backend.h000066400000000000000000000015061421222064600222000ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_FILE_BACKEND_H__ #define __G_PASTE_FILE_BACKEND_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_FILE_BACKEND (g_paste_file_backend_get_type ()) G_PASTE_DERIVABLE_TYPE (FileBackend, file_backend, FILE_BACKEND, GPasteStorageBackend) struct _GPasteFileBackendClass { GPasteStorageBackendClass parent_class; /*< protected >*/ GOutputStream *(*get_output_stream) (const GPasteFileBackend *self, GFile *output_file); }; G_END_DECLS #endif /*__G_PASTE_FILE_BACKEND_H__*/ gpaste-3.42.6/src/libgpaste/io/gpaste-storage-backend.c000066400000000000000000000105141421222064600227170ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include typedef struct { GPasteSettings *settings; } GPasteStorageBackendPrivate; G_PASTE_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (StorageBackend, storage_backend, G_TYPE_OBJECT) static gchar * _g_paste_storage_backend_get_history_file_path (const GPasteStorageBackend *self, const gchar *name) { return g_paste_util_get_history_file_path (name, _G_PASTE_STORAGE_BACKEND_GET_CLASS (self)->get_extension (self)); } /** * g_paste_storage_backend_read_history: * @self: a #GPasteItem instance * @name: the name of the history to load * @history: (out) (element-type GPasteItem): the history we just read * @size: (out): the size used by the history * * Reads the history from our storage backend */ G_PASTE_VISIBLE void g_paste_storage_backend_read_history (const GPasteStorageBackend *self, const gchar *name, GList **history, gsize *size) { g_return_if_fail (_G_PASTE_IS_STORAGE_BACKEND (self)); g_return_if_fail (name); g_return_if_fail (history && !*history); g_return_if_fail (size); g_autofree gchar *history_file_path = _g_paste_storage_backend_get_history_file_path (self, name); _G_PASTE_STORAGE_BACKEND_GET_CLASS (self)->read_history_file (self, history_file_path, history, size); } /** * g_paste_storage_backend_write_history: * @self: a #GPasteItem instance * @name: the name of the history to save * @history: (element-type GPasteItem): the history to write * * Save the history by writing it to our storage backend */ G_PASTE_VISIBLE void g_paste_storage_backend_write_history (const GPasteStorageBackend *self, const gchar *name, const GList *history) { g_return_if_fail (_G_PASTE_IS_STORAGE_BACKEND (self)); g_autofree gchar *history_file_path = _g_paste_storage_backend_get_history_file_path (self, name); _G_PASTE_STORAGE_BACKEND_GET_CLASS (self)->write_history_file (self, history_file_path, history); } static void g_paste_storage_backend_dispose (GObject *object) { GPasteStorageBackendPrivate *priv = g_paste_storage_backend_get_instance_private (G_PASTE_STORAGE_BACKEND (object)); g_clear_object (&priv->settings); G_OBJECT_CLASS (g_paste_storage_backend_parent_class)->dispose (object); } static const GPasteSettings * g_paste_storage_backend_get_settings (const GPasteStorageBackend *self) { const GPasteStorageBackendPrivate *priv = _g_paste_storage_backend_get_instance_private (self); return priv->settings; } static void g_paste_storage_backend_class_init (GPasteStorageBackendClass *klass) { klass->read_history_file = NULL; klass->write_history_file = NULL; klass->get_extension = NULL; klass->get_settings = g_paste_storage_backend_get_settings; G_OBJECT_CLASS (klass)->dispose = g_paste_storage_backend_dispose; } static void g_paste_storage_backend_init (GPasteStorageBackend *self G_GNUC_UNUSED) { } static GType _g_paste_storage_backend_get_type (GPasteStorage storage_kind) { switch (storage_kind) { case G_PASTE_STORAGE_FILE: return G_PASTE_TYPE_FILE_BACKEND; default: return _g_paste_storage_backend_get_type (G_PASTE_STORAGE_DEFAULT); } } /** * g_paste_storage_backend_new: * @storage_kind: the kind of storage we want to use to save and load history * @settings: a #GPasteSettings instance * * Create a new instance of #GPasteStorageBackend * * Returns: a newly allocated #GPasteStorageBackend * free it with g_object_unref */ G_PASTE_VISIBLE GPasteStorageBackend * g_paste_storage_backend_new (GPasteStorage storage_kind, GPasteSettings *settings) { g_return_val_if_fail (G_PASTE_IS_SETTINGS (settings), NULL); GPasteStorageBackend *self = g_object_new (_g_paste_storage_backend_get_type (storage_kind), NULL); GPasteStorageBackendPrivate *priv = g_paste_storage_backend_get_instance_private (self); priv->settings = g_object_ref (settings); return self; } gpaste-3.42.6/src/libgpaste/io/gpaste-storage-backend.h000066400000000000000000000042111421222064600227210ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_STORAGE_BACKEND_H__ #define __G_PASTE_STORAGE_BACKEND_H__ #include G_BEGIN_DECLS typedef enum { G_PASTE_STORAGE_FILE, G_PASTE_STORAGE_DEFAULT = G_PASTE_STORAGE_FILE } GPasteStorage; #define G_PASTE_TYPE_STORAGE_BACKEND (g_paste_storage_backend_get_type ()) G_PASTE_DERIVABLE_TYPE (StorageBackend, storage_backend, STORAGE_BACKEND, GObject) struct _GPasteStorageBackendClass { GObjectClass parent_class; /*< pure virtual >*/ void (*read_history_file) (const GPasteStorageBackend *self, const gchar *history_file_path, GList **history, gsize *size); void (*write_history_file) (const GPasteStorageBackend *self, const gchar *history_file_path, const GList *history); /*< protected >*/ const gchar *(*get_extension) (const GPasteStorageBackend *self); const GPasteSettings *(*get_settings) (const GPasteStorageBackend *self); }; void g_paste_storage_backend_read_history (const GPasteStorageBackend *self, const gchar *name, GList **history, gsize *size); void g_paste_storage_backend_write_history (const GPasteStorageBackend *self, const gchar *name, const GList *history); GPasteStorageBackend *g_paste_storage_backend_new (GPasteStorage storage_kind, GPasteSettings *settings); G_END_DECLS #endif /*__G_PASTE_STORAGE_BACKEND_H__*/ gpaste-3.42.6/src/libgpaste/keybinder/000077500000000000000000000000001421222064600176055ustar00rootroot00000000000000gpaste-3.42.6/src/libgpaste/keybinder/gpaste-keybinder.c000066400000000000000000000527311421222064600232160ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #ifdef GDK_WINDOWING_WAYLAND # include #endif #if defined(ENABLE_X_KEYBINDER) && defined (GDK_WINDOWING_X11) # include # include #endif #define MAX_BINDINGS 7 struct _GPasteKeybinder { GObject parent_instance; }; enum { C_ACCEL, C_LAST_SIGNAL }; typedef struct { GSList *keybindings; GPasteSettings *settings; GPasteGnomeShellClient *shell_client; gboolean grabbing; guint64 retries; guint64 shell_watch; guint64 c_signals[C_LAST_SIGNAL]; } GPasteKeybinderPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (Keybinder, keybinder, G_TYPE_OBJECT) /***************************/ /* Internal grabbing stuff */ /***************************/ #ifdef GDK_WINDOWING_WAYLAND static void g_paste_keybinder_change_grab_wayland (void) { g_warning ("Wayland hotkeys are currently not supported outside of gnome-shell."); } #endif #if defined(ENABLE_X_KEYBINDER) && defined (GDK_WINDOWING_X11) static void g_paste_keybinder_change_grab_x11 (GPasteKeybinding *binding, GdkDisplay *display, gboolean grab) { if (!g_paste_keybinding_is_active (binding)) return; guchar mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 }; XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits }; Display *xdisplay = GDK_DISPLAY_XDISPLAY (display); XISetMask (mask.mask, XI_KeyPress); gdk_x11_display_error_trap_push (display); guint64 mod_masks [] = { 0, /* modifier only */ GDK_MOD2_MASK, /* NumLock */ GDK_MOD5_MASK, /* ScrollLock */ GDK_LOCK_MASK, /* CapsLock */ GDK_MOD2_MASK | GDK_MOD5_MASK, GDK_MOD2_MASK | GDK_LOCK_MASK, GDK_MOD5_MASK | GDK_LOCK_MASK, GDK_MOD2_MASK | GDK_MOD5_MASK | GDK_LOCK_MASK, }; Window window = GDK_ROOT_WINDOW (); GdkModifierType modifiers = g_paste_keybinding_get_modifiers (binding); const guint32 *keycodes = g_paste_keybinding_get_keycodes (binding); for (guint64 i = 0; i < G_N_ELEMENTS (mod_masks); ++i) { XIGrabModifiers mods = { mod_masks[i] | modifiers, 0 }; for (const guint32 *keycode = keycodes; *keycode; ++keycode) { if (grab) { XIGrabKeycode (xdisplay, XIAllMasterDevices, *keycode, window, XIGrabModeSync, XIGrabModeAsync, False, &mask, 1, &mods); } else { XIUngrabKeycode (xdisplay, XIAllMasterDevices, *keycode, window, 1, &mods); } } } gdk_display_flush (display); gdk_x11_display_error_trap_pop_ignored (display); } #endif static void g_paste_keybinder_change_grab_internal (GPasteKeybinding *binding, gboolean grab) { GdkDisplay *display = gdk_display_get_default ();; #ifdef GDK_WINDOWING_WAYLAND if (GDK_IS_WAYLAND_DISPLAY (display)) g_paste_keybinder_change_grab_wayland (); else #endif #if defined(ENABLE_X_KEYBINDER) && defined (GDK_WINDOWING_X11) if (GDK_IS_X11_DISPLAY (display)) g_paste_keybinder_change_grab_x11 (binding, display, grab); else #endif g_warning ("Unsupported GDK backend, keybinder won't work."); } /***********************************/ /* Wrapper around GPasteKeybinding */ /***********************************/ enum { C_K_REBIND, C_K_LAST_SIGNAL }; typedef struct { GPasteKeybinding *binding; GPasteSettings *settings; GPasteGnomeShellClient *shell_client; guint32 action; guint64 c_signals[C_K_LAST_SIGNAL]; } _Keybinding; static void _keybinding_activate (_Keybinding *k) { if (!g_paste_keybinding_is_active (k->binding)) g_paste_keybinding_activate (k->binding, k->settings); } static void _keybinding_deactivate (_Keybinding *k) { if (g_paste_keybinding_is_active (k->binding)) g_paste_keybinding_deactivate (k->binding); } static void on_key_grabbed (GObject *source_object, GAsyncResult *res, gpointer user_data) { _Keybinding *k = user_data; g_autoptr (GError) error = NULL; k->action = g_paste_gnome_shell_client_grab_accelerator_finish (G_PASTE_GNOME_SHELL_CLIENT (source_object), res, &error); if (error) g_warning ("Couldn't grab keybinding: %s", error->message); } static void _keybinding_grab_gnome_shell (_Keybinding *k) { if (k->action || !k->shell_client) return; GPasteGnomeShellAccelerator accel = G_PASTE_GNOME_SHELL_ACCELERATOR (g_paste_keybinding_get_accelerator (k->binding, k->settings)); g_paste_gnome_shell_client_grab_accelerator (k->shell_client, accel, on_key_grabbed, k); } static void _keybinding_grab (_Keybinding *k) { _keybinding_activate (k); if (k->shell_client) _keybinding_grab_gnome_shell (k); else g_paste_keybinder_change_grab_internal (k->binding, TRUE); } static void on_key_ungrabbed (GObject *source_object, GAsyncResult *res, gpointer user_data G_GNUC_UNUSED) { g_autoptr (GError) error = NULL; g_paste_gnome_shell_client_ungrab_accelerator_finish (G_PASTE_GNOME_SHELL_CLIENT (source_object), res, &error); if (error) g_warning ("Couldn't ungrab keybinding: %s", error->message); } static void _keybinding_ungrab_gnome_shell (_Keybinding *k) { if (!k->action || !k->shell_client) return; g_paste_gnome_shell_client_ungrab_accelerator (k->shell_client, k->action, on_key_ungrabbed, NULL); k->action = 0; } static void _keybinding_ungrab (_Keybinding *k) { if (k->shell_client) _keybinding_ungrab_gnome_shell (k); else g_paste_keybinder_change_grab_internal (k->binding, FALSE); _keybinding_deactivate (k); } static void _keybinding_rebind (_Keybinding *k, GPasteSettings *setting G_GNUC_UNUSED) { _keybinding_ungrab (k); _keybinding_grab (k); } static _Keybinding * _keybinding_new (GPasteKeybinding *binding, GPasteSettings *settings, GPasteGnomeShellClient *shell_client) { _Keybinding *k = g_new (_Keybinding, 1); k->binding = binding; k->settings = g_object_ref (settings); k->shell_client = (shell_client) ? g_object_ref (shell_client) : NULL; k->action = 0; g_autofree gchar *detailed_signal = g_strdup_printf ("rebind::%s", g_paste_keybinding_get_dconf_key (binding)); k->c_signals[C_K_REBIND] = g_signal_connect_swapped (settings, detailed_signal, G_CALLBACK (_keybinding_rebind), k); return k; } static void _keybinding_cleanup_shell_stuff (gpointer data, gpointer user_data G_GNUC_UNUSED) { _Keybinding *k = data; k->action = 0; } static void _keybinding_free (gpointer data, gpointer user_data G_GNUC_UNUSED) { _Keybinding *k = data; _keybinding_ungrab (k); g_signal_handler_disconnect (k->settings, k->c_signals[C_K_REBIND]); g_object_unref (k->binding); g_object_unref (k->settings); g_clear_object (&k->shell_client); g_free (k); } #define GET_BINDING(k) ((_Keybinding *) k)->binding /** * g_paste_keybinder_add_keybinding: * @self: a #GPasteKeybinder instance * @binding: (transfer full): a #GPasteKeybinding instance * * Add a new keybinding */ G_PASTE_VISIBLE void g_paste_keybinder_add_keybinding (GPasteKeybinder *self, GPasteKeybinding *binding) { g_return_if_fail (_G_PASTE_IS_KEYBINDER (self)); g_return_if_fail (_G_PASTE_IS_KEYBINDING (binding)); GPasteKeybinderPrivate *priv = g_paste_keybinder_get_instance_private (self); priv->keybindings = g_slist_prepend (priv->keybindings, _keybinding_new (binding, priv->settings, priv->shell_client)); } static void g_paste_keybinder_grab_keybinding_func (gpointer data, gpointer user_data G_GNUC_UNUSED) { _keybinding_grab (data); } static void g_paste_keybinder_private_grab_all (GPasteKeybinderPrivate *priv) { g_slist_foreach (priv->keybindings, g_paste_keybinder_grab_keybinding_func, NULL); } static void g_paste_keybinder_activate_keybinding_func (gpointer data, gpointer user_data G_GNUC_UNUSED) { _keybinding_activate (data); } static void g_paste_keybinder_private_grab_all_gnome_shell (GPasteKeybinderPrivate *priv); static gboolean retry_grab_all_gnome_shell (gpointer user_data) { g_paste_keybinder_private_grab_all_gnome_shell (user_data); return G_SOURCE_REMOVE; } static void release_shell_client (GPasteKeybinderPrivate *priv) { g_signal_handler_disconnect (priv->shell_client, priv->c_signals[C_ACCEL]); g_clear_object (&priv->shell_client); for (GSList *binding = priv->keybindings; binding; binding = g_slist_next (binding)) { _Keybinding *k = binding->data; g_clear_object (&k->shell_client); } } static void grab_accelerators_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { GPasteKeybinderPrivate *priv = user_data; g_autoptr (GError) error = NULL; g_autofree guint32 *actions = g_paste_gnome_shell_client_grab_accelerators_finish (G_PASTE_GNOME_SHELL_CLIENT (source_object), res, &error); if (error) { if (error->code == G_DBUS_ERROR_UNKNOWN_METHOD && priv->retries < 10) { ++priv->retries; g_source_set_name_by_id (g_timeout_add_seconds (1, retry_grab_all_gnome_shell, priv), "[GPaste] gnome-shell grab"); } else if (error->code == G_DBUS_ERROR_ACCESS_DENIED) { g_warning ("Couldn't grab keybindings with gnome-shell, falling back to X11 keybinder: %s", error->message); release_shell_client (priv); g_paste_keybinder_private_grab_all (priv); } else { priv->retries = 0; g_warning ("Couldn't grab keybindings with gnome-shell: %s", error->message); } } else { priv->retries = 0; guint64 index = 0; for (GSList *binding = priv->keybindings; binding; binding = g_slist_next (binding)) { _Keybinding *k = binding->data; if (g_paste_keybinding_is_active (k->binding)) k->action = actions[index++]; } } priv->grabbing = FALSE; } static void g_paste_keybinder_private_grab_all_gnome_shell (GPasteKeybinderPrivate *priv) { if (priv->grabbing || !priv->shell_client) return; priv->grabbing = TRUE; GPasteGnomeShellAccelerator accels[MAX_BINDINGS + 1]; GPasteSettings *settings = priv->settings; guint64 index = 0; for (GSList *binding = priv->keybindings; binding && index < MAX_BINDINGS; binding = g_slist_next (binding)) { _Keybinding *k = binding->data; GPasteKeybinding *keybinding = k->binding; if (!k->action && g_paste_keybinding_is_active (keybinding)) accels[index++] = G_PASTE_GNOME_SHELL_ACCELERATOR (g_paste_keybinding_get_accelerator (keybinding, settings)); } accels[index].accelerator = NULL; if (index) { g_paste_gnome_shell_client_grab_accelerators (priv->shell_client, accels, grab_accelerators_cb, priv); } else priv->grabbing = FALSE; } /** * g_paste_keybinder_activate_all: * @self: a #GPasteKeybinder instance * * Activate all the managed keybindings */ G_PASTE_VISIBLE void g_paste_keybinder_activate_all (GPasteKeybinder *self) { g_return_if_fail (_G_PASTE_IS_KEYBINDER (self)); GPasteKeybinderPrivate *priv = g_paste_keybinder_get_instance_private (self); if (priv->shell_client) { g_slist_foreach (priv->keybindings, g_paste_keybinder_activate_keybinding_func, NULL); g_paste_keybinder_private_grab_all_gnome_shell (priv); } else g_paste_keybinder_private_grab_all (priv); } static void g_paste_keybinder_deactivate_keybinding_func (gpointer data, gpointer user_data G_GNUC_UNUSED) { _keybinding_ungrab (data); } /** * g_paste_keybinder_deactivate_all: * @self: a #GPasteKeybinder instance * * Deactivate all the managed keybindings */ G_PASTE_VISIBLE void g_paste_keybinder_deactivate_all (GPasteKeybinder *self) { g_return_if_fail (_G_PASTE_IS_KEYBINDER (self)); const GPasteKeybinderPrivate *priv = _g_paste_keybinder_get_instance_private (self); g_slist_foreach (priv->keybindings, g_paste_keybinder_deactivate_keybinding_func, NULL); } #ifdef GDK_WINDOWING_WAYLAND static void g_paste_keybinder_parse_event_wayland (void) { g_warning ("Wayland hotkeys are currently not supported outside of gnome-shell."); } #endif #if defined(ENABLE_X_KEYBINDER) && defined (GDK_WINDOWING_X11) static gint g_paste_keybinder_get_xinput_opcode (Display *display) { static gint32 xinput_opcode = 0; if (!xinput_opcode) { gint32 major = 2, minor = 3; gint32 xinput_error_base; gint32 xinput_event_base; if (XQueryExtension (display, "XInputExtension", &xinput_opcode, &xinput_error_base, &xinput_event_base)) { if (XIQueryVersion (display, &major, &minor) != Success) g_warning ("XInput 2 not found, keybinder won't work"); } } return xinput_opcode; } static void g_paste_keybinder_parse_event_x11 (XEvent *event, GdkModifierType *modifiers, guint64 *keycode) { XGenericEventCookie cookie = event->xcookie; if (cookie.extension == g_paste_keybinder_get_xinput_opcode (NULL)) { XIDeviceEvent *xi_ev = (XIDeviceEvent *) cookie.data; if (xi_ev->evtype == XI_KeyPress) { *modifiers = xi_ev->mods.effective; *keycode = xi_ev->detail; } } } #endif static GdkFilterReturn g_paste_keybinder_filter (GdkXEvent *xevent, GdkEvent *event G_GNUC_UNUSED, gpointer data) { GPasteKeybinderPrivate *priv = data; GdkDisplay *display = gdk_display_get_default (); for (GList *_seat = gdk_display_list_seats (display); _seat; _seat = g_list_next (_seat)) { GdkSeat *seat = _seat->data; if (gdk_seat_get_keyboard (seat)) gdk_seat_ungrab (seat); } gdk_display_flush (display); GdkModifierType modifiers = 0; guint64 keycode = 0; #ifdef GDK_WINDOWING_WAYLAND if (GDK_IS_WAYLAND_DISPLAY (display)) g_paste_keybinder_parse_event_wayland (); else #endif #if defined(ENABLE_X_KEYBINDER) && defined (GDK_WINDOWING_X11) if (GDK_IS_X11_DISPLAY (display)) g_paste_keybinder_parse_event_x11 ((XEvent *) xevent, &modifiers, &keycode); else #endif g_warning ("Unsupported GDK backend, keybinder won't work."); for (GSList *keybinding = priv->keybindings; keybinding; keybinding = g_slist_next (keybinding)) { GPasteKeybinding *real_keybinding = GET_BINDING (keybinding->data); if (g_paste_keybinding_is_active (real_keybinding)) g_paste_keybinding_notify (real_keybinding, modifiers, keycode); } return GDK_FILTER_CONTINUE; } static void on_accelerator_activated (GPasteGnomeShellClient *client G_GNUC_UNUSED, guint32 action, gpointer user_data) { GPasteKeybinderPrivate *priv = user_data; for (GSList *binding = priv->keybindings; binding; binding = g_slist_next (binding)) { _Keybinding *k = binding->data; if (action == k->action) { GPasteKeybinding *keybinding = k->binding; if (g_paste_keybinding_is_active (keybinding)) g_paste_keybinding_perform (keybinding); return; } } } static void on_shell_appeared (GDBusConnection *connection G_GNUC_UNUSED, const gchar *name G_GNUC_UNUSED, const gchar *name_owner G_GNUC_UNUSED, gpointer user_data) { g_paste_keybinder_private_grab_all_gnome_shell (user_data); } static void g_paste_keybinder_private_cleanup_shell_stuff (GPasteKeybinderPrivate *priv) { g_slist_foreach (priv->keybindings, _keybinding_cleanup_shell_stuff, NULL); } static void on_shell_vanished (GDBusConnection *connection G_GNUC_UNUSED, const gchar *name G_GNUC_UNUSED, gpointer user_data) { GPasteKeybinderPrivate *priv = user_data; g_paste_keybinder_private_cleanup_shell_stuff (priv); priv->grabbing = FALSE; } static void g_paste_keybinder_dispose (GObject *object) { GPasteKeybinder *self = G_PASTE_KEYBINDER (object); GPasteKeybinderPrivate *priv = g_paste_keybinder_get_instance_private (self); if (priv->shell_watch) { g_bus_unwatch_name (priv->shell_watch); priv->shell_watch = 0; } if (priv->shell_client) release_shell_client (priv); if (priv->settings) { g_clear_object (&priv->settings); g_paste_keybinder_deactivate_all (self); g_slist_foreach (priv->keybindings, _keybinding_free, NULL); priv->keybindings = NULL; } G_OBJECT_CLASS (g_paste_keybinder_parent_class)->dispose (object); } static void g_paste_keybinder_finalize (GObject *object) { GPasteKeybinderPrivate *priv = g_paste_keybinder_get_instance_private (G_PASTE_KEYBINDER (object)); gdk_window_remove_filter (gdk_get_default_root_window (), g_paste_keybinder_filter, priv); G_OBJECT_CLASS (g_paste_keybinder_parent_class)->finalize (object); } static void g_paste_keybinder_class_init (GPasteKeybinderClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = g_paste_keybinder_dispose; object_class->finalize = g_paste_keybinder_finalize; } static void g_paste_keybinder_init (GPasteKeybinder *self) { GPasteKeybinderPrivate *priv = g_paste_keybinder_get_instance_private (self); priv->keybindings = NULL; gdk_window_add_filter (gdk_get_default_root_window (), g_paste_keybinder_filter, priv); #if defined(ENABLE_X_KEYBINDER) && defined (GDK_WINDOWING_X11) /* Initialize */ GdkDisplay *display = gdk_display_get_default (); if (GDK_IS_X11_DISPLAY (display)) g_paste_keybinder_get_xinput_opcode (GDK_DISPLAY_XDISPLAY (display)); #endif } /** * g_paste_keybinder_new: * @settings: a #GPasteSettings instance * @shell_client: a #GPasteGnomeShellClient instance * * Create a new instance of #GPasteKeybinder * * Returns: a newly allocated #GPasteKeybinder * free it with g_object_unref */ G_PASTE_VISIBLE GPasteKeybinder * g_paste_keybinder_new (GPasteSettings *settings, GPasteGnomeShellClient *shell_client) { g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); g_return_val_if_fail (!shell_client || _G_PASTE_IS_GNOME_SHELL_CLIENT (shell_client), NULL); GPasteKeybinder *self = G_PASTE_KEYBINDER (g_object_new (G_PASTE_TYPE_KEYBINDER, NULL)); GPasteKeybinderPrivate *priv = g_paste_keybinder_get_instance_private (self); priv->settings = g_object_ref (settings); priv->shell_client = shell_client = (shell_client) ? g_object_ref (shell_client) : NULL; priv->grabbing = FALSE; priv->retries = 0; if (shell_client) { priv->c_signals[C_ACCEL] = g_signal_connect (shell_client, "accelerator-activated", G_CALLBACK (on_accelerator_activated), priv); priv->shell_watch = g_bus_watch_name (G_BUS_TYPE_SESSION, G_PASTE_GNOME_SHELL_BUS_NAME, G_BUS_NAME_WATCHER_FLAGS_NONE, on_shell_appeared, on_shell_vanished, priv, NULL); } else priv->shell_watch = 0; return self; } gpaste-3.42.6/src/libgpaste/keybinder/gpaste-keybinder.h000066400000000000000000000017351421222064600232210ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_KEYBINDER_H__ #define __G_PASTE_KEYBINDER_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_KEYBINDER (g_paste_keybinder_get_type ()) G_PASTE_FINAL_TYPE (Keybinder, keybinder, KEYBINDER, GObject) void g_paste_keybinder_add_keybinding (GPasteKeybinder *self, GPasteKeybinding *binding); void g_paste_keybinder_activate_all (GPasteKeybinder *self); void g_paste_keybinder_deactivate_all (GPasteKeybinder *self); GPasteKeybinder *g_paste_keybinder_new (GPasteSettings *settings, GPasteGnomeShellClient *shell_client); G_END_DECLS #endif /*__G_PASTE_KEYBINDER_H__*/ gpaste-3.42.6/src/libgpaste/keybinder/gpaste-keybinding.c000066400000000000000000000177221421222064600233660ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include typedef struct _GPasteKeybindingPrivate { GPasteKeybindingGetter getter; gchar *dconf_key; GPasteKeybindingFunc callback; gpointer user_data; gboolean active; GdkModifierType modifiers; guint32 *keycodes; } GPasteKeybindingPrivate; G_PASTE_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (Keybinding, keybinding, G_TYPE_OBJECT) /** * g_paste_keybinding_get_modifiers: * @self: a #GPasteKeybinding instance * * Get the modifiers for this keybinding * * Returns: the modifiers */ G_PASTE_VISIBLE GdkModifierType g_paste_keybinding_get_modifiers (const GPasteKeybinding *self) { g_return_val_if_fail (_G_PASTE_IS_KEYBINDING (self), 0); const GPasteKeybindingPrivate *priv = _g_paste_keybinding_get_instance_private (self); return priv->modifiers; } /** * g_paste_keybinding_get_keycodes: * @self: a #GPasteKeybinding instance * * Get the keycodes for this keybinding * * Returns: the keycodes */ G_PASTE_VISIBLE const guint32 * g_paste_keybinding_get_keycodes (const GPasteKeybinding *self) { g_return_val_if_fail (_G_PASTE_IS_KEYBINDING (self), NULL); const GPasteKeybindingPrivate *priv = _g_paste_keybinding_get_instance_private (self); return priv->keycodes; } /** * g_paste_keybinding_get_dconf_key: * @self: a #GPasteKeybinding instance * * Get the dconf key for this keybinding * * Returns: the dconf key */ G_PASTE_VISIBLE const gchar * g_paste_keybinding_get_dconf_key (const GPasteKeybinding *self) { g_return_val_if_fail (_G_PASTE_IS_KEYBINDING ((gpointer) self), NULL); const GPasteKeybindingPrivate *priv = _g_paste_keybinding_get_instance_private (self); return priv->dconf_key; } /** * g_paste_keybinding_get_accelerator: * @self: a #GPasteKeybinding instance * * Get the accelerator for this keybinding * * Returns: the accelerator */ G_PASTE_VISIBLE const gchar * g_paste_keybinding_get_accelerator (const GPasteKeybinding *self, const GPasteSettings *settings) { g_return_val_if_fail (_G_PASTE_IS_KEYBINDING ((gpointer) self), NULL); g_return_val_if_fail (_G_PASTE_IS_SETTINGS ((gpointer) settings), NULL); const GPasteKeybindingPrivate *priv = _g_paste_keybinding_get_instance_private (self); return priv->getter (settings); } /** * g_paste_keybinding_activate: * @self: a #GPasteKeybinding instance * @settings: a #GPasteSettings instance * * Activate the keybinding */ G_PASTE_VISIBLE void g_paste_keybinding_activate (GPasteKeybinding *self, GPasteSettings *settings) { g_return_if_fail (_G_PASTE_IS_KEYBINDING (self)); g_return_if_fail (_G_PASTE_IS_SETTINGS (settings)); GPasteKeybindingPrivate *priv = g_paste_keybinding_get_instance_private (self); g_return_if_fail (!priv->active); const gchar *binding = priv->getter (settings); if (binding) { gtk_accelerator_parse_with_keycode (binding, NULL, &priv->keycodes, &priv->modifiers); priv->active = priv->keycodes != NULL; } } /** * g_paste_keybinding_deactivate: * @self: a #GPasteKeybinding instance * * Deactivate the keybinding */ G_PASTE_VISIBLE void g_paste_keybinding_deactivate (GPasteKeybinding *self) { g_return_if_fail (_G_PASTE_IS_KEYBINDING (self)); GPasteKeybindingPrivate *priv = g_paste_keybinding_get_instance_private (self); g_return_if_fail (priv->active); priv->active = FALSE; } /** * g_paste_keybinding_is_active: * @self: a #GPasteKeybinding instance * * Check whether the keybinding is active or not * * Returns: true if the keybinding is active */ G_PASTE_VISIBLE gboolean g_paste_keybinding_is_active (GPasteKeybinding *self) { g_return_val_if_fail (_G_PASTE_IS_KEYBINDING (self), FALSE); const GPasteKeybindingPrivate *priv = _g_paste_keybinding_get_instance_private (self); return priv->active; } static gboolean g_paste_keybinding_private_match (const GPasteKeybindingPrivate *priv, GdkModifierType modifiers, guint64 keycode) { if (priv->keycodes && priv->modifiers == (priv->modifiers & modifiers)) { for (guint32 *_keycode = priv->keycodes; *_keycode; ++_keycode) { if (keycode == *_keycode) return TRUE; } } return FALSE; } /** * g_paste_keybinding_notify: * @self: a #GPasteKeybinding instance * @modifiers: The modifiers of the current event * @keycode: the keycode of the current event * * Runs the callback associated to the keybinding if needed */ G_PASTE_VISIBLE void g_paste_keybinding_notify (GPasteKeybinding *self, GdkModifierType modifiers, guint64 keycode) { g_return_if_fail (_G_PASTE_IS_KEYBINDING (self)); const GPasteKeybindingPrivate *priv = _g_paste_keybinding_get_instance_private (self); if (keycode && g_paste_keybinding_private_match (priv, modifiers, keycode)) priv->callback (self, priv->user_data); } /** * g_paste_keybinding_perform: * @self: a #GPasteKeybinding instance * * Runs the callback associated to the keybinding */ G_PASTE_VISIBLE void g_paste_keybinding_perform (GPasteKeybinding *self) { g_return_if_fail (_G_PASTE_IS_KEYBINDING (self)); const GPasteKeybindingPrivate *priv = _g_paste_keybinding_get_instance_private (self); priv->callback (self, priv->user_data); } static void g_paste_keybinding_dispose (GObject *object) { GPasteKeybinding *self = G_PASTE_KEYBINDING (object); const GPasteKeybindingPrivate *priv = _g_paste_keybinding_get_instance_private (self); if (priv->active) g_paste_keybinding_deactivate (self); G_OBJECT_CLASS (g_paste_keybinding_parent_class)->dispose (object); } static void g_paste_keybinding_finalize (GObject *object) { const GPasteKeybindingPrivate *priv = _g_paste_keybinding_get_instance_private (G_PASTE_KEYBINDING (object)); g_free (priv->keycodes); g_free (priv->dconf_key); G_OBJECT_CLASS (g_paste_keybinding_parent_class)->finalize (object); } static void g_paste_keybinding_class_init (GPasteKeybindingClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = g_paste_keybinding_dispose; object_class->finalize = g_paste_keybinding_finalize; } static void g_paste_keybinding_init (GPasteKeybinding *self) { GPasteKeybindingPrivate *priv = g_paste_keybinding_get_instance_private (self); priv->active = FALSE; } /** * g_paste_keybinding_new: * @type: the type of the subclass to instantiate * @dconf_key: the dconf key to watch * @getter: (scope notified): the getter to use to get the binding * @callback: (closure user_data) (scope notified): the callback to call when activated * @user_data: (closure): the data to pass to @callback, defaults to self/this * * Create a new instance of #GPasteKeybinding * * Returns: a newly allocated #GPasteKeybinding * free it with g_object_unref */ G_PASTE_VISIBLE GPasteKeybinding * g_paste_keybinding_new (GType type, const gchar *dconf_key, GPasteKeybindingGetter getter, GPasteKeybindingFunc callback, gpointer user_data) { g_return_val_if_fail (g_type_is_a (type, G_PASTE_TYPE_KEYBINDING), NULL); g_return_val_if_fail (dconf_key, NULL); g_return_val_if_fail (getter, NULL); g_return_val_if_fail (callback, NULL); GPasteKeybinding *self = g_object_new (type, NULL); GPasteKeybindingPrivate *priv = g_paste_keybinding_get_instance_private (self); priv->getter = getter; priv->dconf_key = g_strdup (dconf_key); priv->callback = callback; priv->user_data = user_data; priv->keycodes = NULL; return self; } gpaste-3.42.6/src/libgpaste/keybinder/gpaste-keybinding.h000066400000000000000000000043031421222064600233620ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_KEYBINDING_H__ #define __G_PASTE_KEYBINDING_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_KEYBINDING (g_paste_keybinding_get_type ()) G_PASTE_DERIVABLE_TYPE (Keybinding, keybinding, KEYBINDING, GObject) struct _GPasteKeybindingClass { GObjectClass parent_class; }; typedef const gchar *(*GPasteKeybindingGetter) (const GPasteSettings *settings); typedef void (*GPasteKeybindingFunc) (GPasteKeybinding *self, gpointer data); const guint32 *g_paste_keybinding_get_keycodes (const GPasteKeybinding *self); GdkModifierType g_paste_keybinding_get_modifiers (const GPasteKeybinding *self); const gchar *g_paste_keybinding_get_dconf_key (const GPasteKeybinding *self); const gchar *g_paste_keybinding_get_accelerator (const GPasteKeybinding *self, const GPasteSettings *settings); void g_paste_keybinding_activate (GPasteKeybinding *self, GPasteSettings *settings); void g_paste_keybinding_deactivate (GPasteKeybinding *self); gboolean g_paste_keybinding_is_active (GPasteKeybinding *self); void g_paste_keybinding_perform (GPasteKeybinding *self); void g_paste_keybinding_notify (GPasteKeybinding *self, GdkModifierType modifiers, guint64 keycode); GPasteKeybinding *g_paste_keybinding_new (GType type, const gchar *dconf_key, GPasteKeybindingGetter getter, GPasteKeybindingFunc callback, gpointer user_data); G_END_DECLS #endif /*__G_PASTE_KEYBINDING_H__*/ gpaste-3.42.6/src/libgpaste/keybinder/gpaste-make-password-keybinding.c000066400000000000000000000032251421222064600261320ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include struct _GPasteMakePasswordKeybinding { GPasteKeybinding parent_instance; }; G_PASTE_DEFINE_TYPE (MakePasswordKeybinding, make_password_keybinding, G_PASTE_TYPE_KEYBINDING) static void g_paste_make_password_keybinding_class_init (GPasteMakePasswordKeybindingClass *klass G_GNUC_UNUSED) { } static void g_paste_make_password_keybinding_init (GPasteMakePasswordKeybinding *self G_GNUC_UNUSED) { } static void g_paste_make_password_keybinding_make_password (GPasteKeybinding *self G_GNUC_UNUSED, gpointer data) { GPasteHistory *history = data; const GPasteItem *first = g_paste_history_get (history, 0); if (!first) return; g_paste_history_set_password (history, g_paste_item_get_uuid (first), NULL); } /** * g_paste_make_password_keybinding_new: * @history: a #GPasteHistory instance * * Create a new instance of #GPasteMakePasswordKeybinding * * Returns: a newly allocated #GPasteMakePasswordKeybinding * free it with g_object_unref */ G_PASTE_VISIBLE GPasteKeybinding * g_paste_make_password_keybinding_new (GPasteHistory *history) { return g_paste_keybinding_new (G_PASTE_TYPE_MAKE_PASSWORD_KEYBINDING, G_PASTE_MAKE_PASSWORD_SETTING, g_paste_settings_get_make_password, g_paste_make_password_keybinding_make_password, history); } gpaste-3.42.6/src/libgpaste/keybinder/gpaste-make-password-keybinding.h000066400000000000000000000014061421222064600261360ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_MAKE_PASSWORD_KEYBINDING_H__ #define __G_PASTE_MAKE_PASSWORD_KEYBINDING_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_MAKE_PASSWORD_KEYBINDING (g_paste_make_password_keybinding_get_type ()) G_PASTE_FINAL_TYPE (MakePasswordKeybinding, make_password_keybinding, MAKE_PASSWORD_KEYBINDING, GPasteKeybinding) GPasteKeybinding *g_paste_make_password_keybinding_new (GPasteHistory *history); G_END_DECLS #endif /*__G_PASTE_MAKE_PASSWORD_KEYBINDING_H__*/ gpaste-3.42.6/src/libgpaste/keybinder/gpaste-pop-keybinding.c000066400000000000000000000041401421222064600241500ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include struct _GPastePopKeybinding { GPasteKeybinding parent_instance; }; typedef struct { GPasteHistory *history; } GPastePopKeybindingPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (PopKeybinding, pop_keybinding, G_PASTE_TYPE_KEYBINDING) static void g_paste_pop_keybinding_dispose (GObject *object) { GPastePopKeybindingPrivate *priv = g_paste_pop_keybinding_get_instance_private (G_PASTE_POP_KEYBINDING (object)); g_clear_object (&priv->history); G_OBJECT_CLASS (g_paste_pop_keybinding_parent_class)->dispose (object); } static void g_paste_pop_keybinding_class_init (GPastePopKeybindingClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_pop_keybinding_dispose; } static void g_paste_pop_keybinding_init (GPastePopKeybinding *self G_GNUC_UNUSED) { } static void pop (GPasteKeybinding *self, gpointer data G_GNUC_UNUSED) { const GPastePopKeybindingPrivate *priv = _g_paste_pop_keybinding_get_instance_private (G_PASTE_POP_KEYBINDING (self)); g_paste_history_remove (priv->history, 0); } /** * g_paste_pop_keybinding_new: * @history: a #GPasteHistory instance * * Create a new instance of #GPastePopKeybinding * * Returns: a newly allocated #GPastePopKeybinding * free it with g_object_unref */ G_PASTE_VISIBLE GPasteKeybinding * g_paste_pop_keybinding_new (GPasteHistory *history) { g_return_val_if_fail (_G_PASTE_IS_HISTORY (history), NULL); GPasteKeybinding *self = g_paste_keybinding_new (G_PASTE_TYPE_POP_KEYBINDING, G_PASTE_POP_SETTING, g_paste_settings_get_pop, pop, NULL); GPastePopKeybindingPrivate *priv = g_paste_pop_keybinding_get_instance_private (G_PASTE_POP_KEYBINDING (self)); priv->history = g_object_ref (history); return self; } gpaste-3.42.6/src/libgpaste/keybinder/gpaste-pop-keybinding.h000066400000000000000000000012551421222064600241610ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_POP_KEYBINDING_H__ #define __G_PASTE_POP_KEYBINDING_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_POP_KEYBINDING (g_paste_pop_keybinding_get_type ()) G_PASTE_FINAL_TYPE (PopKeybinding, pop_keybinding, POP_KEYBINDING, GPasteKeybinding) GPasteKeybinding *g_paste_pop_keybinding_new (GPasteHistory *history); G_END_DECLS #endif /*__G_PASTE_POP_KEYBINDING_H__*/ gpaste-3.42.6/src/libgpaste/keybinder/gpaste-show-history-keybinding.c000066400000000000000000000031071421222064600260330ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include struct _GPasteShowHistoryKeybinding { GPasteKeybinding parent_instance; }; G_PASTE_DEFINE_TYPE (ShowHistoryKeybinding, show_history_keybinding, G_PASTE_TYPE_KEYBINDING) static void g_paste_show_history_keybinding_class_init (GPasteShowHistoryKeybindingClass *klass G_GNUC_UNUSED) { } static void g_paste_show_history_keybinding_init (GPasteShowHistoryKeybinding *self G_GNUC_UNUSED) { } static void g_paste_show_history_keybinding_show_history (GPasteKeybinding *self G_GNUC_UNUSED, gpointer data) { GPasteDaemon *gpaste_daemon = data; g_paste_daemon_show_history (gpaste_daemon, NULL); /* error */ } /** * g_paste_show_history_keybinding_new: * @gpaste_daemon: a #GPasteDaemon instance * * Create a new instance of #GPasteShowHistoryKeybinding * * Returns: a newly allocated #GPasteShowHistoryKeybinding * free it with g_object_unref */ G_PASTE_VISIBLE GPasteKeybinding * g_paste_show_history_keybinding_new (GPasteDaemon *gpaste_daemon) { return g_paste_keybinding_new (G_PASTE_TYPE_SHOW_HISTORY_KEYBINDING, G_PASTE_SHOW_HISTORY_SETTING, g_paste_settings_get_show_history, g_paste_show_history_keybinding_show_history, gpaste_daemon); } gpaste-3.42.6/src/libgpaste/keybinder/gpaste-show-history-keybinding.h000066400000000000000000000014011421222064600260330ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SHOW_HISTORY_KEYBINDING_H__ #define __G_PASTE_SHOW_HISTORY_KEYBINDING_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_SHOW_HISTORY_KEYBINDING (g_paste_show_history_keybinding_get_type ()) G_PASTE_FINAL_TYPE (ShowHistoryKeybinding, show_history_keybinding, SHOW_HISTORY_KEYBINDING, GPasteKeybinding) GPasteKeybinding *g_paste_show_history_keybinding_new (GPasteDaemon *gpaste_daemon); G_END_DECLS #endif /*__G_PASTE_SHOW_HISTORY_KEYBINDING_H__*/ gpaste-3.42.6/src/libgpaste/keybinder/gpaste-sync-clipboard-to-primary-keybinding.c000066400000000000000000000033321421222064600303660ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include struct _GPasteSyncClipboardToPrimaryKeybinding { GPasteKeybinding parent_instance; }; G_PASTE_DEFINE_TYPE (SyncClipboardToPrimaryKeybinding, sync_clipboard_to_primary_keybinding, G_PASTE_TYPE_KEYBINDING) static void g_paste_sync_clipboard_to_primary_keybinding_class_init (GPasteSyncClipboardToPrimaryKeybindingClass *klass G_GNUC_UNUSED) { } static void g_paste_sync_clipboard_to_primary_keybinding_init (GPasteSyncClipboardToPrimaryKeybinding *self G_GNUC_UNUSED) { } static void g_paste_sync_clipboard_to_primary_keybinding_sync (GPasteKeybinding *self G_GNUC_UNUSED, gpointer data) { GPasteClipboardsManager *gcm = data; g_paste_clipboards_manager_sync_from_to (gcm, TRUE); } /** * g_paste_sync_clipboard_to_primary_keybinding_new: * @gcm: a #GPasteClipboardManager instance * * Create a new instance of #GPasteSyncClipboardToPrimaryKeybinding * * Returns: a newly allocated #GPasteSyncClipboardToPrimaryKeybinding * free it with g_object_unref */ G_PASTE_VISIBLE GPasteKeybinding * g_paste_sync_clipboard_to_primary_keybinding_new (GPasteClipboardsManager *gcm) { return g_paste_keybinding_new (G_PASTE_TYPE_SYNC_CLIPBOARD_TO_PRIMARY_KEYBINDING, G_PASTE_SYNC_CLIPBOARD_TO_PRIMARY_SETTING, g_paste_settings_get_sync_clipboard_to_primary, g_paste_sync_clipboard_to_primary_keybinding_sync, gcm); } gpaste-3.42.6/src/libgpaste/keybinder/gpaste-sync-clipboard-to-primary-keybinding.h000066400000000000000000000016011421222064600303700ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SYNC_CLIPBOARD_TO_PRIMARY_KEYBINDING_H__ #define __G_PASTE_SYNC_CLIPBOARD_TO_PRIMARY_KEYBINDING_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_SYNC_CLIPBOARD_TO_PRIMARY_KEYBINDING (g_paste_sync_clipboard_to_primary_keybinding_get_type ()) G_PASTE_FINAL_TYPE (SyncClipboardToPrimaryKeybinding, sync_clipboard_to_primary_keybinding, SYNC_CLIPBOARD_TO_PRIMARY_KEYBINDING, GPasteKeybinding) GPasteKeybinding *g_paste_sync_clipboard_to_primary_keybinding_new (GPasteClipboardsManager *gcm); G_END_DECLS #endif /*__G_PASTE_SYNC_CLIPBOARD_TO_PRIMARY_KEYBINDING_H__*/ gpaste-3.42.6/src/libgpaste/keybinder/gpaste-sync-primary-to-clipboard-keybinding.c000066400000000000000000000033331421222064600303670ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include struct _GPasteSyncPrimaryToClipboardKeybinding { GPasteKeybinding parent_instance; }; G_PASTE_DEFINE_TYPE (SyncPrimaryToClipboardKeybinding, sync_primary_to_clipboard_keybinding, G_PASTE_TYPE_KEYBINDING) static void g_paste_sync_primary_to_clipboard_keybinding_class_init (GPasteSyncPrimaryToClipboardKeybindingClass *klass G_GNUC_UNUSED) { } static void g_paste_sync_primary_to_clipboard_keybinding_init (GPasteSyncPrimaryToClipboardKeybinding *self G_GNUC_UNUSED) { } static void g_paste_sync_primary_to_clipboard_keybinding_sync (GPasteKeybinding *self G_GNUC_UNUSED, gpointer data) { GPasteClipboardsManager *gcm = data; g_paste_clipboards_manager_sync_from_to (gcm, FALSE); } /** * g_paste_sync_primary_to_clipboard_keybinding_new: * @gcm: a #GPasteClipboardManager instance * * Create a new instance of #GPasteSyncPrimaryToClipboardKeybinding * * Returns: a newly allocated #GPasteSyncPrimaryToClipboardKeybinding * free it with g_object_unref */ G_PASTE_VISIBLE GPasteKeybinding * g_paste_sync_primary_to_clipboard_keybinding_new (GPasteClipboardsManager *gcm) { return g_paste_keybinding_new (G_PASTE_TYPE_SYNC_PRIMARY_TO_CLIPBOARD_KEYBINDING, G_PASTE_SYNC_PRIMARY_TO_CLIPBOARD_SETTING, g_paste_settings_get_sync_primary_to_clipboard, g_paste_sync_primary_to_clipboard_keybinding_sync, gcm); } gpaste-3.42.6/src/libgpaste/keybinder/gpaste-sync-primary-to-clipboard-keybinding.h000066400000000000000000000016011421222064600303700ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SYNC_PRIMARY_TO_CLIPBOARD_KEYBINDING_H__ #define __G_PASTE_SYNC_PRIMARY_TO_CLIPBOARD_KEYBINDING_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_SYNC_PRIMARY_TO_CLIPBOARD_KEYBINDING (g_paste_sync_primary_to_clipboard_keybinding_get_type ()) G_PASTE_FINAL_TYPE (SyncPrimaryToClipboardKeybinding, sync_primary_to_clipboard_keybinding, SYNC_PRIMARY_TO_CLIPBOARD_KEYBINDING, GPasteKeybinding) GPasteKeybinding *g_paste_sync_primary_to_clipboard_keybinding_new (GPasteClipboardsManager *gcm); G_END_DECLS #endif /*__G_PASTE_SYNC_PRIMARY_TO_CLIPBOARD_KEYBINDING_H__*/ gpaste-3.42.6/src/libgpaste/keybinder/gpaste-ui-keybinding.c000066400000000000000000000023111421222064600237650ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include struct _GPasteUiKeybinding { GPasteKeybinding parent_instance; }; G_PASTE_DEFINE_TYPE (UiKeybinding, ui_keybinding, G_PASTE_TYPE_KEYBINDING) static void g_paste_ui_keybinding_class_init (GPasteUiKeybindingClass *klass G_GNUC_UNUSED) { } static void g_paste_ui_keybinding_init (GPasteUiKeybinding *self G_GNUC_UNUSED) { } static void launch_ui (GPasteKeybinding *self G_GNUC_UNUSED, gpointer data G_GNUC_UNUSED) { g_paste_util_spawn ("Ui"); } /** * g_paste_ui_keybinding_new: * * Create a new instance of #GPasteUiKeybinding * * Returns: a newly allocated #GPasteUiKeybinding * free it with g_object_unref */ G_PASTE_VISIBLE GPasteKeybinding * g_paste_ui_keybinding_new (void) { return g_paste_keybinding_new (G_PASTE_TYPE_UI_KEYBINDING, G_PASTE_LAUNCH_UI_SETTING, g_paste_settings_get_launch_ui, launch_ui, NULL); } gpaste-3.42.6/src/libgpaste/keybinder/gpaste-ui-keybinding.h000066400000000000000000000011661421222064600240010ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_KEYBINDING_H__ #define __G_PASTE_UI_KEYBINDING_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_KEYBINDING (g_paste_ui_keybinding_get_type ()) G_PASTE_FINAL_TYPE (UiKeybinding, ui_keybinding, UI_KEYBINDING, GPasteKeybinding) GPasteKeybinding *g_paste_ui_keybinding_new (void); G_END_DECLS #endif /*__G_PASTE_UI_KEYBINDING_H__*/ gpaste-3.42.6/src/libgpaste/keybinder/gpaste-upload-keybinding.c000066400000000000000000000042631421222064600246440ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include struct _GPasteUploadKeybinding { GPasteKeybinding parent_instance; }; typedef struct { GPasteDaemon *daemon; } GPasteUploadKeybindingPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UploadKeybinding, upload_keybinding, G_PASTE_TYPE_KEYBINDING) static void g_paste_upload_keybinding_dispose (GObject *object) { GPasteUploadKeybindingPrivate *priv = g_paste_upload_keybinding_get_instance_private (G_PASTE_UPLOAD_KEYBINDING (object)); g_clear_object (&priv->daemon); G_OBJECT_CLASS (g_paste_upload_keybinding_parent_class)->dispose (object); } static void g_paste_upload_keybinding_class_init (GPasteUploadKeybindingClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_upload_keybinding_dispose; } static void g_paste_upload_keybinding_init (GPasteUploadKeybinding *self G_GNUC_UNUSED) { } static void upload (GPasteKeybinding *self, gpointer data G_GNUC_UNUSED) { const GPasteUploadKeybindingPrivate *priv = _g_paste_upload_keybinding_get_instance_private (G_PASTE_UPLOAD_KEYBINDING (self)); g_paste_daemon_upload (priv->daemon, NULL); } /** * g_paste_upload_keybinding_new: * @daemon: a #GPasteDaemon instance * * Create a new instance of #GPasteUploadKeybinding * * Returns: a newly allocated #GPasteUploadKeybinding * free it with g_object_unref */ G_PASTE_VISIBLE GPasteKeybinding * g_paste_upload_keybinding_new (GPasteDaemon *daemon) { g_return_val_if_fail (_G_PASTE_IS_DAEMON (daemon), NULL); GPasteKeybinding *self = g_paste_keybinding_new (G_PASTE_TYPE_UPLOAD_KEYBINDING, G_PASTE_UPLOAD_SETTING, g_paste_settings_get_upload, upload, NULL); GPasteUploadKeybindingPrivate *priv = g_paste_upload_keybinding_get_instance_private (G_PASTE_UPLOAD_KEYBINDING (self)); priv->daemon = g_object_ref (daemon); return self; } gpaste-3.42.6/src/libgpaste/keybinder/gpaste-upload-keybinding.h000066400000000000000000000013051421222064600246430ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UPLOAD_KEYBINDING_H__ #define __G_PASTE_UPLOAD_KEYBINDING_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_UPLOAD_KEYBINDING (g_paste_upload_keybinding_get_type ()) G_PASTE_FINAL_TYPE (UploadKeybinding, upload_keybinding, UPLOAD_KEYBINDING, GPasteKeybinding) GPasteKeybinding *g_paste_upload_keybinding_new (GPasteDaemon *daemon); G_END_DECLS #endif /*__G_PASTE_UPLOAD_KEYBINDING_H__*/ gpaste-3.42.6/src/libgpaste/libgpaste.sym000066400000000000000000000324551421222064600203460ustar00rootroot00000000000000LIBGPASTE_3_38_0 { global: g_paste_bus_get_connection; g_paste_bus_get_type; g_paste_bus_new; g_paste_bus_object_get_type; g_paste_bus_object_new; g_paste_bus_object_register_on_connection; g_paste_bus_own_name; g_paste_client_about; g_paste_client_about_finish; g_paste_client_about_sync; g_paste_client_add; g_paste_client_add_file; g_paste_client_add_file_finish; g_paste_client_add_file_sync; g_paste_client_add_finish; g_paste_client_add_password; g_paste_client_add_password_finish; g_paste_client_add_password_sync; g_paste_client_add_sync; g_paste_client_backup_history; g_paste_client_backup_history_finish; g_paste_client_backup_history_sync; g_paste_client_delete; g_paste_client_delete_finish; g_paste_client_delete_history; g_paste_client_delete_history_finish; g_paste_client_delete_history_sync; g_paste_client_delete_password; g_paste_client_delete_password_finish; g_paste_client_delete_password_sync; g_paste_client_delete_sync; g_paste_client_empty_history; g_paste_client_empty_history_finish; g_paste_client_empty_history_sync; g_paste_client_get_element; g_paste_client_get_element_at_index; g_paste_client_get_element_at_index_finish; g_paste_client_get_element_at_index_sync; g_paste_client_get_element_finish; g_paste_client_get_element_kind; g_paste_client_get_element_kind_finish; g_paste_client_get_element_kind_sync; g_paste_client_get_element_sync; g_paste_client_get_elements; g_paste_client_get_elements_finish; g_paste_client_get_elements_sync; g_paste_client_get_history; g_paste_client_get_history_finish; g_paste_client_get_history_name; g_paste_client_get_history_name_finish; g_paste_client_get_history_name_sync; g_paste_client_get_history_size; g_paste_client_get_history_size_finish; g_paste_client_get_history_size_sync; g_paste_client_get_history_sync; g_paste_client_get_raw_element; g_paste_client_get_raw_element_finish; g_paste_client_get_raw_element_sync; g_paste_client_get_raw_history; g_paste_client_get_raw_history_finish; g_paste_client_get_raw_history_sync; g_paste_client_get_type; g_paste_client_get_version; g_paste_client_is_active; g_paste_client_item_get_type; g_paste_client_item_get_uuid; g_paste_client_item_get_value; g_paste_client_item_new; g_paste_client_list_histories; g_paste_client_list_histories_finish; g_paste_client_list_histories_sync; g_paste_client_merge; g_paste_client_merge_finish; g_paste_client_merge_sync; g_paste_client_new; g_paste_client_new_finish; g_paste_client_new_sync; g_paste_client_on_extension_state_changed; g_paste_client_on_extension_state_changed_finish; g_paste_client_on_extension_state_changed_sync; g_paste_client_reexecute; g_paste_client_reexecute_finish; g_paste_client_reexecute_sync; g_paste_client_rename_password; g_paste_client_rename_password_finish; g_paste_client_rename_password_sync; g_paste_client_replace; g_paste_client_replace_finish; g_paste_client_replace_sync; g_paste_client_search; g_paste_client_search_finish; g_paste_client_search_sync; g_paste_client_select; g_paste_client_select_finish; g_paste_client_select_sync; g_paste_client_set_password; g_paste_client_set_password_finish; g_paste_client_set_password_sync; g_paste_client_show_history; g_paste_client_show_history_finish; g_paste_client_show_history_sync; g_paste_client_switch_history; g_paste_client_switch_history_finish; g_paste_client_switch_history_sync; g_paste_client_track; g_paste_client_track_finish; g_paste_client_track_sync; g_paste_client_upload; g_paste_client_upload_finish; g_paste_client_upload_sync; g_paste_clipboard_bootstrap; g_paste_clipboard_clear; g_paste_clipboard_ensure_not_empty; g_paste_clipboard_get_image_checksum; g_paste_clipboard_get_real; g_paste_clipboard_get_text; g_paste_clipboard_get_type; g_paste_clipboard_is_clipboard; g_paste_clipboard_new_clipboard; g_paste_clipboard_new_primary; g_paste_clipboard_select_item; g_paste_clipboard_select_text; g_paste_clipboard_set_image; g_paste_clipboard_set_text; g_paste_clipboard_store; g_paste_clipboard_sync_text; g_paste_clipboards_manager_activate; g_paste_clipboards_manager_add_clipboard; g_paste_clipboards_manager_get_type; g_paste_clipboards_manager_new; g_paste_clipboards_manager_select; g_paste_clipboards_manager_store; g_paste_clipboards_manager_sync_from_to; g_paste_daemon_get_type; g_paste_daemon_new; g_paste_daemon_show_history; g_paste_daemon_upload; g_paste_file_backend_get_type; g_paste_gnome_shell_client_get_type; g_paste_gnome_shell_client_grab_accelerator; g_paste_gnome_shell_client_grab_accelerator_finish; g_paste_gnome_shell_client_grab_accelerator_sync; g_paste_gnome_shell_client_grab_accelerators; g_paste_gnome_shell_client_grab_accelerators_finish; g_paste_gnome_shell_client_grab_accelerators_sync; g_paste_gnome_shell_client_new; g_paste_gnome_shell_client_new_finish; g_paste_gnome_shell_client_new_sync; g_paste_gnome_shell_client_ungrab_accelerator; g_paste_gnome_shell_client_ungrab_accelerator_finish; g_paste_gnome_shell_client_ungrab_accelerator_sync; g_paste_history_add; g_paste_history_delete; g_paste_history_delete_password; g_paste_history_dup; g_paste_history_empty; g_paste_history_get; g_paste_history_get_by_uuid; g_paste_history_get_current; g_paste_history_get_history; g_paste_history_get_length; g_paste_history_get_password; g_paste_history_get_type; g_paste_history_list; g_paste_history_load; g_paste_history_new; g_paste_history_refresh_item_size; g_paste_history_remove; g_paste_history_remove_by_uuid; g_paste_history_rename_password; g_paste_history_replace; g_paste_history_save; g_paste_history_search; g_paste_history_select; g_paste_history_set_password; g_paste_history_switch; g_paste_image_item_is_growing; g_paste_image_item_get_checksum; g_paste_image_item_get_date; g_paste_image_item_get_image; g_paste_image_item_get_type; g_paste_image_item_new; g_paste_image_item_new_from_file; g_paste_item_add_size; g_paste_item_add_special_value; g_paste_item_equals; g_paste_item_get_display_string; g_paste_item_get_kind; g_paste_item_get_real_value; g_paste_item_get_size; g_paste_item_get_special_value; g_paste_item_get_special_values; g_paste_item_get_type; g_paste_item_get_uuid; g_paste_item_get_value; g_paste_item_kind_get_type; g_paste_item_new; g_paste_item_remove_size; g_paste_item_set_display_string; g_paste_item_set_size; g_paste_item_set_uuid; g_paste_keybinder_activate_all; g_paste_keybinder_add_keybinding; g_paste_keybinder_deactivate_all; g_paste_keybinder_get_type; g_paste_keybinder_new; g_paste_keybinding_activate; g_paste_keybinding_deactivate; g_paste_keybinding_get_accelerator; g_paste_keybinding_get_dconf_key; g_paste_keybinding_get_keycodes; g_paste_keybinding_get_modifiers; g_paste_keybinding_get_type; g_paste_keybinding_is_active; g_paste_keybinding_new; g_paste_keybinding_notify; g_paste_keybinding_perform; g_paste_make_password_keybinding_get_type; g_paste_make_password_keybinding_new; g_paste_password_item_get_name; g_paste_password_item_get_type; g_paste_password_item_new; g_paste_password_item_set_name; g_paste_pop_keybinding_get_type; g_paste_pop_keybinding_new; g_paste_screensaver_client_get_type; g_paste_screensaver_client_new; g_paste_screensaver_client_new_finish; g_paste_screensaver_client_new_sync; g_paste_search_provider_get_type; g_paste_search_provider_new; g_paste_settings_get_close_on_select; g_paste_settings_get_element_size; g_paste_settings_get_empty_history_confirmation; g_paste_settings_get_extension_enabled; g_paste_settings_get_growing_lines; g_paste_settings_get_history_name; g_paste_settings_get_images_support; g_paste_settings_get_launch_ui; g_paste_settings_get_make_password; g_paste_settings_get_max_displayed_history_size; g_paste_settings_get_max_history_size; g_paste_settings_get_max_memory_usage; g_paste_settings_get_max_text_item_size; g_paste_settings_get_min_text_item_size; g_paste_settings_get_pop; g_paste_settings_get_primary_to_history; g_paste_settings_get_save_history; g_paste_settings_get_show_history; g_paste_settings_get_sync_clipboard_to_primary; g_paste_settings_get_sync_primary_to_clipboard; g_paste_settings_get_synchronize_clipboards; g_paste_settings_get_track_changes; g_paste_settings_get_track_extension_state; g_paste_settings_get_trim_items; g_paste_settings_get_type; g_paste_settings_get_upload; g_paste_settings_new; g_paste_settings_reset_close_on_select; g_paste_settings_reset_element_size; g_paste_settings_reset_empty_history_confirmation; g_paste_settings_reset_growing_lines; g_paste_settings_reset_history_name; g_paste_settings_reset_images_support; g_paste_settings_reset_make_password; g_paste_settings_reset_max_displayed_history_size; g_paste_settings_reset_max_history_size; g_paste_settings_reset_max_memory_usage; g_paste_settings_reset_max_text_item_size; g_paste_settings_reset_min_text_item_size; g_paste_settings_reset_pop; g_paste_settings_reset_primary_to_history; g_paste_settings_reset_save_history; g_paste_settings_reset_show_history; g_paste_settings_reset_sync_clipboard_to_primary; g_paste_settings_reset_sync_primary_to_clipboard; g_paste_settings_reset_synchronize_clipboards; g_paste_settings_reset_track_changes; g_paste_settings_reset_track_extension_state; g_paste_settings_reset_trim_items; g_paste_settings_set_close_on_select; g_paste_settings_set_element_size; g_paste_settings_set_empty_history_confirmation; g_paste_settings_set_extension_enabled; g_paste_settings_set_growing_lines; g_paste_settings_set_history_name; g_paste_settings_set_images_support; g_paste_settings_set_make_password; g_paste_settings_set_max_displayed_history_size; g_paste_settings_set_max_history_size; g_paste_settings_set_max_memory_usage; g_paste_settings_set_max_text_item_size; g_paste_settings_set_min_text_item_size; g_paste_settings_set_pop; g_paste_settings_set_primary_to_history; g_paste_settings_set_save_history; g_paste_settings_set_show_history; g_paste_settings_set_sync_clipboard_to_primary; g_paste_settings_set_sync_primary_to_clipboard; g_paste_settings_set_synchronize_clipboards; g_paste_settings_set_track_changes; g_paste_settings_set_track_extension_state; g_paste_settings_set_trim_items; g_paste_settings_ui_panel_add_boolean_setting; g_paste_settings_ui_panel_add_range_setting; g_paste_settings_ui_panel_add_separator; g_paste_settings_ui_panel_add_text_setting; g_paste_settings_ui_panel_get_type; g_paste_settings_ui_panel_new; g_paste_settings_ui_stack_add_panel; g_paste_settings_ui_stack_fill; g_paste_settings_ui_stack_get_type; g_paste_settings_ui_stack_new; g_paste_settings_ui_widget_get_stack; g_paste_settings_ui_widget_get_type; g_paste_settings_ui_widget_new; g_paste_show_history_keybinding_get_type; g_paste_show_history_keybinding_new; g_paste_special_atom_get; g_paste_special_atom_get_type; g_paste_storage_backend_get_type; g_paste_storage_backend_new; g_paste_storage_backend_read_history; g_paste_storage_backend_write_history; g_paste_sync_clipboard_to_primary_keybinding_get_type; g_paste_sync_clipboard_to_primary_keybinding_new; g_paste_sync_primary_to_clipboard_keybinding_get_type; g_paste_sync_primary_to_clipboard_keybinding_new; g_paste_text_item_get_type; g_paste_text_item_new; g_paste_ui_keybinding_get_type; g_paste_ui_keybinding_new; g_paste_update_action_get_type; g_paste_update_target_get_type; g_paste_upload_keybinding_get_type; g_paste_upload_keybinding_new; g_paste_uris_item_get_type; g_paste_uris_item_get_uris; g_paste_uris_item_new; g_paste_util_activate_ui; g_paste_util_activate_ui_sync; g_paste_util_compute_checksum; g_paste_util_confirm_dialog; g_paste_util_empty_history; g_paste_util_empty_with_confirmation; g_paste_util_empty_with_confirmation_sync; g_paste_util_ensure_history_dir_exists; g_paste_util_get_dbus_au_result; g_paste_util_get_dbus_item_result; g_paste_util_get_dbus_items_result; g_paste_util_get_history_dir; g_paste_util_get_history_dir_path; g_paste_util_get_history_file; g_paste_util_get_history_file_path; g_paste_util_has_gnome_shell; g_paste_util_read_pid_file; g_paste_util_replace; g_paste_util_show_win; g_paste_util_spawn; g_paste_util_spawn_sync; g_paste_util_write_pid_file; g_paste_util_xml_decode; g_paste_util_xml_encode; local: *; }; gpaste-3.42.6/src/libgpaste/meson.build000066400000000000000000000077231421222064600200040ustar00rootroot00000000000000libgpaste_sources = [ 'client/gpaste-client-item.c', 'client/gpaste-client.c', 'core/gpaste-clipboard.c', 'core/gpaste-clipboards-manager.c', 'core/gpaste-history.c', 'core/gpaste-image-item.c', 'core/gpaste-item-enums.c', 'core/gpaste-item.c', 'core/gpaste-password-item.c', 'core/gpaste-special-atom.c', 'core/gpaste-text-item.c', 'core/gpaste-update-enums.c', 'core/gpaste-uris-item.c', 'daemon/gpaste-bus-object.c', 'daemon/gpaste-bus.c', 'daemon/gpaste-daemon.c', 'daemon/gpaste-search-provider.c', 'gnome-shell-client/gpaste-gnome-shell-client.c', 'io/gpaste-file-backend.c', 'io/gpaste-storage-backend.c', 'keybinder/gpaste-keybinder.c', 'keybinder/gpaste-keybinding.c', 'keybinder/gpaste-make-password-keybinding.c', 'keybinder/gpaste-pop-keybinding.c', 'keybinder/gpaste-show-history-keybinding.c', 'keybinder/gpaste-sync-clipboard-to-primary-keybinding.c', 'keybinder/gpaste-sync-primary-to-clipboard-keybinding.c', 'keybinder/gpaste-ui-keybinding.c', 'keybinder/gpaste-upload-keybinding.c', 'screensaver-client/gpaste-screensaver-client.c', 'settings-ui/gpaste-settings-ui-panel.c', 'settings-ui/gpaste-settings-ui-stack.c', 'settings-ui/gpaste-settings-ui-widget.c', 'settings/gpaste-settings.c', 'util/gpaste-util.c', ] libgpaste_headers = [ 'client/gpaste-client-item.h', 'client/gpaste-client.h', 'core/gpaste-clipboard.h', 'core/gpaste-clipboards-manager.h', 'core/gpaste-history.h', 'core/gpaste-image-item.h', 'core/gpaste-item-enums.h', 'core/gpaste-item.h', 'core/gpaste-password-item.h', 'core/gpaste-special-atom.h', 'core/gpaste-text-item.h', 'core/gpaste-update-enums.h', 'core/gpaste-uris-item.h', 'daemon/gpaste-bus-object.h', 'daemon/gpaste-bus.h', 'daemon/gpaste-daemon.h', 'daemon/gpaste-search-provider.h', 'gnome-shell-client/gpaste-gnome-shell-client.h', 'gpaste-gdbus-defines.h', 'gpaste-gsettings-keys.h', 'gpaste-macros.h', 'gpaste.h', 'io/gpaste-file-backend.h', 'io/gpaste-storage-backend.h', 'keybinder/gpaste-keybinder.h', 'keybinder/gpaste-keybinding.h', 'keybinder/gpaste-make-password-keybinding.h', 'keybinder/gpaste-pop-keybinding.h', 'keybinder/gpaste-show-history-keybinding.h', 'keybinder/gpaste-sync-clipboard-to-primary-keybinding.h', 'keybinder/gpaste-sync-primary-to-clipboard-keybinding.h', 'keybinder/gpaste-ui-keybinding.h', 'keybinder/gpaste-upload-keybinding.h', 'screensaver-client/gpaste-screensaver-client.h', 'settings-ui/gpaste-settings-ui-panel.h', 'settings-ui/gpaste-settings-ui-stack.h', 'settings-ui/gpaste-settings-ui-widget.h', 'settings/gpaste-settings.h', 'util/gpaste-util.h', ] libgpaste_inc = include_directories( '.', 'client', 'core', 'daemon', 'gnome-shell-client', 'io', 'keybinder', 'screensaver-client', 'settings', 'settings-ui', 'util', ) libgpaste_symbols_file = meson.current_source_dir() / 'libgpaste.sym' libgpaste = library( 'gpaste', sources: libgpaste_sources, version: gpaste_soversion, dependencies: libgpaste_deps, install: true, install_dir: get_option('libdir'), include_directories : libgpaste_inc, link_args: ['-Wl,--version-script=' + libgpaste_symbols_file], ) libgpaste_internal_dep = declare_dependency( link_with: libgpaste, include_directories: libgpaste_inc, ) install_headers( libgpaste_headers, subdir: 'gpaste' ) if get_option('introspection') libgpaste_gir = gnome.generate_gir( libgpaste, sources: [ libgpaste_sources, libgpaste_headers ], includes: [ 'GdkPixbuf-2.0', 'Gio-2.0', 'GObject-2.0', 'Gtk-3.0' ], dependencies: [ libgpaste_deps, libgpaste_internal_dep ], header: 'gpaste.h', namespace: 'GPaste', nsversion: apiversion, install: true, extra_args: '--pkg-export=libgpaste', ) endif if get_option('vapi') gnome.generate_vapi( 'gpaste-' + apiversion, sources: libgpaste_gir[0], packages: [ 'gdk-pixbuf-2.0', 'gio-2.0', 'glib-2.0', 'gobject-2.0', 'gtk+-3.0' ], install: true, ) endif gpaste-3.42.6/src/libgpaste/screensaver-client/000077500000000000000000000000001421222064600214255ustar00rootroot00000000000000gpaste-3.42.6/src/libgpaste/screensaver-client/gpaste-screensaver-client.c000066400000000000000000000116221421222064600266500ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include "gpaste-gdbus-macros.h" #include #define G_PASTE_SCREENSAVER_OBJECT_PATH "/org/gnome/ScreenSaver" #define G_PASTE_SCREENSAVER_INTERFACE_NAME "org.gnome.ScreenSaver" #define G_PASTE_SCREENSAVER_SIG_ACTIVE_CHANGED "ActiveChanged" #define G_PASTE_SCREENSAVER_INTERFACE \ "" \ "" \ "" \ "" \ "" \ "" \ "" struct _GPasteScreensaverClient { GDBusProxy parent_instance; }; G_PASTE_DEFINE_TYPE (ScreensaverClient, screensaver_client, G_TYPE_DBUS_PROXY) enum { ACTIVE_CHANGED, LAST_SIGNAL }; static guint64 signals[LAST_SIGNAL] = { 0 }; static void g_paste_screensaver_client_g_signal (GDBusProxy *proxy, const gchar *sender_name G_GNUC_UNUSED, const gchar *signal_name, GVariant *parameters) { GPasteScreensaverClient *self = G_PASTE_SCREENSAVER_CLIENT (proxy); if (g_paste_str_equal (signal_name, G_PASTE_SCREENSAVER_SIG_ACTIVE_CHANGED)) { GVariantIter params_iter; g_variant_iter_init (¶ms_iter, parameters); g_autoptr (GVariant) value = g_variant_iter_next_value (¶ms_iter); g_signal_emit (self, signals[ACTIVE_CHANGED], 0, /* detail */ g_variant_get_boolean (value), NULL); } } static void g_paste_screensaver_client_class_init (GPasteScreensaverClientClass *klass G_GNUC_UNUSED) { G_DBUS_PROXY_CLASS (klass)->g_signal = g_paste_screensaver_client_g_signal; /** * GPasteScreensaverClient::active-changed: * @screensaver: the object on which the signal was emitted * @active: whether the screensaver is now active or not * * The "active-changed" signal is emitted when the screensaver appears or vanishes */ signals[ACTIVE_CHANGED] = g_signal_new ("active-changed", G_PASTE_TYPE_SCREENSAVER_CLIENT, G_SIGNAL_RUN_LAST, 0, /* class offset */ NULL, /* accumulator */ NULL, /* accumulator data */ g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); } static void g_paste_screensaver_client_init (GPasteScreensaverClient *self) { GDBusProxy *proxy = G_DBUS_PROXY (self); g_autoptr (GDBusNodeInfo) screensaver_dbus_info = g_dbus_node_info_new_for_xml (G_PASTE_SCREENSAVER_INTERFACE, NULL); /* Error */ g_dbus_proxy_set_interface_info (proxy, screensaver_dbus_info->interfaces[0]); } /** * g_paste_screensaver_client_new_sync: * @error: Return location for error or %NULL. * * Create a new instance of #GPasteScreensaverClient * * Returns: a newly allocated #GPasteScreensaverClient * free it with g_object_unref */ G_PASTE_VISIBLE GPasteScreensaverClient * g_paste_screensaver_client_new_sync (GError **error) { CUSTOM_PROXY_NEW (SCREENSAVER_CLIENT, SCREENSAVER, G_PASTE_SCREENSAVER_BUS_NAME); } /** * g_paste_screensaver_client_new: * @callback: Callback function to invoke when the proxy is ready. * @user_data: User data to pass to @callback. * * Create a new instance of #GPasteScreensaverClient */ G_PASTE_VISIBLE void g_paste_screensaver_client_new (GAsyncReadyCallback callback, gpointer user_data) { CUSTOM_PROXY_NEW_ASYNC (SCREENSAVER_CLIENT, SCREENSAVER, G_PASTE_SCREENSAVER_BUS_NAME); } /** * g_paste_screensaver_client_new_finsh: * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to the async ctor. * @error: Return location for error or %NULL. * * Create a new instance of #GPasteScreensaverClient * * Returns: a newly allocated #GPasteScreensaverClient * free it with g_object_unref */ G_PASTE_VISIBLE GPasteScreensaverClient * g_paste_screensaver_client_new_finish (GAsyncResult *result, GError **error) { CUSTOM_PROXY_NEW_FINISH (SCREENSAVER_CLIENT); } gpaste-3.42.6/src/libgpaste/screensaver-client/gpaste-screensaver-client.h000066400000000000000000000021451421222064600266550ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SCREENSAVER_CLIENT_H__ #define __G_PASTE_SCREENSAVER_CLIENT_H__ #include G_BEGIN_DECLS #define G_PASTE_SCREENSAVER_BUS_NAME "org.gnome.ScreenSaver" #define G_PASTE_TYPE_SCREENSAVER_CLIENT (g_paste_screensaver_client_get_type ()) G_PASTE_FINAL_TYPE (ScreensaverClient, screensaver_client, SCREENSAVER_CLIENT, GDBusProxy) GPasteScreensaverClient *g_paste_screensaver_client_new_sync (GError **error); void g_paste_screensaver_client_new (GAsyncReadyCallback callback, gpointer user_data); GPasteScreensaverClient *g_paste_screensaver_client_new_finish (GAsyncResult *result, GError **error); G_END_DECLS #endif /*__G_PASTE_SCREENSAVER_CLIENT_H__*/ gpaste-3.42.6/src/libgpaste/settings-ui/000077500000000000000000000000001421222064600201045ustar00rootroot00000000000000gpaste-3.42.6/src/libgpaste/settings-ui/gpaste-settings-ui-panel.c000066400000000000000000000266671421222064600251220ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include struct _GPasteSettingsUiPanel { GtkGrid parent_instance; }; typedef struct { GSList *callback_data; guint64 current_line; } GPasteSettingsUiPanelPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (SettingsUiPanel, settings_ui_panel, GTK_TYPE_GRID) #define CALLBACK_DATA(w) \ GPasteSettingsUiPanelPrivate *priv = g_paste_settings_ui_panel_get_instance_private (self); \ _CallbackDataWrapper *_data = (_CallbackDataWrapper *) g_malloc0 (sizeof (_CallbackDataWrapper)); \ CallbackDataWrapper *data = (CallbackDataWrapper *) _data; \ priv->callback_data = g_slist_prepend (priv->callback_data, _data); \ _data->widget = GTK_WIDGET (w); \ data->callback = G_CALLBACK (on_value_changed); \ data->reset_cb = on_reset; \ data->custom_data = user_data; #define G_PASTE_CALLBACK(cb_type) \ CallbackDataWrapper *data = (CallbackDataWrapper *) user_data; \ ((cb_type) data->callback) #define G_PASTE_RESET_CALLBACK() \ CallbackDataWrapper *data = (CallbackDataWrapper *) user_data; \ (data->reset_cb) typedef struct { GCallback callback; GPasteResetCallback reset_cb; gpointer custom_data; } CallbackDataWrapper; enum { C_W_ACTION, C_W_RESET, C_W_LAST_SIGNAL }; typedef struct { CallbackDataWrapper wrap; GtkWidget *widget; GtkWidget *reset_widget; guint64 c_signals[C_W_LAST_SIGNAL]; } _CallbackDataWrapper; static void boolean_wrapper (GObject *object, GParamSpec *pspec G_GNUC_UNUSED, gpointer user_data) { G_PASTE_CALLBACK (GPasteBooleanCallback) (gtk_switch_get_active (GTK_SWITCH (object)), data->custom_data); } static GtkLabel * g_paste_settings_ui_panel_add_label (GPasteSettingsUiPanel *self, const gchar *label) { GtkWidget *button_label = gtk_widget_new (GTK_TYPE_LABEL, "label", label, "xalign", 0.0, NULL); GPasteSettingsUiPanelPrivate *priv = g_paste_settings_ui_panel_get_instance_private (self); gtk_widget_set_hexpand (button_label, TRUE); gtk_grid_attach (GTK_GRID (self), button_label, 0, priv->current_line++, 1, 1); return GTK_LABEL (button_label); } static gboolean g_paste_settings_ui_panel_on_reset_pressed (GtkWidget *widget G_GNUC_UNUSED, GdkEventButton *event G_GNUC_UNUSED, gpointer user_data) { G_PASTE_RESET_CALLBACK () (data->custom_data); return FALSE; } static GtkWidget * g_paste_settings_ui_panel_make_reset_button (_CallbackDataWrapper *data) { data->reset_widget = gtk_button_new_from_icon_name ("edit-delete-symbolic", GTK_ICON_SIZE_BUTTON); data->c_signals[C_W_RESET] = g_signal_connect (data->reset_widget, "button-press-event", G_CALLBACK (g_paste_settings_ui_panel_on_reset_pressed), data); if (!((CallbackDataWrapper *) data)->reset_cb) gtk_widget_set_sensitive (data->reset_widget, FALSE); return data->reset_widget; } /** * g_paste_settings_ui_panel_add_boolean_setting: * @self: a #GPasteSettingsUiPanel instance * @label: the label to display * @value: the deafault value * @on_value_changed: (closure user_data) (scope notified): the callback to call when the value changes * @on_reset: (closure user_data) (scope notified): the callback to call when the value is reset * * Add a new boolean settings to the current pane * * Returns: (transfer none): the #GtkSwitch we just added */ G_PASTE_VISIBLE GtkSwitch * g_paste_settings_ui_panel_add_boolean_setting (GPasteSettingsUiPanel *self, const gchar *label, gboolean value, GPasteBooleanCallback on_value_changed, GPasteResetCallback on_reset, gpointer user_data) { GtkGrid *grid = GTK_GRID (self); GtkLabel *button_label = g_paste_settings_ui_panel_add_label (self, label); GtkWidget *widget = gtk_switch_new (); GtkSwitch *sw = GTK_SWITCH (widget); CALLBACK_DATA (widget); gtk_switch_set_active (sw, value); _data->c_signals[C_W_ACTION] = g_signal_connect (widget, "notify::active", G_CALLBACK (boolean_wrapper), data); gtk_grid_attach_next_to (grid, widget, GTK_WIDGET (button_label), GTK_POS_RIGHT, 1, 1); gtk_grid_attach_next_to (grid, g_paste_settings_ui_panel_make_reset_button (_data), widget, GTK_POS_RIGHT, 1, 1); return sw; } /** * g_paste_settings_ui_panel_add_separator: * @self: a #GPasteSettingsUiPanel instance * * Add a new separator to the current pane */ G_PASTE_VISIBLE void g_paste_settings_ui_panel_add_separator (GPasteSettingsUiPanel *self) { GPasteSettingsUiPanelPrivate *priv = g_paste_settings_ui_panel_get_instance_private (self); gtk_grid_attach (GTK_GRID (self), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL), 0, priv->current_line++, 3, 1); } static void range_wrapper (GtkSpinButton *spinbutton, gpointer user_data) { G_PASTE_CALLBACK (GPasteRangeCallback) (gtk_spin_button_get_value (spinbutton), data->custom_data); } /** * g_paste_settings_ui_panel_add_range_setting: * @self: a #GPasteSettingsUiPanel instance * @label: the label to display * @value: the deafault value * @min: the minimal authorized value * @max: the maximal authorized value * @step: the step between proposed values * @on_value_changed: (closure user_data) (scope notified): the callback to call when the value changes * @on_reset: (closure user_data) (scope notified): the callback to call when the value is reset * * Add a new boolean settings to the current pane * * Returns: (transfer none): the #GtkSpinButton we just added */ G_PASTE_VISIBLE GtkSpinButton * g_paste_settings_ui_panel_add_range_setting (GPasteSettingsUiPanel *self, const gchar *label, gdouble value, gdouble min, gdouble max, gdouble step, GPasteRangeCallback on_value_changed, GPasteResetCallback on_reset, gpointer user_data) { GtkGrid *grid = GTK_GRID (self); GtkLabel *button_label = g_paste_settings_ui_panel_add_label (self, label); GtkWidget *button = gtk_spin_button_new_with_range (min, max, step); GtkSpinButton *b = GTK_SPIN_BUTTON (button); CALLBACK_DATA (button); gtk_widget_set_hexpand (button, TRUE); gtk_spin_button_set_value (b, value); _data->c_signals[C_W_ACTION] = g_signal_connect (GTK_SPIN_BUTTON (button), "value-changed", G_CALLBACK (range_wrapper), data); gtk_grid_attach_next_to (grid, button, GTK_WIDGET (button_label), GTK_POS_RIGHT, 1, 1); gtk_grid_attach_next_to (grid, g_paste_settings_ui_panel_make_reset_button (_data), button, GTK_POS_RIGHT, 1, 1); return b; } static void text_wrapper (GtkEditable *editable, gpointer user_data) { G_PASTE_CALLBACK (GPasteTextCallback) (gtk_entry_get_text (GTK_ENTRY (editable)), data->custom_data); } /** * g_paste_settings_ui_panel_add_text_setting: * @self: a #GPasteSettingsUiPanel instance * @label: the label to display * @value: the deafault value * @on_value_changed: (closure user_data) (scope notified): the callback to call when the value changes * @on_reset: (closure user_data) (scope notified): the callback to call when the value is reset * * Add a new text settings to the current pane * * Returns: (transfer none): the #GtkEntry we just added */ G_PASTE_VISIBLE GtkEntry * g_paste_settings_ui_panel_add_text_setting (GPasteSettingsUiPanel *self, const gchar *label, const gchar *value, GPasteTextCallback on_value_changed, GPasteResetCallback on_reset, gpointer user_data) { GtkGrid *grid = GTK_GRID (self); GtkLabel *entry_label = g_paste_settings_ui_panel_add_label (self, label); GtkWidget *entry = gtk_entry_new (); GtkEntry *e = GTK_ENTRY (entry); CALLBACK_DATA (entry); gtk_widget_set_hexpand (entry, TRUE); gtk_entry_set_text (e, value); _data->c_signals[C_W_ACTION] = g_signal_connect (GTK_EDITABLE (entry), "changed", G_CALLBACK (text_wrapper), data); gtk_grid_attach_next_to (GTK_GRID (self), entry, GTK_WIDGET (entry_label), GTK_POS_RIGHT, 1, 1); if (on_reset) gtk_grid_attach_next_to (grid, g_paste_settings_ui_panel_make_reset_button (_data), entry, GTK_POS_RIGHT, 1, 1); return e; } static void clean_callback_data (gpointer data, gpointer user_data G_GNUC_UNUSED) { g_autofree _CallbackDataWrapper *wrap = data; g_signal_handler_disconnect (wrap->widget, wrap->c_signals[C_W_ACTION]); if (wrap->reset_widget) g_signal_handler_disconnect (wrap->reset_widget, wrap->c_signals[C_W_RESET]); } static void g_paste_settings_ui_panel_dispose (GObject *object) { GPasteSettingsUiPanelPrivate *priv = g_paste_settings_ui_panel_get_instance_private (G_PASTE_SETTINGS_UI_PANEL (object)); g_slist_foreach (priv->callback_data, clean_callback_data, NULL); g_slist_free (priv->callback_data); priv->callback_data = NULL; G_OBJECT_CLASS (g_paste_settings_ui_panel_parent_class)->dispose (object); } static void g_paste_settings_ui_panel_class_init (GPasteSettingsUiPanelClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_settings_ui_panel_dispose; } static void g_paste_settings_ui_panel_init (GPasteSettingsUiPanel *self) { GPasteSettingsUiPanelPrivate *priv = g_paste_settings_ui_panel_get_instance_private (self); priv->callback_data = NULL; priv->current_line = 0; GtkGrid *grid = GTK_GRID (self); gtk_grid_set_column_spacing (grid, 10); gtk_grid_set_row_spacing (grid, 10); } /** * g_paste_settings_ui_panel_new: * * Create a new instance of #GPasteSettingsUiPanel * * Returns: a newly allocated #GPasteSettingsUiPanel * free it with g_object_unref */ G_PASTE_VISIBLE GPasteSettingsUiPanel * g_paste_settings_ui_panel_new (void) { return G_PASTE_SETTINGS_UI_PANEL (gtk_widget_new (G_PASTE_TYPE_SETTINGS_UI_PANEL, NULL)); } gpaste-3.42.6/src/libgpaste/settings-ui/gpaste-settings-ui-panel.h000066400000000000000000000057701421222064600251170ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SETTINGS_UI_PANEL_H__ #define __G_PASTE_SETTINGS_UI_PANEL_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_SETTINGS_UI_PANEL (g_paste_settings_ui_panel_get_type ()) G_PASTE_FINAL_TYPE (SettingsUiPanel, settings_ui_panel, SETTINGS_UI_PANEL, GtkGrid) typedef void (*GPasteBooleanCallback) (gboolean data, gpointer user_data); typedef void (*GPasteRangeCallback) (gdouble data, gpointer user_data); typedef void (*GPasteTextCallback) (const gchar *data, gpointer user_data); typedef void (*GPasteResetCallback) (gpointer user_data); GtkSwitch *g_paste_settings_ui_panel_add_boolean_setting (GPasteSettingsUiPanel *self, const gchar *label, gboolean value, GPasteBooleanCallback on_value_changed, GPasteResetCallback on_reset, gpointer user_data); void g_paste_settings_ui_panel_add_separator (GPasteSettingsUiPanel *self); GtkSpinButton *g_paste_settings_ui_panel_add_range_setting (GPasteSettingsUiPanel *self, const gchar *label, gdouble value, gdouble min, gdouble max, gdouble step, GPasteRangeCallback on_value_changed, GPasteResetCallback on_reset, gpointer user_data); GtkEntry *g_paste_settings_ui_panel_add_text_setting (GPasteSettingsUiPanel *self, const gchar *label, const gchar *value, GPasteTextCallback on_value_changed, GPasteResetCallback on_reset, gpointer user_data); GPasteSettingsUiPanel *g_paste_settings_ui_panel_new (void); G_END_DECLS #endif /*__G_PASTE_SETTINGS_UI_PANEL_H__*/ gpaste-3.42.6/src/libgpaste/settings-ui/gpaste-settings-ui-stack.c000066400000000000000000000740631421222064600251210ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include struct _GPasteSettingsUiStack { GtkStack parent_instance; }; enum { C_SETTINGS, C_LAST_SIGNAL }; typedef struct { GPasteClient *client; GPasteSettings *settings; GError *init_error; GtkSwitch *close_on_select_switch; GtkSwitch *images_support_switch; GtkSwitch *growing_lines_switch; GtkSwitch *primary_to_history_switch; GtkSwitch *save_history_switch; GtkSwitch *synchronize_clipboards_switch; GtkSwitch *track_changes_switch; GtkSwitch *trim_items_switch; GtkSpinButton *element_size_button; GtkSpinButton *max_displayed_history_size_button; GtkSpinButton *max_history_size_button; GtkSpinButton *max_memory_usage_button; GtkSpinButton *max_text_item_size_button; GtkSpinButton *min_text_item_size_button; GtkEntry *launch_ui_entry; GtkEntry *make_password_entry; GtkEntry *pop_entry; GtkEntry *show_history_entry; GtkEntry *sync_clipboard_to_primary_entry; GtkEntry *sync_primary_to_clipboard_entry; GtkEntry *upload_entry; gchar ***actions; GtkSwitch *extension_enabled_switch; GtkSwitch *track_extension_state_switch; guint64 c_signals[C_LAST_SIGNAL]; } GPasteSettingsUiStackPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (SettingsUiStack, settings_ui_stack, GTK_TYPE_STACK) #define SETTING_CALLBACK_FULL(setting, type, cast) \ static inline void \ setting##_callback (type value, \ gpointer user_data) \ { \ g_paste_settings_set_##setting (G_PASTE_SETTINGS (user_data), value); \ } #define SETTING_CALLBACK(setting, type) SETTING_CALLBACK_FULL (setting, type, type) #define BOOLEAN_CALLBACK(setting) SETTING_CALLBACK (setting, gboolean) #define STRING_CALLBACK(setting) SETTING_CALLBACK (setting, const gchar *) #define UINT64_CALLBACK(setting) SETTING_CALLBACK_FULL (setting, gdouble, uint64) /** * g_paste_settings_ui_stack_add_panel: * @self: a #GPasteSettingsUiStack instance * @name: the name of the panel * @label: the label to display * @panel: (transfer none): the #GPasteSettingsUiPanel to add * * Add a new panel to the #GPasteSettingsUiStack */ G_PASTE_VISIBLE void g_paste_settings_ui_stack_add_panel (GPasteSettingsUiStack *self, const gchar *name, const gchar *label, GPasteSettingsUiPanel *panel) { g_return_if_fail (_G_PASTE_IS_SETTINGS_UI_STACK (self)); gtk_stack_add_titled (GTK_STACK (self), GTK_WIDGET (panel), name, label); } BOOLEAN_CALLBACK (close_on_select) BOOLEAN_CALLBACK (extension_enabled) BOOLEAN_CALLBACK (growing_lines) BOOLEAN_CALLBACK (images_support) BOOLEAN_CALLBACK (primary_to_history) BOOLEAN_CALLBACK (save_history) BOOLEAN_CALLBACK (synchronize_clipboards) BOOLEAN_CALLBACK (track_changes) BOOLEAN_CALLBACK (track_extension_state) BOOLEAN_CALLBACK (trim_items) static GPasteSettingsUiPanel * g_paste_settings_ui_stack_private_make_behaviour_panel (GPasteSettingsUiStackPrivate *priv) { GPasteSettings *settings = priv->settings; GPasteSettingsUiPanel *panel = g_paste_settings_ui_panel_new (); priv->track_changes_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Track clipboard changes"), g_paste_settings_get_track_changes (settings), track_changes_callback, (GPasteResetCallback) g_paste_settings_reset_track_changes, settings); priv->close_on_select_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Close UI on select"), g_paste_settings_get_close_on_select (settings), close_on_select_callback, (GPasteResetCallback) g_paste_settings_reset_close_on_select, settings); if (g_paste_util_has_gnome_shell ()) { priv->extension_enabled_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Enable the gnome-shell extension"), g_paste_settings_get_extension_enabled (settings), extension_enabled_callback, NULL, settings); priv->track_extension_state_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Sync the daemon state with the extension's one"), g_paste_settings_get_track_extension_state (settings), track_extension_state_callback, (GPasteResetCallback) g_paste_settings_reset_track_extension_state, settings); } g_paste_settings_ui_panel_add_separator (panel); priv->primary_to_history_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Primary selection affects history"), g_paste_settings_get_primary_to_history (settings), primary_to_history_callback, (GPasteResetCallback) g_paste_settings_reset_primary_to_history, settings); priv->synchronize_clipboards_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Synchronize clipboard with primary selection"), g_paste_settings_get_synchronize_clipboards (settings), synchronize_clipboards_callback, (GPasteResetCallback) g_paste_settings_reset_synchronize_clipboards, settings); g_paste_settings_ui_panel_add_separator (panel); priv->images_support_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Images support"), g_paste_settings_get_images_support (settings), images_support_callback, (GPasteResetCallback) g_paste_settings_reset_images_support, settings); priv->trim_items_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Trim items"), g_paste_settings_get_trim_items (settings), trim_items_callback, (GPasteResetCallback) g_paste_settings_reset_trim_items, settings); priv->growing_lines_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Detect growing lines"), g_paste_settings_get_growing_lines (settings), growing_lines_callback, (GPasteResetCallback) g_paste_settings_reset_growing_lines, settings); g_paste_settings_ui_panel_add_separator (panel); priv->save_history_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Save history"), g_paste_settings_get_save_history (settings), save_history_callback, (GPasteResetCallback) g_paste_settings_reset_save_history, settings); return panel; } UINT64_CALLBACK (element_size) UINT64_CALLBACK (max_displayed_history_size) UINT64_CALLBACK (max_history_size) UINT64_CALLBACK (max_memory_usage) UINT64_CALLBACK (max_text_item_size) UINT64_CALLBACK (min_text_item_size) static GPasteSettingsUiPanel * g_paste_settings_ui_stack_private_make_history_settings_panel (GPasteSettingsUiStackPrivate *priv) { GPasteSettings *settings = priv->settings; GPasteSettingsUiPanel *panel = g_paste_settings_ui_panel_new (); priv->element_size_button = g_paste_settings_ui_panel_add_range_setting (panel, _("Max element size when displaying"), (gdouble) g_paste_settings_get_element_size (settings), 0, 511, 5, element_size_callback, (GPasteResetCallback) g_paste_settings_reset_element_size, settings); priv->max_displayed_history_size_button = g_paste_settings_ui_panel_add_range_setting (panel, _("Max displayed history size"), (gdouble) g_paste_settings_get_max_displayed_history_size (settings), 10, 255, 5, max_displayed_history_size_callback, (GPasteResetCallback) g_paste_settings_reset_max_displayed_history_size, settings); priv->max_history_size_button = g_paste_settings_ui_panel_add_range_setting (panel, _("Max history size"), (gdouble) g_paste_settings_get_max_history_size (settings), 100, 65535, 5, max_history_size_callback, (GPasteResetCallback) g_paste_settings_reset_max_history_size, settings); priv->max_memory_usage_button = g_paste_settings_ui_panel_add_range_setting (panel, _("Max memory usage (MB)"), (gdouble) g_paste_settings_get_max_memory_usage (settings), 5, 16383, 5, max_memory_usage_callback, (GPasteResetCallback) g_paste_settings_reset_max_memory_usage, settings); priv->max_text_item_size_button = g_paste_settings_ui_panel_add_range_setting (panel, _("Max text item length"), (gdouble) g_paste_settings_get_max_text_item_size (settings), 1, G_MAXUINT64, 1, max_text_item_size_callback, (GPasteResetCallback) g_paste_settings_reset_max_text_item_size, settings); priv->min_text_item_size_button = g_paste_settings_ui_panel_add_range_setting (panel, _("Min text item length"), (gdouble) g_paste_settings_get_min_text_item_size (settings), 1, 65535, 1, min_text_item_size_callback, (GPasteResetCallback) g_paste_settings_reset_min_text_item_size, settings); return panel; } STRING_CALLBACK (launch_ui) STRING_CALLBACK (make_password) STRING_CALLBACK (pop) STRING_CALLBACK (show_history) STRING_CALLBACK (sync_clipboard_to_primary) STRING_CALLBACK (sync_primary_to_clipboard) STRING_CALLBACK (upload) static GPasteSettingsUiPanel * g_paste_settings_ui_stack_private_make_keybindings_panel (GPasteSettingsUiStackPrivate *priv) { GPasteSettings *settings = priv->settings; GPasteSettingsUiPanel *panel = g_paste_settings_ui_panel_new (); /* translators: Keyboard shortcut to delete the active item from history */ priv->pop_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Delete the active item from history"), g_paste_settings_get_pop (settings), pop_callback, (GPasteResetCallback) g_paste_settings_reset_pop, settings); /* translators: Keyboard shortcut to launch the graphical tool */ priv->launch_ui_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Launch the graphical tool"), g_paste_settings_get_launch_ui (settings), launch_ui_callback, (GPasteResetCallback) g_paste_settings_reset_launch_ui, settings); /* translators: Keyboard shortcut to mark the active item as being a password */ priv->make_password_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Mark the active item as being a password"), g_paste_settings_get_make_password (settings), make_password_callback, (GPasteResetCallback) g_paste_settings_reset_make_password, settings); /* translators: Keyboard shortcut to display the history */ priv->show_history_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Display the history"), g_paste_settings_get_show_history (settings), show_history_callback, (GPasteResetCallback) g_paste_settings_reset_show_history, settings); /* translators: Keyboard shortcut to sync the clipboard to the primary selection */ priv->sync_clipboard_to_primary_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Sync the clipboard to the primary selection"), g_paste_settings_get_sync_clipboard_to_primary (settings), sync_clipboard_to_primary_callback, (GPasteResetCallback) g_paste_settings_reset_sync_clipboard_to_primary, settings); /* translators: Keyboard shortcut to sync the primary selection to the clipboard */ priv->sync_primary_to_clipboard_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Sync the primary selection to the clipboard"), g_paste_settings_get_sync_primary_to_clipboard (settings), sync_primary_to_clipboard_callback, (GPasteResetCallback) g_paste_settings_reset_sync_primary_to_clipboard, settings); /* translators: Keyboard shortcut to upload the active item from history to a pastebin service */ priv->upload_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Upload the active item to a pastebin service"), g_paste_settings_get_upload (settings), upload_callback, (GPasteResetCallback) g_paste_settings_reset_upload, settings); return panel; } static gboolean g_paste_settings_ui_check_connection_error (GError *error) { if (!error) return FALSE; fprintf (stderr, "%s: %s\n", _("Couldn't connect to GPaste daemon"), error->message); return TRUE; } /** * g_paste_settings_ui_stack_fill: * @self: a #GPasteSettingsUiStack instance * * Fill the #GPasteSettingsUiStack with default panels */ G_PASTE_VISIBLE void g_paste_settings_ui_stack_fill (GPasteSettingsUiStack *self) { GPasteSettingsUiStackPrivate *priv = g_paste_settings_ui_stack_get_instance_private (self); g_paste_settings_ui_stack_add_panel (self, "general", _("General behaviour"), g_paste_settings_ui_stack_private_make_behaviour_panel (priv)); g_paste_settings_ui_stack_add_panel (self, "history", _("History settings"), g_paste_settings_ui_stack_private_make_history_settings_panel (priv)); g_paste_settings_ui_stack_add_panel (self, "keyboard", _("Keyboard shortcuts"), g_paste_settings_ui_stack_private_make_keybindings_panel (priv)); } static void g_paste_settings_ui_stack_settings_changed (GPasteSettings *settings, const gchar *key, gpointer user_data) { GPasteSettingsUiStackPrivate *priv = user_data; if (g_paste_str_equal (key, G_PASTE_CLOSE_ON_SELECT_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->close_on_select_switch), g_paste_settings_get_close_on_select (settings)); else if (g_paste_str_equal (key, G_PASTE_ELEMENT_SIZE_SETTING)) gtk_spin_button_set_value (priv->element_size_button, g_paste_settings_get_element_size (settings)); else if (g_paste_str_equal (key, G_PASTE_GROWING_LINES_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->growing_lines_switch), g_paste_settings_get_growing_lines (settings)); else if (g_paste_str_equal (key, G_PASTE_IMAGES_SUPPORT_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->images_support_switch), g_paste_settings_get_images_support (settings)); else if (g_paste_str_equal (key, G_PASTE_LAUNCH_UI_SETTING)) gtk_entry_set_text (priv->launch_ui_entry, g_paste_settings_get_launch_ui (settings)); else if (g_paste_str_equal (key, G_PASTE_MAKE_PASSWORD_SETTING)) gtk_entry_set_text (priv->make_password_entry, g_paste_settings_get_make_password (settings)); else if (g_paste_str_equal (key, G_PASTE_MAX_DISPLAYED_HISTORY_SIZE_SETTING)) gtk_spin_button_set_value (priv->max_displayed_history_size_button, g_paste_settings_get_max_displayed_history_size (settings)); else if (g_paste_str_equal (key, G_PASTE_MAX_HISTORY_SIZE_SETTING)) gtk_spin_button_set_value (priv->max_history_size_button, g_paste_settings_get_max_history_size (settings)); else if (g_paste_str_equal (key, G_PASTE_MAX_MEMORY_USAGE_SETTING)) gtk_spin_button_set_value (priv->max_memory_usage_button, g_paste_settings_get_max_memory_usage (settings)); else if (g_paste_str_equal (key, G_PASTE_MAX_TEXT_ITEM_SIZE_SETTING)) gtk_spin_button_set_value (priv->max_text_item_size_button, g_paste_settings_get_max_text_item_size (settings)); else if (g_paste_str_equal (key, G_PASTE_MIN_TEXT_ITEM_SIZE_SETTING)) gtk_spin_button_set_value (priv->min_text_item_size_button, g_paste_settings_get_min_text_item_size (settings)); else if (g_paste_str_equal (key, G_PASTE_POP_SETTING)) gtk_entry_set_text (priv->pop_entry, g_paste_settings_get_pop (settings)); else if (g_paste_str_equal (key, G_PASTE_PRIMARY_TO_HISTORY_SETTING )) gtk_switch_set_active (GTK_SWITCH (priv->primary_to_history_switch), g_paste_settings_get_primary_to_history (settings)); else if (g_paste_str_equal (key, G_PASTE_SAVE_HISTORY_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->save_history_switch), g_paste_settings_get_save_history (settings)); else if (g_paste_str_equal (key, G_PASTE_SHOW_HISTORY_SETTING)) gtk_entry_set_text (priv->show_history_entry, g_paste_settings_get_show_history (settings)); else if (g_paste_str_equal (key, G_PASTE_SYNC_CLIPBOARD_TO_PRIMARY_SETTING)) gtk_entry_set_text (priv->sync_clipboard_to_primary_entry, g_paste_settings_get_sync_clipboard_to_primary (settings)); else if (g_paste_str_equal (key, G_PASTE_SYNC_PRIMARY_TO_CLIPBOARD_SETTING)) gtk_entry_set_text (priv->sync_primary_to_clipboard_entry, g_paste_settings_get_sync_primary_to_clipboard (settings)); else if (g_paste_str_equal (key, G_PASTE_UPLOAD_SETTING)) gtk_entry_set_text (priv->upload_entry, g_paste_settings_get_upload (settings)); else if (g_paste_str_equal (key, G_PASTE_SYNCHRONIZE_CLIPBOARDS_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->synchronize_clipboards_switch), g_paste_settings_get_synchronize_clipboards (settings)); else if (g_paste_str_equal (key, G_PASTE_TRACK_CHANGES_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->track_changes_switch), g_paste_settings_get_track_changes (settings)); else if (g_paste_str_equal (key, G_PASTE_TRIM_ITEMS_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->trim_items_switch), g_paste_settings_get_trim_items (settings)); else if (g_paste_util_has_gnome_shell ()) { if (g_paste_str_equal (key, G_PASTE_EXTENSION_ENABLED_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->extension_enabled_switch), g_paste_settings_get_extension_enabled (settings)); else if (g_paste_str_equal (key, G_PASTE_TRACK_EXTENSION_STATE_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->track_extension_state_switch), g_paste_settings_get_track_extension_state (settings)); } } static void g_paste_settings_ui_stack_dispose (GObject *object) { GPasteSettingsUiStackPrivate *priv = g_paste_settings_ui_stack_get_instance_private (G_PASTE_SETTINGS_UI_STACK (object)); if (priv->settings) /* first dispose call */ { g_signal_handler_disconnect (priv->settings, priv->c_signals[C_SETTINGS]); g_clear_object (&priv->settings); g_clear_object (&priv->client); } G_OBJECT_CLASS (g_paste_settings_ui_stack_parent_class)->dispose (object); } static void g_paste_settings_ui_stack_finalize (GObject *object) { const GPasteSettingsUiStackPrivate *priv = _g_paste_settings_ui_stack_get_instance_private (G_PASTE_SETTINGS_UI_STACK (object)); GStrv *actions = priv->actions; for (guint64 i = 0; actions[i]; ++i) g_free ((GStrv) actions[i]); g_free ((GStrv *) actions); G_OBJECT_CLASS (g_paste_settings_ui_stack_parent_class)->finalize (object); } static void g_paste_settings_ui_stack_class_init (GPasteSettingsUiStackClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = g_paste_settings_ui_stack_dispose; object_class->finalize = g_paste_settings_ui_stack_finalize; } static void g_paste_settings_ui_stack_init (GPasteSettingsUiStack *self) { GPasteSettingsUiStackPrivate *priv = g_paste_settings_ui_stack_get_instance_private (self); priv->init_error = NULL; priv->client = g_paste_client_new_sync (&priv->init_error); priv->settings = g_paste_settings_new (); priv->c_signals[C_SETTINGS] = g_signal_connect (priv->settings, "changed", G_CALLBACK (g_paste_settings_ui_stack_settings_changed), priv); GStrv *actions = priv->actions = (GStrv *) g_malloc (3 * sizeof (GStrv)); GStrv action = actions[0] = (GStrv) g_malloc (2 * sizeof (gchar *)); action[0] = (gchar *) "switch"; /* translators: This is the name of a multi-history management action */ action[1] = _("Switch to"); action = actions[1] = (GStrv) g_malloc (2 * sizeof (gchar *)); action[0] = (gchar *) "delete"; /* translators: This is the name of a multi-history management action */ action[1] = _("Delete"); actions[2] = NULL; } /** * g_paste_settings_ui_stack_new: * * Create a new instance of #GPasteSettingsUiStack * * Returns: (nullable): a newly allocated #GPasteSettingsUiStack * free it with g_object_unref */ G_PASTE_VISIBLE GPasteSettingsUiStack * g_paste_settings_ui_stack_new (void) { GPasteSettingsUiStack *self = G_PASTE_SETTINGS_UI_STACK (gtk_widget_new (G_PASTE_TYPE_SETTINGS_UI_STACK, "margin", 12, "homogeneous", TRUE, NULL)); const GPasteSettingsUiStackPrivate *priv = _g_paste_settings_ui_stack_get_instance_private (self); if (g_paste_settings_ui_check_connection_error (priv->init_error)) { g_object_unref (self); return NULL; } return self; } gpaste-3.42.6/src/libgpaste/settings-ui/gpaste-settings-ui-stack.h000066400000000000000000000020161421222064600251130ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SETTINGS_UI_STACK_H__ #define __G_PASTE_SETTINGS_UI_STACK_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_SETTINGS_UI_STACK (g_paste_settings_ui_stack_get_type ()) G_PASTE_FINAL_TYPE (SettingsUiStack, settings_ui_stack, SETTINGS_UI_STACK, GtkStack) void g_paste_settings_ui_stack_add_panel (GPasteSettingsUiStack *self, const gchar *name, const gchar *label, GPasteSettingsUiPanel *panel); void g_paste_settings_ui_stack_fill (GPasteSettingsUiStack *self); GPasteSettingsUiStack *g_paste_settings_ui_stack_new (void); G_END_DECLS #endif /*__G_PASTE_SETTINGS_UI_STACK_H__*/ gpaste-3.42.6/src/libgpaste/settings-ui/gpaste-settings-ui-widget.c000066400000000000000000000045151421222064600252720ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include struct _GPasteSettingsUiWidget { GtkGrid parent_instance; }; typedef struct { GPasteSettingsUiStack *stack; } GPasteSettingsUiWidgetPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (SettingsUiWidget, settings_ui_widget, GTK_TYPE_GRID) /** * g_paste_settings_ui_widget_get_stack: * @self: a #GPasteSettingsUiWidget instance * * Get the inner GtkStack from the Widget * * Returns: (transfer none): the #GtkStack */ G_PASTE_VISIBLE GPasteSettingsUiStack * g_paste_settings_ui_widget_get_stack (GPasteSettingsUiWidget *self) { g_return_val_if_fail (_G_PASTE_IS_SETTINGS_UI_WIDGET (self), NULL); const GPasteSettingsUiWidgetPrivate *priv = _g_paste_settings_ui_widget_get_instance_private (self); return priv->stack; } static void g_paste_settings_ui_widget_class_init (GPasteSettingsUiWidgetClass *klass G_GNUC_UNUSED) { } static void g_paste_settings_ui_widget_init (GPasteSettingsUiWidget *self) { GPasteSettingsUiWidgetPrivate *priv = g_paste_settings_ui_widget_get_instance_private (self); GtkGrid *grid = GTK_GRID (self); guint64 current_line = 0; GPasteSettingsUiStack *stack = priv->stack = g_paste_settings_ui_stack_new (); if (!stack) return; g_paste_settings_ui_stack_fill (stack); gtk_grid_attach (grid, gtk_widget_new (GTK_TYPE_STACK_SWITCHER, "stack", GTK_STACK (stack), "halign", GTK_ALIGN_CENTER, NULL), 0, current_line++, 1, 1); gtk_grid_attach (grid, GTK_WIDGET (stack), 0, current_line++, 1, 1); } /** * g_paste_settings_ui_widget_new: * * Create a new instance of #GPasteSettingsUiWidget * * Returns: (nullable): a newly allocated #GPasteSettingsUiWidget * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_settings_ui_widget_new (void) { GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_SETTINGS_UI_WIDGET, NULL); const GPasteSettingsUiWidgetPrivate *priv = _g_paste_settings_ui_widget_get_instance_private (G_PASTE_SETTINGS_UI_WIDGET (self)); if (!priv->stack) { g_object_unref (self); return NULL; } return self; } gpaste-3.42.6/src/libgpaste/settings-ui/gpaste-settings-ui-widget.h000066400000000000000000000013661421222064600253000ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SETTINGS_UI_WIDGET_H__ #define __G_PASTE_SETTINGS_UI_WIDGET_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_SETTINGS_UI_WIDGET (g_paste_settings_ui_widget_get_type ()) G_PASTE_FINAL_TYPE (SettingsUiWidget, settings_ui_widget, SETTINGS_UI_WIDGET, GtkGrid) GPasteSettingsUiStack *g_paste_settings_ui_widget_get_stack (GPasteSettingsUiWidget *self); GtkWidget *g_paste_settings_ui_widget_new (void); G_END_DECLS #endif /*__G_PASTE_SETTINGS_UI_WIDGET_H__*/ gpaste-3.42.6/src/libgpaste/settings/000077500000000000000000000000001421222064600174715ustar00rootroot00000000000000gpaste-3.42.6/src/libgpaste/settings/gpaste-settings.c000066400000000000000000001053061421222064600227630ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #define G_SETTINGS_ENABLE_BACKEND 1 #include struct _GPasteSettings { GObject parent_instance; }; enum { C_CHANGED, C_SHELL_CHANGED, C_LAST_SIGNAL }; typedef struct { GSettings *settings; GSettings *shell_settings; gboolean close_on_select; guint64 element_size; gboolean empty_history_confirmation; gboolean growing_lines; gchar *history_name; gboolean images_support; gchar *launch_ui; gchar *make_password; guint64 max_displayed_history_size; guint64 max_history_size; guint64 max_memory_usage; guint64 max_text_item_size; guint64 min_text_item_size; gchar *pop; gboolean primary_to_history; gboolean rich_text_support; gboolean save_history; gchar *show_history; gchar *sync_clipboard_to_primary; gchar *sync_primary_to_clipboard; gboolean synchronize_clipboards; gboolean track_changes; gboolean track_extension_state; gboolean trim_items; gchar *upload; gboolean extension_enabled; guint64 c_signals[C_LAST_SIGNAL]; } GPasteSettingsPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (Settings, settings, G_TYPE_OBJECT) enum { CHANGED, REBIND, TRACK, LAST_SIGNAL }; static guint64 signals[LAST_SIGNAL] = { 0 }; #define SETTING(name, key, type, setting_type, fail, guards, clear_func, dup_func) \ G_PASTE_VISIBLE type \ g_paste_settings_get_##name (const GPasteSettings *self) \ { \ g_return_val_if_fail (_G_PASTE_IS_SETTINGS ((gpointer) self), fail); \ const GPasteSettingsPrivate *priv = _g_paste_settings_get_instance_private (self); \ return priv->name; \ } \ G_PASTE_VISIBLE void \ g_paste_settings_reset_##name (GPasteSettings *self) \ { \ g_return_if_fail (_G_PASTE_IS_SETTINGS (self)); \ const GPasteSettingsPrivate *priv = _g_paste_settings_get_instance_private (self); \ g_settings_reset (priv->settings, G_PASTE_##key##_SETTING); \ } \ static void \ g_paste_settings_private_set_##name##_from_dconf (GPasteSettingsPrivate *priv) \ { \ priv->name = g_settings_get_##setting_type (priv->settings, G_PASTE_##key##_SETTING); \ } \ G_PASTE_VISIBLE void \ g_paste_settings_set_##name (GPasteSettings *self, \ type value) \ { \ g_return_if_fail (_G_PASTE_IS_SETTINGS (self)); \ guards \ GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (self); \ clear_func \ priv->name = dup_func (value); \ g_settings_set_##setting_type (priv->settings, G_PASTE_##key##_SETTING, value); \ } #define TRIVIAL_SETTING(name, key, type, setting_type, fail) \ SETTING (name, key, type, setting_type, fail, {}, {},) #define BOOLEAN_SETTING(name, key) TRIVIAL_SETTING (name, key, gboolean, boolean, FALSE) #define UNSIGNED_SETTING(name, key) TRIVIAL_SETTING (name, key, guint64, uint64, 0) #define STRING_SETTING(name, key) SETTING (name, key, const gchar *, string, NULL, \ g_return_if_fail (value); \ g_return_if_fail (g_utf8_validate (value, -1, NULL));, \ g_free (priv->name);, g_strdup) #define NEW_SIGNAL_FULL(name, type, MTYPE, arg_type) \ g_signal_new (name, \ G_PASTE_TYPE_SETTINGS, \ type, \ 0, /* class offset */ \ NULL, /* accumulator */ \ NULL, /* accumulator data */ \ g_cclosure_marshal_VOID__##MTYPE, \ G_TYPE_NONE, \ 1, /* number of params */ \ G_TYPE_##arg_type) #define NEW_SIGNAL(name, arg_type) NEW_SIGNAL_FULL (name, G_SIGNAL_RUN_LAST, arg_type, arg_type) #define NEW_SIGNAL_DETAILED(name, arg_type) NEW_SIGNAL_FULL (name, G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, arg_type, arg_type) #define NEW_SIGNAL_DETAILED_STATIC(name, arg_type) NEW_SIGNAL_FULL (name, G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, arg_type, arg_type | G_SIGNAL_TYPE_STATIC_SCOPE) /** * g_paste_settings_get_close_on_select: * @self: a #GPasteSettings instance * * Get the "close-on-select" setting * * Returns: the value of the "close-on-select" setting */ /** * g_paste_settings_reset_close_on_select: * @self: a #GPasteSettings instance * * Reset the "close-on-select" setting */ /** * g_paste_settings_set_close_on_select: * @self: a #GPasteSettings instance * @value: the new history name * * Change the "close-on-select" setting */ BOOLEAN_SETTING (close_on_select, CLOSE_ON_SELECT) /** * g_paste_settings_get_element_size: * @self: a #GPasteSettings instance * * Get the "element-size" setting * * Returns: the value of the "element-size" setting */ /** * g_paste_settings_reset_element_size: * @self: a #GPasteSettings instance * * Reset the "element-size" setting */ /** * g_paste_settings_set_element_size: * @self: a #GPasteSettings instance * @value: the maximum displayed size of an item * * Change the "element-size" setting */ UNSIGNED_SETTING (element_size, ELEMENT_SIZE) /** * g_paste_settings_get_empty_history_confirmation: * @self: a #GPasteSettings instance * * Get the "empty-history-confirmation" setting * * Returns: the value of the "empty-history-confirmation" setting */ /** * g_paste_settings_reset_empty_history_confirmation: * @self: a #GPasteSettings instance * * Reset the "empty-history-confirmation" setting */ /** * g_paste_settings_set_empty_history_confirmation: * @self: a #GPasteSettings instance * @value: whether to prompt for confirmation when emptying a history * * Change the "empty-history-confirmation" setting */ BOOLEAN_SETTING (empty_history_confirmation, EMPTY_HISTORY_CONFIRMATION) /** * g_paste_settings_get_growing_lines: * @self: a #GPasteSettings instance * * Get the "growing-lines" setting * * Returns: the value of the "growing-lines" setting */ /** * g_paste_settings_reset_growing_lines: * @self: a #GPasteSettings instance * * Reset the "growing-lines" setting */ /** * g_paste_settings_set_growing_lines: * @self: a #GPasteSettings instance * @value: whether to detect or not growing lines * * Change the "growing-lines" setting */ BOOLEAN_SETTING (growing_lines, GROWING_LINES) /** * g_paste_settings_get_history_name: * @self: a #GPasteSettings instance * * Get the "history-name" setting * * Returns: the value of the "history-name" setting */ /** * g_paste_settings_reset_history_name: * @self: a #GPasteSettings instance * * Reset the "history-name" setting */ /** * g_paste_settings_set_history_name: * @self: a #GPasteSettings instance * @value: the new history name * * Change the "history-name" setting */ STRING_SETTING (history_name, HISTORY_NAME) /** * g_paste_settings_get_images_support: * @self: a #GPasteSettings instance * * Get the "images-support" setting * * Returns: the value of the "images-support" setting */ /** * g_paste_settings_reset_images_support: * @self: a #GPasteSettings instance * * Reset the "images-support" setting */ /** * g_paste_settings_set_images_support: * @self: a #GPasteSettings instance * @value: the new history name * * Change the "images-support" setting */ BOOLEAN_SETTING (images_support, IMAGES_SUPPORT) /** * g_paste_settings_get_launch_ui: * @self: a #GPasteSettings instance * * Get the "launch-ui" setting * * Returns: the value of the "launch-ui" setting */ /** * g_paste_settings_reset_launch_ui: * @self: a #GPasteSettings instance * * Reset the "launch-ui" setting */ /** * g_paste_settings_set_launch_ui: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "launch-ui" setting */ STRING_SETTING (launch_ui, LAUNCH_UI) /** * g_paste_settings_get_make_password: * @self: a #GPasteSettings instance * * Get the "make-password" setting * * Returns: the value of the "make-password" setting */ /** * g_paste_settings_reset_make_password: * @self: a #GPasteSettings instance * * Reset the "make-password" setting */ /** * g_paste_settings_set_make_password: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "make-password" setting */ STRING_SETTING (make_password, MAKE_PASSWORD) /** * g_paste_settings_get_max_displayed_history_size: * @self: a #GPasteSettings instance * * Get the "max-displayed-history-size" setting * * Returns: the value of the "max-displayed-history-size" setting */ /** * g_paste_settings_reset_max_displayed_history_size: * @self: a #GPasteSettings instance * * Reset the "max-displayed-history-size" setting */ /** * g_paste_settings_set_max_displayed_history_size: * @self: a #GPasteSettings instance * @value: the maximum number of items to display * * Change the "max-displayed-history-size" setting */ UNSIGNED_SETTING (max_displayed_history_size, MAX_DISPLAYED_HISTORY_SIZE) /** * g_paste_settings_get_max_history_size: * @self: a #GPasteSettings instance * * Get the "max-history-size" setting * * Returns: the value of the "max-history-size" setting */ /** * g_paste_settings_reset_max_history_size: * @self: a #GPasteSettings instance * * Reset the "max-history-size" setting */ /** * g_paste_settings_set_max_history_size: * @self: a #GPasteSettings instance * @value: the maximum number of items the history can contain * * Change the "max-history-size" setting */ UNSIGNED_SETTING (max_history_size, MAX_HISTORY_SIZE) /** * g_paste_settings_get_max_memory_usage: * @self: a #GPasteSettings instance * * Get the "max-memory-usage" setting * * Returns: the value of the "max-memory-usage" setting */ /** * g_paste_settings_reset_max_memory_usage: * @self: a #GPasteSettings instance * * Reset the "max-memory-usage" setting */ /** * g_paste_settings_set_max_memory_usage: * @self: a #GPasteSettings instance * @value: the maximum amount of memory we can use * * Change the "max-memory-usage" setting */ UNSIGNED_SETTING (max_memory_usage, MAX_MEMORY_USAGE) /** * g_paste_settings_get_max_text_item_size: * @self: a #GPasteSettings instance * * Get the "max-text-item-size" setting * * Returns: the value of the "max-text-item-size" setting */ /** * g_paste_settings_reset_max_text_item_size: * @self: a #GPasteSettings instance * * Reset the "max-text-item-size" setting */ /** * g_paste_settings_set_max_text_item_size: * @self: a #GPasteSettings instance * @value: the maximum size for a textual item to be handled * * Change the "max-text-item-size" setting */ UNSIGNED_SETTING (max_text_item_size, MAX_TEXT_ITEM_SIZE) /** * g_paste_settings_get_min_text_item_size: * @self: a #GPasteSettings instance * * Get the "min-text-item-size" setting * * Returns: the value of the "min-text-item-size" setting */ /** * g_paste_settings_reset_min_text_item_size: * @self: a #GPasteSettings instance * * Reset the "min-text-item-size" setting */ /** * g_paste_settings_set_min_text_item_size: * @self: a #GPasteSettings instance * @value: the minimum size for a textual item to be handled * * Change the "min-text-item-size" setting */ UNSIGNED_SETTING (min_text_item_size, MIN_TEXT_ITEM_SIZE) /** * g_paste_settings_get_pop: * @self: a #GPasteSettings instance * * Get the "pop" setting * * Returns: the value of the "pop" setting */ /** * g_paste_settings_reset_pop: * @self: a #GPasteSettings instance * * Reset the "pop" setting */ /** * g_paste_settings_set_pop: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "pop" setting */ STRING_SETTING (pop, POP) /** * g_paste_settings_get_primary_to_history: * @self: a #GPasteSettings instance * * Get the "primary-to-history" setting * * Returns: the value of the "primary-to-history" setting */ /** * g_paste_settings_reset_primary_to_history: * @self: a #GPasteSettings instance * * Reset the "primary-to-history" setting */ /** * g_paste_settings_set_primary_to_history: * @self: a #GPasteSettings instance * @value: whether to track or not the primary selection changes as clipboard ones * * Change the "primary-to-history" setting */ BOOLEAN_SETTING (primary_to_history, PRIMARY_TO_HISTORY) /** * g_paste_settings_get_rich_text_support: * @self: a #GPasteSettings instance * * Get the "rich-text-support" setting * * Returns: the value of the "rich-text-support" setting */ /** * g_paste_settings_reset_rich_text_support: * @self: a #GPasteSettings instance * * Reset the "rich-text-support" setting */ /** * g_paste_settings_set_rich_text_support: * @self: a #GPasteSettings instance * @value: the new history name * * Change the "rich-text-support" setting */ BOOLEAN_SETTING (rich_text_support, RICH_TEXT_SUPPORT) /** * g_paste_settings_get_save_history: * @self: a #GPasteSettings instance * * Get the "save-history" setting * * Returns: the value of the "save-history" setting */ /** * g_paste_settings_reset_save_history: * @self: a #GPasteSettings instance * * Reset the "save-history" setting */ /** * g_paste_settings_set_save_history: * @self: a #GPasteSettings instance * @value: whether to save or not the history * * Change the "save-history" setting */ BOOLEAN_SETTING (save_history, SAVE_HISTORY) /** * g_paste_settings_get_show_history: * @self: a #GPasteSettings instance * * Get the "show-history" setting * * Returns: the value of the "show-history" setting */ /** * g_paste_settings_reset_show_history: * @self: a #GPasteSettings instance * * Reset the "show-history" setting */ /** * g_paste_settings_set_show_history: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "show-history" setting */ STRING_SETTING (show_history, SHOW_HISTORY) /** * g_paste_settings_get_sync_clipboard_to_primary: * @self: a #GPasteSettings instance * * Get the "sync-clipboard-to-primary" setting * * Returns: the value of the "sync-clipboard-to-primary" setting */ /** * g_paste_settings_reset_sync_clipboard_to_primary: * @self: a #GPasteSettings instance * * Reset the "sync-clipboard-to-primary" setting */ /** * g_paste_settings_set_sync_clipboard_to_primary: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "sync-clipboard-to-primary" setting */ STRING_SETTING (sync_clipboard_to_primary, SYNC_CLIPBOARD_TO_PRIMARY) /** * g_paste_settings_get_sync_primary_to_clipboard: * @self: a #GPasteSettings instance * * Get the "sync-primary-to-clipboard" setting * * Returns: the value of the "sync-primary-to-clipboard" setting */ /** * g_paste_settings_reset_sync_primary_to_clipboard: * @self: a #GPasteSettings instance * * Reset the "sync-primary-to-clipboard" setting */ /** * g_paste_settings_set_sync_primary_to_clipboard: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "sync-primary-to-clipboard" setting */ STRING_SETTING (sync_primary_to_clipboard, SYNC_PRIMARY_TO_CLIPBOARD) /** * g_paste_settings_get_synchronize_clipboards: * @self: a #GPasteSettings instance * * Get the "synchronize-clipboards" setting * * Returns: the value of the "synchronize-clipboards" setting */ /** * g_paste_settings_reset_synchronize_clipboards: * @self: a #GPasteSettings instance * * Reset the "synchronize-clipboards" setting */ /** * g_paste_settings_set_synchronize_clipboards: * @self: a #GPasteSettings instance * @value: whether to synchronize the clipboard and the primary selection or not * * Change the "synchronize-clipboards" setting */ BOOLEAN_SETTING (synchronize_clipboards, SYNCHRONIZE_CLIPBOARDS) /** * g_paste_settings_get_track_changes: * @self: a #GPasteSettings instance * * Get the "track-changes" setting * * Returns: the value of the "track-changes" setting */ /** * g_paste_settings_reset_track_changes: * @self: a #GPasteSettings instance * * Reset the "track-changes" setting */ /** * g_paste_settings_set_track_changes: * @self: a #GPasteSettings instance * @value: whether to track or not the clipboard changes * * Change the "track-changes" setting */ BOOLEAN_SETTING (track_changes, TRACK_CHANGES) /** * g_paste_settings_get_track_extension_state: * @self: a #GPasteSettings instance * * Get the "track-extension-state" setting * * Returns: the value of the "track-extension-state" setting */ /** * g_paste_settings_reset_track_extension_state: * @self: a #GPasteSettings instance * * Reset the "track-extension-state" setting */ /** * g_paste_settings_set_track_extension_state: * @self: a #GPasteSettings instance * @value: whether to stop tracking or not the clipboard changes when an applet exits * * Change the "track-extension-state" setting */ BOOLEAN_SETTING (track_extension_state, TRACK_EXTENSION_STATE) /** * g_paste_settings_get_trim_items: * @self: a #GPasteSettings instance * * Get the "trim-items" setting * * Returns: the value of the "trim-items" setting */ /** * g_paste_settings_reset_trim_items: * @self: a #GPasteSettings instance * * Reset the "trim-items" setting */ /** * g_paste_settings_set_trim_items: * @self: a #GPasteSettings instance * @value: whether to trim or not textual items * * Change the "trim-items" setting */ BOOLEAN_SETTING (trim_items, TRIM_ITEMS) /** * g_paste_settings_get_upload: * @self: a #GPasteSettings instance * * Get the "upload" setting * * Returns: the value of the "upload" setting */ /** * g_paste_settings_reset_upload: * @self: a #GPasteSettings instance * * Reset the "upload" setting */ /** * g_paste_settings_set_upload: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "upload" setting */ STRING_SETTING (upload, UPLOAD) /** * g_paste_settings_get_extension_enabled: * @self: a #GPasteSettings instance * * Get the "extension-enabled" special setting * * Returns: Whether the gnome-shell extension is enabled or not */ G_PASTE_VISIBLE gboolean g_paste_settings_get_extension_enabled (const GPasteSettings *self) { g_return_val_if_fail (_G_PASTE_IS_SETTINGS ((gpointer) self), FALSE); const GPasteSettingsPrivate *priv = _g_paste_settings_get_instance_private (self); return priv->extension_enabled; } static inline gchar ** g_paste_settings_private_get_enabled_extensions (GPasteSettingsPrivate *priv) { return (priv->shell_settings) ? g_settings_get_strv (priv->shell_settings, G_PASTE_SHELL_ENABLED_EXTENSIONS_SETTING) : NULL; } static void g_paste_settings_private_set_extension_enabled_from_dconf (GPasteSettingsPrivate *priv) { g_auto (GStrv) extensions = g_paste_settings_private_get_enabled_extensions (priv); for (GStrv e = extensions; *e; ++e) { if (g_paste_str_equal (*e, G_PASTE_EXTENSION_NAME)) { priv->extension_enabled = TRUE; return; } } priv->extension_enabled = FALSE; } /** * g_paste_settings_set_extension_enabled: * @self: a #GPasteSettings instance * @value: whether to enable or not the gnome-shell extension * * Change the "extension-enabled" special setting */ G_PASTE_VISIBLE void g_paste_settings_set_extension_enabled (GPasteSettings *self, gboolean value) { g_return_if_fail (_G_PASTE_IS_SETTINGS (self)); GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (self); g_auto (GStrv) extensions = NULL; if (!priv->shell_settings || (value == priv->extension_enabled)) return; extensions = g_paste_settings_private_get_enabled_extensions (priv); guint64 nb = g_strv_length (extensions); if (value) { extensions = g_realloc (extensions, (nb + 2) * sizeof (gchar *)); extensions[nb] = g_strdup (G_PASTE_EXTENSION_NAME); extensions[nb+1] = NULL; } else { gboolean found = FALSE; for (guint64 i = 0; i < nb; ++i) { if (!found && g_paste_str_equal (extensions[i], G_PASTE_EXTENSION_NAME)) { found = TRUE; g_free (extensions[i]); } if (found) extensions[i] = extensions[i+1]; } } priv->extension_enabled = value; g_settings_set_strv (priv->shell_settings, G_PASTE_SHELL_ENABLED_EXTENSIONS_SETTING, (const gchar * const *) extensions); } static void g_paste_settings_shell_settings_changed (GSettings *settings G_GNUC_UNUSED, const gchar *key G_GNUC_UNUSED, gpointer user_data) { GPasteSettings *self = G_PASTE_SETTINGS (user_data); GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (self); g_paste_settings_private_set_extension_enabled_from_dconf (priv); /* Forward the signal */ g_signal_emit (self, signals[CHANGED], g_quark_from_string (G_PASTE_EXTENSION_ENABLED_SETTING), G_PASTE_EXTENSION_ENABLED_SETTING, NULL); } static void g_paste_settings_rebind (GPasteSettings *self, const gchar *key) { g_signal_emit (self, signals[REBIND], g_quark_from_string (key), NULL); } static void g_paste_settings_settings_changed (GSettings *settings G_GNUC_UNUSED, const gchar *key, gpointer user_data) { GPasteSettings *self = G_PASTE_SETTINGS (user_data); GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (self); if (g_paste_str_equal (key, G_PASTE_CLOSE_ON_SELECT_SETTING)) g_paste_settings_private_set_close_on_select_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_ELEMENT_SIZE_SETTING)) g_paste_settings_private_set_element_size_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_EMPTY_HISTORY_CONFIRMATION_SETTING)) g_paste_settings_private_set_empty_history_confirmation_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_GROWING_LINES_SETTING)) g_paste_settings_private_set_growing_lines_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_HISTORY_NAME_SETTING)) g_paste_settings_private_set_history_name_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_IMAGES_SUPPORT_SETTING)) g_paste_settings_private_set_images_support_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_LAUNCH_UI_SETTING)) { g_paste_settings_private_set_launch_ui_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_LAUNCH_UI_SETTING); } else if (g_paste_str_equal (key, G_PASTE_MAKE_PASSWORD_SETTING)) { g_paste_settings_private_set_make_password_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_MAKE_PASSWORD_SETTING); } else if (g_paste_str_equal (key, G_PASTE_MAX_DISPLAYED_HISTORY_SIZE_SETTING)) g_paste_settings_private_set_max_displayed_history_size_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_MAX_HISTORY_SIZE_SETTING)) g_paste_settings_private_set_max_history_size_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_MAX_MEMORY_USAGE_SETTING)) g_paste_settings_private_set_max_memory_usage_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_MAX_TEXT_ITEM_SIZE_SETTING)) g_paste_settings_private_set_max_text_item_size_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_MIN_TEXT_ITEM_SIZE_SETTING)) g_paste_settings_private_set_min_text_item_size_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_POP_SETTING)) { g_paste_settings_private_set_pop_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_POP_SETTING); } else if (g_paste_str_equal (key, G_PASTE_PRIMARY_TO_HISTORY_SETTING )) g_paste_settings_private_set_primary_to_history_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_RICH_TEXT_SUPPORT_SETTING)) g_paste_settings_private_set_rich_text_support_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_SAVE_HISTORY_SETTING)) g_paste_settings_private_set_save_history_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_SHOW_HISTORY_SETTING)) { g_paste_settings_private_set_show_history_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_SHOW_HISTORY_SETTING); } else if (g_paste_str_equal (key, G_PASTE_SYNC_CLIPBOARD_TO_PRIMARY_SETTING)) { g_paste_settings_private_set_sync_clipboard_to_primary_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_SYNC_CLIPBOARD_TO_PRIMARY_SETTING); } else if (g_paste_str_equal (key, G_PASTE_SYNC_PRIMARY_TO_CLIPBOARD_SETTING)) { g_paste_settings_private_set_sync_primary_to_clipboard_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_SYNC_PRIMARY_TO_CLIPBOARD_SETTING); } else if (g_paste_str_equal (key, G_PASTE_SYNCHRONIZE_CLIPBOARDS_SETTING)) g_paste_settings_private_set_synchronize_clipboards_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_TRACK_CHANGES_SETTING)) { g_paste_settings_private_set_track_changes_from_dconf (priv); g_signal_emit (self, signals[TRACK], 0, /* detail */ priv->track_changes, NULL); } else if (g_paste_str_equal (key, G_PASTE_TRACK_EXTENSION_STATE_SETTING)) g_paste_settings_private_set_track_extension_state_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_TRIM_ITEMS_SETTING)) g_paste_settings_private_set_trim_items_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_UPLOAD_SETTING)) { g_paste_settings_private_set_upload_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_UPLOAD_SETTING); } /* Forward the signal */ g_signal_emit (self, signals[CHANGED], g_quark_from_string (key), key, NULL); } static void g_paste_settings_dispose (GObject *object) { GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (G_PASTE_SETTINGS (object)); GSettings *settings = priv->settings; GSettings *shell_settings = priv->shell_settings; if (settings) { g_signal_handler_disconnect (settings, priv->c_signals[C_CHANGED]); g_clear_object (&priv->settings); } if (shell_settings) { g_signal_handler_disconnect (shell_settings, priv->c_signals[C_SHELL_CHANGED]); g_clear_object (&priv->shell_settings); } G_OBJECT_CLASS (g_paste_settings_parent_class)->dispose (object); } static void g_paste_settings_finalize (GObject *object) { const GPasteSettingsPrivate *priv = _g_paste_settings_get_instance_private (G_PASTE_SETTINGS (object)); g_free (priv->history_name); g_free (priv->launch_ui); g_free (priv->make_password); g_free (priv->pop); g_free (priv->show_history); g_free (priv->sync_clipboard_to_primary); g_free (priv->sync_primary_to_clipboard); g_free (priv->upload); G_OBJECT_CLASS (g_paste_settings_parent_class)->finalize (object); } static void g_paste_settings_class_init (GPasteSettingsClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = g_paste_settings_dispose; object_class->finalize = g_paste_settings_finalize; /** * GPasteSettings::changed: * @settings: the object on which the signal was emitted * @key: the name of the key that changed * * The "changed" signal is emitted when a key has potentially changed. * You should call one of the g_paste_settings_get() calls to check the new * value. * * This signal supports detailed connections. You can connect to the * detailed signal "changed::x" in order to only receive callbacks * when key "x" changes. */ signals[CHANGED] = NEW_SIGNAL_DETAILED_STATIC ("changed", STRING); /** * GPasteSettings::rebind: * @settings: the object on which the signal was emitted * @key: the name of the key that changed * * The "rebind" signal is emitted when a key has potentially changed. * You should call one of the g_paste_settings_get() calls to check the new * value. * * This signal supports detailed connections. You can connect to the * detailed signal "rebind::x" in order to only receive callbacks * when key "x" changes. */ signals[REBIND] = NEW_SIGNAL_DETAILED ("rebind" , STRING); /** * GPasteSettings::track: * @settings: the object on which the signal was emitted * @tracking_state: whether we're now tracking or not * * The "track" signal is emitted when the daemon starts or stops tracking * clipboard changes */ signals[TRACK] = NEW_SIGNAL ("track" , BOOLEAN); } static GSettings * create_g_settings (void) { g_autofree gchar *config_file_path = g_build_filename (g_get_user_config_dir (), PACKAGE, "settings", NULL); g_autoptr (GFile) config_file = g_file_new_for_path (config_file_path); if (g_file_query_exists (config_file, NULL /* cancellable */)) { g_autoptr (GSettingsBackend) backend = g_keyfile_settings_backend_new (config_file_path, G_PASTE_SETTINGS_PATH, PACKAGE_NAME); return g_settings_new_with_backend (G_PASTE_SETTINGS_NAME, backend); } else { return g_settings_new (G_PASTE_SETTINGS_NAME); } } static void g_paste_settings_init (GPasteSettings *self) { GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (self); GSettings *settings = priv->settings = create_g_settings (); priv->history_name = NULL; priv->launch_ui = NULL; priv->make_password = NULL; priv->pop = NULL; priv->show_history = NULL; priv->sync_clipboard_to_primary = NULL; priv->sync_primary_to_clipboard = NULL; priv->upload = NULL; priv->c_signals[C_CHANGED] = g_signal_connect (settings, "changed", G_CALLBACK (g_paste_settings_settings_changed), self); g_paste_settings_private_set_close_on_select_from_dconf (priv); g_paste_settings_private_set_element_size_from_dconf (priv); g_paste_settings_private_set_empty_history_confirmation_from_dconf (priv); g_paste_settings_private_set_growing_lines_from_dconf (priv); g_paste_settings_private_set_history_name_from_dconf (priv); g_paste_settings_private_set_images_support_from_dconf (priv); g_paste_settings_private_set_launch_ui_from_dconf (priv); g_paste_settings_private_set_make_password_from_dconf (priv); g_paste_settings_private_set_max_displayed_history_size_from_dconf (priv); g_paste_settings_private_set_max_history_size_from_dconf (priv); g_paste_settings_private_set_max_memory_usage_from_dconf (priv); g_paste_settings_private_set_max_text_item_size_from_dconf (priv); g_paste_settings_private_set_min_text_item_size_from_dconf (priv); g_paste_settings_private_set_pop_from_dconf (priv); g_paste_settings_private_set_primary_to_history_from_dconf (priv); g_paste_settings_private_set_rich_text_support_from_dconf (priv); g_paste_settings_private_set_save_history_from_dconf (priv); g_paste_settings_private_set_show_history_from_dconf (priv); g_paste_settings_private_set_sync_clipboard_to_primary_from_dconf (priv); g_paste_settings_private_set_sync_primary_to_clipboard_from_dconf (priv); g_paste_settings_private_set_synchronize_clipboards_from_dconf (priv); g_paste_settings_private_set_track_changes_from_dconf (priv); g_paste_settings_private_set_track_extension_state_from_dconf (priv); g_paste_settings_private_set_trim_items_from_dconf (priv); g_paste_settings_private_set_upload_from_dconf (priv); priv->shell_settings = NULL; priv->extension_enabled = FALSE; if (g_paste_util_has_gnome_shell ()) { priv->shell_settings = g_settings_new (G_PASTE_SHELL_SETTINGS_NAME); priv->c_signals[C_SHELL_CHANGED] = g_signal_connect (priv->shell_settings, "changed::" G_PASTE_SHELL_ENABLED_EXTENSIONS_SETTING, G_CALLBACK (g_paste_settings_shell_settings_changed), self); g_paste_settings_private_set_extension_enabled_from_dconf (priv); } } /** * g_paste_settings_new: * * Create a new instance of #GPasteSettings * * Returns: a newly allocated #GPasteSettings * free it with g_object_unref */ G_PASTE_VISIBLE GPasteSettings * g_paste_settings_new (void) { return g_object_new (G_PASTE_TYPE_SETTINGS, NULL); } gpaste-3.42.6/src/libgpaste/settings/gpaste-settings.h000066400000000000000000000213011421222064600227600ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SETTINGS_H__ #define __G_PASTE_SETTINGS_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_SETTINGS (g_paste_settings_get_type ()) G_PASTE_FINAL_TYPE (Settings, settings, SETTINGS, GObject) gboolean g_paste_settings_get_close_on_select (const GPasteSettings *self); guint64 g_paste_settings_get_element_size (const GPasteSettings *self); gboolean g_paste_settings_get_empty_history_confirmation (const GPasteSettings *self); gboolean g_paste_settings_get_growing_lines (const GPasteSettings *self); const gchar *g_paste_settings_get_history_name (const GPasteSettings *self); gboolean g_paste_settings_get_images_support (const GPasteSettings *self); const gchar *g_paste_settings_get_launch_ui (const GPasteSettings *self); const gchar *g_paste_settings_get_make_password (const GPasteSettings *self); guint64 g_paste_settings_get_max_displayed_history_size (const GPasteSettings *self); guint64 g_paste_settings_get_max_history_size (const GPasteSettings *self); guint64 g_paste_settings_get_max_memory_usage (const GPasteSettings *self); guint64 g_paste_settings_get_max_text_item_size (const GPasteSettings *self); guint64 g_paste_settings_get_min_text_item_size (const GPasteSettings *self); const gchar *g_paste_settings_get_pop (const GPasteSettings *self); gboolean g_paste_settings_get_primary_to_history (const GPasteSettings *self); gboolean g_paste_settings_get_rich_text_support (const GPasteSettings *self); gboolean g_paste_settings_get_save_history (const GPasteSettings *self); const gchar *g_paste_settings_get_show_history (const GPasteSettings *self); const gchar *g_paste_settings_get_sync_clipboard_to_primary (const GPasteSettings *self); const gchar *g_paste_settings_get_sync_primary_to_clipboard (const GPasteSettings *self); gboolean g_paste_settings_get_synchronize_clipboards (const GPasteSettings *self); gboolean g_paste_settings_get_track_changes (const GPasteSettings *self); gboolean g_paste_settings_get_track_extension_state (const GPasteSettings *self); gboolean g_paste_settings_get_trim_items (const GPasteSettings *self); const gchar *g_paste_settings_get_upload (const GPasteSettings *self); void g_paste_settings_reset_close_on_select (GPasteSettings *self); void g_paste_settings_reset_element_size (GPasteSettings *self); void g_paste_settings_reset_empty_history_confirmation (GPasteSettings *self); void g_paste_settings_reset_growing_lines (GPasteSettings *self); void g_paste_settings_reset_history_name (GPasteSettings *self); void g_paste_settings_reset_images_support (GPasteSettings *self); void g_paste_settings_reset_launch_ui (GPasteSettings *self); void g_paste_settings_reset_make_password (GPasteSettings *self); void g_paste_settings_reset_max_displayed_history_size (GPasteSettings *self); void g_paste_settings_reset_max_history_size (GPasteSettings *self); void g_paste_settings_reset_max_memory_usage (GPasteSettings *self); void g_paste_settings_reset_max_text_item_size (GPasteSettings *self); void g_paste_settings_reset_min_text_item_size (GPasteSettings *self); void g_paste_settings_reset_pop (GPasteSettings *self); void g_paste_settings_reset_primary_to_history (GPasteSettings *self); void g_paste_settings_reset_rich_text_support (GPasteSettings *self); void g_paste_settings_reset_save_history (GPasteSettings *self); void g_paste_settings_reset_show_history (GPasteSettings *self); void g_paste_settings_reset_sync_clipboard_to_primary (GPasteSettings *self); void g_paste_settings_reset_sync_primary_to_clipboard (GPasteSettings *self); void g_paste_settings_reset_synchronize_clipboards (GPasteSettings *self); void g_paste_settings_reset_track_changes (GPasteSettings *self); void g_paste_settings_reset_track_extension_state (GPasteSettings *self); void g_paste_settings_reset_trim_items (GPasteSettings *self); void g_paste_settings_reset_upload (GPasteSettings *self); void g_paste_settings_set_close_on_select (GPasteSettings *self, gboolean value); void g_paste_settings_set_element_size (GPasteSettings *self, guint64 value); void g_paste_settings_set_empty_history_confirmation (GPasteSettings *self, gboolean value); void g_paste_settings_set_growing_lines (GPasteSettings *self, gboolean value); void g_paste_settings_set_history_name (GPasteSettings *self, const gchar *value); void g_paste_settings_set_images_support (GPasteSettings *self, gboolean value); void g_paste_settings_set_launch_ui (GPasteSettings *self, const gchar *value); void g_paste_settings_set_make_password (GPasteSettings *self, const gchar *value); void g_paste_settings_set_max_displayed_history_size (GPasteSettings *self, guint64 value); void g_paste_settings_set_max_history_size (GPasteSettings *self, guint64 value); void g_paste_settings_set_max_memory_usage (GPasteSettings *self, guint64 value); void g_paste_settings_set_max_text_item_size (GPasteSettings *self, guint64 value); void g_paste_settings_set_min_text_item_size (GPasteSettings *self, guint64 value); void g_paste_settings_set_pop (GPasteSettings *self, const gchar *value); void g_paste_settings_set_primary_to_history (GPasteSettings *self, gboolean value); void g_paste_settings_set_rich_text_support (GPasteSettings *self, gboolean value); void g_paste_settings_set_save_history (GPasteSettings *self, gboolean value); void g_paste_settings_set_show_history (GPasteSettings *self, const gchar *value); void g_paste_settings_set_sync_clipboard_to_primary (GPasteSettings *self, const gchar *value); void g_paste_settings_set_sync_primary_to_clipboard (GPasteSettings *self, const gchar *value); void g_paste_settings_set_synchronize_clipboards (GPasteSettings *self, gboolean value); void g_paste_settings_set_track_changes (GPasteSettings *self, gboolean value); void g_paste_settings_set_track_extension_state (GPasteSettings *self, gboolean value); void g_paste_settings_set_trim_items (GPasteSettings *self, gboolean value); void g_paste_settings_set_upload (GPasteSettings *self, const gchar *value); gboolean g_paste_settings_get_extension_enabled (const GPasteSettings *self); void g_paste_settings_set_extension_enabled (GPasteSettings *self, gboolean value); GPasteSettings *g_paste_settings_new (void); G_END_DECLS #endif /*__G_PASTE_SETTINGS_H__*/ gpaste-3.42.6/src/libgpaste/util/000077500000000000000000000000001421222064600166065ustar00rootroot00000000000000gpaste-3.42.6/src/libgpaste/util/gpaste-util.c000066400000000000000000000541101421222064600212110ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include "gpaste-gtk-compat.h" /** * g_paste_util_confirm_dialog: * @parent: (nullable): the parent #GtkWindow * @msg: the message to display * * Show GPaste about dialog */ G_PASTE_VISIBLE gboolean g_paste_util_confirm_dialog (GtkWindow *parent, const gchar *action, const gchar *msg) { g_return_val_if_fail (!parent || GTK_IS_WINDOW (parent), FALSE); g_return_val_if_fail (g_utf8_validate (msg, -1, NULL), FALSE); GtkWidget *dialog = gtk_dialog_new_with_buttons (PACKAGE_STRING, parent, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_USE_HEADER_BAR, action, GTK_RESPONSE_OK, _("Cancel"), GTK_RESPONSE_CANCEL, NULL); GtkWidget *label = gtk_label_new (msg); GtkDialog *d = GTK_DIALOG (dialog); gtk_widget_set_vexpand (label, TRUE); gtk_widget_set_valign (label, TRUE); gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (d)), label, TRUE, TRUE); gtk_widget_show (label); gboolean ret = gtk_dialog_run (d) == GTK_RESPONSE_OK; gtk_widget_destroy (dialog); return ret; } /* Copied from glib's gio/gapplication-tool.c */ static GVariant * app_get_platform_data (void) { g_auto (GVariantBuilder) builder; const gchar *startup_id; g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); if ((startup_id = g_getenv ("DESKTOP_STARTUP_ID"))) g_variant_builder_add (&builder, "{sv}", "desktop-startup-id", g_variant_new_string (startup_id)); return g_variant_builder_end (&builder); } static void g_paste_util_spawn_on_proxy_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data G_GNUC_UNUSED) { g_autoptr (GDBusProxy) proxy = g_dbus_proxy_new_for_bus_finish (res, NULL /* error */); if (proxy) { g_dbus_proxy_call (proxy, "Activate", g_variant_new ("(@a{sv})", app_get_platform_data ()), G_DBUS_CALL_FLAGS_NONE, -1, NULL, /* cancellable */ NULL, /* callback */ NULL); /* user_data */ } } /** * g_paste_util_spawn: * @app: the GPaste app to spawn * * spawn a GPaste app */ G_PASTE_VISIBLE void g_paste_util_spawn (const gchar *app) { g_return_if_fail (g_utf8_validate (app, -1, NULL)); g_autofree gchar *name = g_strdup_printf ("org.gnome.GPaste.%s", app); g_autofree gchar *object = g_strdup_printf ("/org/gnome/GPaste/%s", app); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, name, object, "org.freedesktop.Application", NULL, g_paste_util_spawn_on_proxy_ready, NULL); } static GDBusProxy * _bus_proxy_new_sync (const gchar *app, GError **error) { g_autofree gchar *name = g_strdup_printf ("org.gnome.GPaste.%s", app); g_autofree gchar *object = g_strdup_printf ("/org/gnome/GPaste/%s", app); return g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, name, object, "org.freedesktop.Application", NULL, error); } static gboolean _spawn_sync (GDBusProxy *proxy, GError **error) { G_GNUC_UNUSED g_autoptr (GVariant) res = g_dbus_proxy_call_sync (proxy, "Activate", g_variant_new ("(@a{sv})", app_get_platform_data ()), G_DBUS_CALL_FLAGS_NONE, -1, NULL, error); return !error || !(*error); } /** * g_paste_util_spawn_sync: * @app: the GPaste app to spawn * @error: a #GError or %NULL * * spawn a GPaste app * * Returns: whether the spawn was successful */ G_PASTE_VISIBLE gboolean g_paste_util_spawn_sync (const gchar *app, GError **error) { g_return_val_if_fail (g_utf8_validate (app, -1, NULL), FALSE); g_return_val_if_fail (!error || !(*error), FALSE); g_autoptr (GDBusProxy) proxy = _bus_proxy_new_sync (app, error); if (!proxy) return FALSE; return _spawn_sync (proxy, error); } static void g_paste_util_activate_ui_on_proxy_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { g_autofree gpointer *data = (gpointer *) user_data; g_autofree gchar *action = data[0]; GVariant *arg = data[1]; g_autoptr (GDBusProxy) proxy = g_dbus_proxy_new_for_bus_finish (res, NULL /* error */); if (proxy) { g_auto (GVariantBuilder) params; g_variant_builder_init (¶ms, G_VARIANT_TYPE ("av")); if (arg) g_variant_builder_add (¶ms, "v", arg); g_dbus_proxy_call (proxy, "ActivateAction", g_variant_new ("(sav@a{sv})", action, ¶ms, app_get_platform_data ()), G_DBUS_CALL_FLAGS_NONE, -1, NULL, /* cancellable */ NULL, /* callback */ NULL); /* user_data */ } } /** * g_paste_util_activate_ui: * @action: the action to activate * @arg: (nullable): the action argument * * Activate an action on a GPaste app */ G_PASTE_VISIBLE void g_paste_util_activate_ui (const gchar *action, GVariant *arg) { g_return_if_fail (g_utf8_validate (action, -1, NULL)); gpointer *data = g_new (gpointer, 2); data[0] = g_strdup (action); data[1] = arg; g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.gnome.GPaste.Ui", "/org/gnome/GPaste/Ui", "org.freedesktop.Application", NULL, g_paste_util_activate_ui_on_proxy_ready, data); } /** * g_paste_util_activate_ui_sync: * @action: the action to activate * @arg: (nullable): the action argument * @error: a #GError or %NULL * * activate an action from GPaste Ui * * Returns: whether the action was successful */ G_PASTE_VISIBLE gboolean g_paste_util_activate_ui_sync (const gchar *action, GVariant *arg, GError **error) { g_return_val_if_fail (g_utf8_validate (action, -1, NULL), FALSE); g_return_val_if_fail (!error || !(*error), FALSE); g_autoptr (GDBusProxy) proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.gnome.GPaste.Ui", "/org/gnome/GPaste/Ui", "org.freedesktop.Application", NULL, error); if (!proxy) return FALSE; g_auto (GVariantBuilder) params; g_variant_builder_init (¶ms, G_VARIANT_TYPE ("av")); if (arg) g_variant_builder_add (¶ms, "v", arg); /* We only consume it */ G_GNUC_UNUSED g_autoptr (GVariant) res = g_dbus_proxy_call_sync (proxy, "ActivateAction", g_variant_new ("(sav@a{sv})", action, ¶ms, app_get_platform_data ()), G_DBUS_CALL_FLAGS_NONE, -1, NULL, /* cancellable */ error); return TRUE; } /** * g_paste_util_empty_with_confirmation: * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @history: the name of the history to empty * * Empty a history after confirmation. * Confirmation is skipped if GPaste is configured to do so. */ G_PASTE_VISIBLE void g_paste_util_empty_with_confirmation (GPasteClient *client, const GPasteSettings *settings, const gchar *history) { g_return_if_fail (_G_PASTE_IS_CLIENT (client)); g_return_if_fail (_G_PASTE_IS_SETTINGS (settings)); g_return_if_fail (g_utf8_validate (history, -1, NULL)); if (g_paste_settings_get_empty_history_confirmation (settings)) g_paste_util_activate_ui ("empty", g_variant_new_string (history)); else g_paste_client_empty_history (client, history, NULL, NULL); } /** * g_paste_util_empty_with_confirmation_sync: * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @history: the name of the history to empty * @error: a #GError or %NULL * * Empty a history after confirmation. * Confirmation is skipped if GPaste is configured to do so. * * Returns: whether the action was successful */ G_PASTE_VISIBLE gboolean g_paste_util_empty_with_confirmation_sync (GPasteClient *client, const GPasteSettings *settings, const gchar *history, GError **error) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), FALSE); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), FALSE); g_return_val_if_fail (g_utf8_validate (history, -1, NULL), FALSE); g_return_val_if_fail (!error || !(*error), FALSE); if (g_paste_settings_get_empty_history_confirmation (settings)) { return g_paste_util_activate_ui_sync ("empty", g_variant_new_string (history), error); } else { g_autoptr (GError) _error = NULL; g_paste_client_empty_history_sync (client, history, &_error); if (error) { *error = _error; _error = NULL; } return !_error && !(error && *error); } } /** * g_paste_util_relace: * @text: the initial text * @pattern: the pattern to replace * @substitution: the replacement text * * Replace some text * * Returns: the newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_util_replace (const gchar *text, const gchar *pattern, const gchar *substitution) { g_return_val_if_fail (g_utf8_validate (text, -1, NULL), NULL); g_return_val_if_fail (g_utf8_validate (pattern, -1, NULL), NULL); g_return_val_if_fail (g_utf8_validate (substitution, -1, NULL), NULL); g_autofree gchar *regex_string = g_regex_escape_string (pattern, -1); g_autoptr (GRegex) regex = g_regex_new (regex_string, 0, /* Compile options */ 0, /* Match options */ NULL); /* Error */ return g_regex_replace_literal (regex, text, (gssize) -1, 0, /* Start position */ substitution, 0, /* Match options */ NULL); /* Error */ } /** * g_paste_util_compute_checksum: * @image: the #GdkPixbuf to checksum * * Compute the checksum of an image * * Returns: the newly allocated checksum */ G_PASTE_VISIBLE gchar * g_paste_util_compute_checksum (GdkPixbuf *image) { if (!image || !GDK_IS_PIXBUF (image)) return NULL; const guint8 *data = gdk_pixbuf_read_pixels (image); gsize length = gdk_pixbuf_get_byte_length (image); return g_compute_checksum_for_data (G_CHECKSUM_SHA256, data, length); } /** * g_paste_util_empty_history: * @parent_window: (nullable): the parent #GtkWindow * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @history: the name of the history to empty * * Empty history after prompting user for confirmation */ G_PASTE_VISIBLE void g_paste_util_empty_history (GtkWindow *parent_window, GPasteClient *client, GPasteSettings *settings, const gchar *history) { if (!g_paste_settings_get_empty_history_confirmation (settings) || /* Translators: this is the translation for emptying the history */ g_paste_util_confirm_dialog (parent_window, _("Empty"), _("Do you really want to empty the history?"))) g_paste_client_empty_history (client, history, NULL, NULL); } /** * g_paste_util_has_gnome_shell: * * Check whether gnome-shell is installed or not * * Returns: %TRUE if gnome-shell is installed */ G_PASTE_VISIBLE gboolean g_paste_util_has_gnome_shell (void) { GSettingsSchemaSource *source = g_settings_schema_source_get_default (); if (!source) return FALSE; g_autoptr (GSettingsSchema) schema = g_settings_schema_source_lookup (source, G_PASTE_SHELL_SETTINGS_NAME, TRUE); return !!schema; } /** * g_paste_util_show_win: * @application: a #GtkApplication * * Present the application's window to user */ G_PASTE_VISIBLE void g_paste_util_show_win (GApplication *application) { g_return_if_fail (GTK_IS_APPLICATION (application)); for (GList *wins = gtk_application_get_windows (GTK_APPLICATION (application)); wins; wins = g_list_next (wins)) { if (GTK_IS_WIDGET (wins->data) && gtk_widget_get_realized (wins->data)) gtk_window_present (wins->data); } } /** * g_paste_util_get_au_result: * @variant: a #GVariant * @len: the length of the resulting array * * Get the "au" GVariant as an array of guint32 * * Returns: (array length=len): The resulting array */ G_PASTE_VISIBLE guint32 * g_paste_util_get_dbus_au_result (GVariant *variant, guint64 *len) { guint64 _len; const guint32 *r = g_variant_get_fixed_array (variant, &_len, sizeof (guint32)); guint32 *ret = g_memdup2 (r, _len * sizeof (guint32)); if (len) *len = _len; return ret; } /** * g_paste_util_get_dbus_item_result: * @variant: a #GVariant * * Get the "(ss)" GVariant as an item * * Returns: (transfer full): The item */ G_PASTE_VISIBLE GPasteClientItem * g_paste_util_get_dbus_item_result (GVariant *variant) { const gchar *uuid, *value; g_variant_get (variant, "(ss)", &uuid, &value); return g_paste_client_item_new (uuid, value); } /** * g_paste_util_get_dbus_items_result: * @variant: a #GVariant * * Get the "a(ss)" GVariant as a list of items * * Returns: (element-type GPasteClientItem) (transfer full): The items */ G_PASTE_VISIBLE GList * g_paste_util_get_dbus_items_result (GVariant *variant) { GList *items = NULL; GVariantIter iter; g_autoptr (GVariant) v = NULL; g_variant_iter_init (&iter, variant); while ((v = g_variant_iter_next_value (&iter))) { items = g_list_append (items, g_paste_util_get_dbus_item_result (v)); g_variant_unref (v); } return items; } static gchar * g_paste_util_get_runtime_dir (const gchar *component) { g_return_val_if_fail (component, NULL); return g_strdup_printf ("%s/" PACKAGE_NAME "/%s", g_get_user_runtime_dir (), component); } /** * g_paste_util_write_pid_file: * @component: The component we're handling * * Write the pid file */ G_PASTE_VISIBLE void g_paste_util_write_pid_file (const gchar *component) { g_return_if_fail (component); g_autofree gchar *dir = g_paste_util_get_runtime_dir (component); g_mkdir_with_parents (dir, 0700); g_autofree gchar *pidfile = g_strdup_printf ("%s/pid", dir); g_autofree gchar *contents = g_strdup_printf ("%" G_PID_FORMAT, getpid ()); g_file_set_contents (pidfile, contents, -1, NULL); } /** * g_paste_util_read_pid_file: * @component: The component we're handling * * Read the pid file * * Returns: the pid */ G_PASTE_VISIBLE GPid g_paste_util_read_pid_file (const gchar *component) { g_return_val_if_fail (component, (GPid) -1); #ifdef G_OS_UNIX g_autofree gchar *dir = g_paste_util_get_runtime_dir (component); g_autofree gchar *pidfile = g_strdup_printf ("%s/pid", dir); g_autofree gchar *contents = NULL; if (!g_file_get_contents (pidfile, &contents, NULL, NULL)) return (GPid) -1; return (GPid) g_ascii_strtoll (contents, NULL, 0); #else return (GPid) -1; #endif } /** * g_paste_util_xml_decode: * @text: The text to decode * * Decode the text to its original pre-xml form * * Returns: the decoded text */ G_PASTE_VISIBLE gchar * g_paste_util_xml_decode (const gchar *text) { g_return_val_if_fail (text, NULL); g_autofree gchar *_decoded_text = g_paste_util_replace (text, ">", ">"); return g_paste_util_replace (_decoded_text, "&", "&"); } /** * g_paste_util_xml_encode: * @text: The text to encode * * Encode the text into its xml form * * Returns: the encoded text */ G_PASTE_VISIBLE gchar * g_paste_util_xml_encode (const gchar *text) { g_return_val_if_fail (text, NULL); g_autofree gchar *_encoded_text = g_paste_util_replace (text, "&", "&"); return g_paste_util_replace (_encoded_text, ">", ">"); } /** * g_paste_util_get_history_dir_path: * * Get the path to the directory where we store the history * * Returns: the directory path */ G_PASTE_VISIBLE gchar * g_paste_util_get_history_dir_path (void) { const gchar *user_data_dir = g_get_user_data_dir (); gchar *meson_bug_history_path = g_build_filename (user_data_dir, PACKAGE_NAME, NULL); // meson wrongfully defined PACKAGE as PACKAGE_NAME. // use it if it exists, but otherwise use the correct path. if (g_file_test (meson_bug_history_path, G_FILE_TEST_IS_DIR)) return meson_bug_history_path; g_free (meson_bug_history_path); return g_build_filename (user_data_dir, PACKAGE, NULL); } /** * g_paste_util_get_history_dir: * * Get the directory where we store the history * * Returns: (transfer full): the directory */ G_PASTE_VISIBLE GFile * g_paste_util_get_history_dir (void) { g_autofree gchar *history_dir_path = g_paste_util_get_history_dir_path (); return g_file_new_for_path (history_dir_path); } /** * g_paste_util_get_history_file_path: * @name: the name of the history * @extension: the file extension * * Get the path to the file in which we store the history * * Returns: the file path */ G_PASTE_VISIBLE gchar * g_paste_util_get_history_file_path (const gchar *name, const gchar *extension) { g_return_val_if_fail (name, NULL); g_return_val_if_fail (extension, NULL); g_autofree gchar *history_dir_path = g_paste_util_get_history_dir_path (); g_autofree gchar *history_file_name = g_strconcat (name, ".", extension, NULL); return g_build_filename (history_dir_path, history_file_name, NULL); } /** * g_paste_util_get_history_file: * @name: the name of the history * @extension: the file extension * * Get the file in which we store the history * * Returns: (transfer full): the file */ G_PASTE_VISIBLE GFile * g_paste_util_get_history_file (const gchar *name, const gchar *extension) { g_return_val_if_fail (name, NULL); g_return_val_if_fail (extension, NULL); g_autofree gchar *history_file_path = g_paste_util_get_history_file_path (name, extension); return g_file_new_for_path (history_file_path); } /** * g_paste_util_ensure_history_dir_exists: * @settings: a #GPasteSettings instance * * Ensure the history dir exists * * Returns: where it exists or if there was an error creating it */ G_PASTE_VISIBLE gboolean g_paste_util_ensure_history_dir_exists (const GPasteSettings *settings) { g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), FALSE); g_autoptr (GFile) history_dir = g_paste_util_get_history_dir (); if (!g_file_query_exists (history_dir, NULL)) /* cancellable */ { if (!g_paste_settings_get_save_history (settings)) return TRUE; g_autoptr (GError) error = NULL; g_file_make_directory_with_parents (history_dir, NULL, /* cancellable */ &error); if (error) { g_critical ("%s: %s", _("Could not create history dir"), error->message); return FALSE; } } return TRUE; } gpaste-3.42.6/src/libgpaste/util/gpaste-util.h000066400000000000000000000062741421222064600212260ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UTIL_H__ #define __G_PASTE_UTIL_H__ #include #include #include G_BEGIN_DECLS gboolean g_paste_util_confirm_dialog (GtkWindow *parent, const gchar *action, const gchar *msg); void g_paste_util_spawn (const gchar *app); gboolean g_paste_util_spawn_sync (const gchar *app, GError **error); void g_paste_util_activate_ui (const gchar *action, GVariant *arg); gboolean g_paste_util_activate_ui_sync (const gchar *action, GVariant *arg, GError **error); void g_paste_util_empty_with_confirmation (GPasteClient *client, const GPasteSettings *settings, const gchar *history); gboolean g_paste_util_empty_with_confirmation_sync (GPasteClient *client, const GPasteSettings *settings, const gchar *history, GError **error); gchar *g_paste_util_replace (const gchar *text, const gchar *pattern, const gchar *substitution); gchar *g_paste_util_compute_checksum (GdkPixbuf *image); void g_paste_util_empty_history (GtkWindow *parent_window, GPasteClient *client, GPasteSettings *settings, const gchar *history); gboolean g_paste_util_has_gnome_shell (void); void g_paste_util_show_win (GApplication *application); guint32 *g_paste_util_get_dbus_au_result (GVariant *variant, guint64 *len); GPasteClientItem *g_paste_util_get_dbus_item_result (GVariant *variant); GList *g_paste_util_get_dbus_items_result (GVariant *variant); void g_paste_util_write_pid_file (const gchar *component); GPid g_paste_util_read_pid_file (const gchar *component); gchar *g_paste_util_xml_decode (const gchar *text); gchar *g_paste_util_xml_encode (const gchar *text); gchar *g_paste_util_get_history_dir_path (void); GFile *g_paste_util_get_history_dir (void); gchar *g_paste_util_get_history_file_path (const gchar *name, const gchar *extension); GFile *g_paste_util_get_history_file (const gchar *name, const gchar *extension); gboolean g_paste_util_ensure_history_dir_exists (const GPasteSettings *settings); G_END_DECLS #endif /*__G_PASTE_UTIL_H__*/ gpaste-3.42.6/src/meson.build000066400000000000000000000001761421222064600160250ustar00rootroot00000000000000subdir('libgpaste') subdir('client') subdir('daemon') subdir('ui') if get_option('gnome-shell') subdir('gnome-shell') endifgpaste-3.42.6/src/ui.mk000066400000000000000000000061021421222064600146240ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou pkglibexec_PROGRAMS += \ bin/gpaste-ui \ $(NULL) bin_gpaste_ui_SOURCES = \ %D%/ui/gpaste-ui-about.c \ %D%/ui/gpaste-ui-about.h \ %D%/ui/gpaste-ui-backup-history.c \ %D%/ui/gpaste-ui-backup-history.h \ %D%/ui/gpaste-ui-delete-history.c \ %D%/ui/gpaste-ui-delete-history.h \ %D%/ui/gpaste-ui-delete-item.c \ %D%/ui/gpaste-ui-delete-item.h \ %D%/ui/gpaste-ui-edit-item.c \ %D%/ui/gpaste-ui-edit-item.h \ %D%/ui/gpaste-ui-empty-history.c \ %D%/ui/gpaste-ui-empty-history.h \ %D%/ui/gpaste-ui-empty-item.c \ %D%/ui/gpaste-ui-empty-item.h \ %D%/ui/gpaste-ui-header.c \ %D%/ui/gpaste-ui-header.h \ %D%/ui/gpaste-ui-history-action.c \ %D%/ui/gpaste-ui-history-action.h \ %D%/ui/gpaste-ui-history-actions.c \ %D%/ui/gpaste-ui-history-actions.h \ %D%/ui/gpaste-ui-history.c \ %D%/ui/gpaste-ui-history.h \ %D%/ui/gpaste-ui-item-action.c \ %D%/ui/gpaste-ui-item-action.h \ %D%/ui/gpaste-ui-item-skeleton.c \ %D%/ui/gpaste-ui-item-skeleton.h \ %D%/ui/gpaste-ui-item.c \ %D%/ui/gpaste-ui-item.h \ %D%/ui/gpaste-ui-new-item.c \ %D%/ui/gpaste-ui-new-item.h \ %D%/ui/gpaste-ui-panel-history.c \ %D%/ui/gpaste-ui-panel-history.h \ %D%/ui/gpaste-ui-panel.c \ %D%/ui/gpaste-ui-panel.h \ %D%/ui/gpaste-ui-reexec.c \ %D%/ui/gpaste-ui-reexec.h \ %D%/ui/gpaste-ui-search-bar.c \ %D%/ui/gpaste-ui-search-bar.h \ %D%/ui/gpaste-ui-search.c \ %D%/ui/gpaste-ui-search.h \ %D%/ui/gpaste-ui-settings.c \ %D%/ui/gpaste-ui-settings.h \ %D%/ui/gpaste-ui-shortcuts-window.c \ %D%/ui/gpaste-ui-shortcuts-window.h \ %D%/ui/gpaste-ui-switch.c \ %D%/ui/gpaste-ui-switch.h \ %D%/ui/gpaste-ui-upload-item.c \ %D%/ui/gpaste-ui-upload-item.h \ %D%/ui/gpaste-ui-window.c \ %D%/ui/gpaste-ui-window.h \ %D%/ui/gpaste-ui.c \ %D%/ui/tmp/gpaste-client.c \ %D%/ui/tmp/gpaste-client.h \ %D%/ui/tmp/gpaste-client-item.c \ %D%/ui/tmp/gpaste-client-item.h \ %D%/ui/tmp/gpaste-util.c \ %D%/ui/tmp/gpaste-util.h \ %D%/ui/tmp/gpaste-settings.c \ %D%/ui/tmp/gpaste-settings.h \ %D%/ui/tmp/gpaste-update-enums.c \ %D%/ui/tmp/gpaste-update-enums.h \ %D%/ui/tmp/gpaste-settings-ui-panel.c \ %D%/ui/tmp/gpaste-settings-ui-panel.h \ %D%/ui/tmp/gpaste-settings-ui-stack.c \ %D%/ui/tmp/gpaste-settings-ui-stack.h \ %D%/ui/tmp/gpaste-settings-ui-widget.c \ %D%/ui/tmp/gpaste-settings-ui-widget.h \ %D%/ui/tmp/gpaste-item-enums.c \ %D%/ui/tmp/gpaste-item-enums.h \ $(NULL) bin_gpaste_ui_CFLAGS = \ $(GLIB_CFLAGS) \ $(GTK3_CFLAGS) \ -I $(srcdir)/src/ui/ \ -I $(srcdir)/src/ui/tmp/ \ $(NULL) bin_gpaste_ui_LDADD = \ $(GLIB_LIBS) \ $(GTK3_LIBS) \ $(NULL) # $(builddir)/$(libgpaste_la_file) gpaste-3.42.6/src/ui/000077500000000000000000000000001421222064600142745ustar00rootroot00000000000000gpaste-3.42.6/src/ui/gpaste-ui-about.c000066400000000000000000000032031421222064600174440ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include struct _GPasteUiAbout { GtkButton parent_instance; }; typedef struct { GActionGroup *action_group; } GPasteUiAboutPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiAbout, ui_about, GTK_TYPE_BUTTON) static void g_paste_ui_about_clicked (GtkButton *button) { const GPasteUiAboutPrivate *priv = _g_paste_ui_about_get_instance_private (G_PASTE_UI_ABOUT (button)); g_action_group_activate_action (priv->action_group, "about", NULL); } static void g_paste_ui_about_class_init (GPasteUiAboutClass *klass) { GTK_BUTTON_CLASS (klass)->clicked = g_paste_ui_about_clicked; } static void g_paste_ui_about_init (GPasteUiAbout *self) { GtkWidget *widget = GTK_WIDGET (self); gtk_widget_set_tooltip_text (widget, _("About")); gtk_widget_set_valign (widget, GTK_ALIGN_CENTER); gtk_container_add (GTK_CONTAINER (self), gtk_image_new_from_icon_name ("dialog-information-symbolic", GTK_ICON_SIZE_BUTTON)); } /** * g_paste_ui_about_new: * @app: The #GtkApplication * * Create a new instance of #GPasteUiAbout * * Returns: a newly allocated #GPasteUiAbout * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_about_new (GtkApplication *app) { g_return_val_if_fail (GTK_IS_APPLICATION (app), NULL); GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_UI_ABOUT, NULL); GPasteUiAboutPrivate *priv = g_paste_ui_about_get_instance_private (G_PASTE_UI_ABOUT (self)); priv->action_group = G_ACTION_GROUP (app); return self; } gpaste-3.42.6/src/ui/gpaste-ui-about.h000066400000000000000000000011061421222064600174510ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_ABOUT_H__ #define __G_PASTE_UI_ABOUT_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_ABOUT (g_paste_ui_about_get_type ()) G_PASTE_FINAL_TYPE (UiAbout, ui_about, UI_ABOUT, GtkButton) GtkWidget *g_paste_ui_about_new (GtkApplication *app); G_END_DECLS #endif /*__G_PASTE_UI_ABOUT_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-backup-history.c000066400000000000000000000107551421222064600213100ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include #include "gpaste-gtk-compat.h" struct _GPasteUiBackupHistory { GPasteUiHistoryAction parent_instance; }; G_PASTE_DEFINE_TYPE (UiBackupHistory, ui_backup_history, G_PASTE_TYPE_UI_HISTORY_ACTION) enum { C_ACTIVATED, C_LAST_SIGNAL }; static void on_entry_activated (GtkEntry *entry G_GNUC_UNUSED, gpointer user_data) { GtkDialog *dialog = user_data; gtk_dialog_response (dialog, GTK_RESPONSE_OK); } static gchar * g_paste_ui_backup_history_confirm_dialog (GtkWindow *parent, const gchar *history) { g_autofree gchar *default_name = g_strdup_printf ("%s_backup", history); GtkWidget *dialog = gtk_dialog_new_with_buttons (PACKAGE_STRING, parent, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_USE_HEADER_BAR, _("Backup"), GTK_RESPONSE_OK, _("Cancel"), GTK_RESPONSE_CANCEL, NULL); GtkDialog *d = GTK_DIALOG (dialog); GtkWidget *label = gtk_label_new (_("Under which name do you want to backup this history?")); GtkWidget *entry = gtk_entry_new (); GtkEntry *e = GTK_ENTRY (entry); GtkWidget *vbox = gtk_dialog_get_content_area (d); GtkBox *box = GTK_BOX (vbox); gtk_widget_set_margin_start (vbox, 2); gtk_widget_set_margin_end (vbox, 2); gtk_widget_set_margin_bottom (vbox, 2); gtk_widget_set_vexpand (label, TRUE); gtk_widget_set_valign (label, TRUE); gtk_box_pack_start (box, label, TRUE, TRUE); gtk_widget_show (label); gtk_widget_set_vexpand (entry, TRUE); gtk_widget_set_valign (entry, TRUE); gtk_box_pack_start (box, entry, TRUE, TRUE); gtk_entry_set_text (e, default_name); gtk_widget_show (entry); guint64 c_signals[C_LAST_SIGNAL] = { [C_ACTIVATED] = g_signal_connect (G_OBJECT (entry), "activate", G_CALLBACK (on_entry_activated), dialog) }; gchar *backup = NULL; if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { const gchar *text = gtk_entry_get_text (e); if (text && *text) backup = g_strdup (text); } g_signal_handler_disconnect (entry, c_signals[C_ACTIVATED]); gtk_widget_destroy (dialog); return backup; } static gboolean g_paste_ui_backup_history_activate (GPasteUiHistoryAction *self G_GNUC_UNUSED, GPasteClient *client, GPasteSettings *settings G_GNUC_UNUSED, GtkWindow *rootwin, const gchar *history) { g_autofree gchar *backup = g_paste_ui_backup_history_confirm_dialog (rootwin, history); if (backup) g_paste_client_backup_history (client, history, backup, NULL, NULL); return TRUE; } static void g_paste_ui_backup_history_class_init (GPasteUiBackupHistoryClass *klass) { G_PASTE_UI_HISTORY_ACTION_CLASS (klass)->activate = g_paste_ui_backup_history_activate; } static void g_paste_ui_backup_history_init (GPasteUiBackupHistory *self G_GNUC_UNUSED) { } /** * g_paste_ui_backup_history_new: * @client: a #GPasteClient * @settings: a #GPasteSettings * @actions: the #GPasteUiHistoryActions * @rootwin: the root #GtkWindow * * Create a new instance of #GPasteUiBackupHistory * * Returns: a newly allocated #GPasteUiBackupHistory * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_backup_history_new (GPasteClient *client, GPasteSettings *settings, GtkWidget *actions, GtkWindow *rootwin) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); g_return_val_if_fail (_G_PASTE_IS_UI_HISTORY_ACTIONS (actions), NULL); g_return_val_if_fail (GTK_IS_WINDOW (rootwin), NULL); return g_paste_ui_history_action_new (G_PASTE_TYPE_UI_BACKUP_HISTORY, client, settings, actions, rootwin, _("Backup")); } gpaste-3.42.6/src/ui/gpaste-ui-backup-history.h000066400000000000000000000015721421222064600213120ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_BACKUP_HISTORY_H__ #define __G_PASTE_UI_BACKUP_HISTORY_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_BACKUP_HISTORY (g_paste_ui_backup_history_get_type ()) G_PASTE_FINAL_TYPE (UiBackupHistory, ui_backup_history, UI_BACKUP_HISTORY, GPasteUiHistoryAction) GtkWidget *g_paste_ui_backup_history_new (GPasteClient *client, GPasteSettings *settings, GtkWidget *actions, GtkWindow *rootwin); G_END_DECLS #endif /*__G_PASTE_UI_BACKUP_HISTORY_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-delete-history.c000066400000000000000000000042541421222064600213020ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include struct _GPasteUiDeleteHistory { GPasteUiHistoryAction parent_instance; }; G_PASTE_DEFINE_TYPE (UiDeleteHistory, ui_delete_history, G_PASTE_TYPE_UI_HISTORY_ACTION) static gboolean g_paste_ui_delete_history_activate (GPasteUiHistoryAction *self G_GNUC_UNUSED, GPasteClient *client, GPasteSettings *settings G_GNUC_UNUSED, GtkWindow *rootwin, const gchar *history) { if (g_paste_util_confirm_dialog (rootwin, _("Delete"), _("Are you sure you want to delete this history?"))) g_paste_client_delete_history (client, history, NULL, NULL); return TRUE; } static void g_paste_ui_delete_history_class_init (GPasteUiDeleteHistoryClass *klass) { G_PASTE_UI_HISTORY_ACTION_CLASS (klass)->activate = g_paste_ui_delete_history_activate; } static void g_paste_ui_delete_history_init (GPasteUiDeleteHistory *self G_GNUC_UNUSED) { } /** * g_paste_ui_delete_history_new: * @client: a #GPasteClient * @settings: a #GPasteSettings * @actions: the #GPasteUiHistoryActions * @rootwin: the root #GtkWindow * * Create a new instance of #GPasteUiDeleteHistory * * Returns: a newly allocated #GPasteUiDeleteHistory * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_delete_history_new (GPasteClient *client, GPasteSettings *settings, GtkWidget *actions, GtkWindow *rootwin) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); g_return_val_if_fail (_G_PASTE_IS_UI_HISTORY_ACTIONS (actions), NULL); g_return_val_if_fail (GTK_IS_WINDOW (rootwin), NULL); return g_paste_ui_history_action_new (G_PASTE_TYPE_UI_DELETE_HISTORY, client, settings, actions, rootwin, _("Delete")); } gpaste-3.42.6/src/ui/gpaste-ui-delete-history.h000066400000000000000000000015721421222064600213070ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_DELETE_HISTORY_H__ #define __G_PASTE_UI_DELETE_HISTORY_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_DELETE_HISTORY (g_paste_ui_delete_history_get_type ()) G_PASTE_FINAL_TYPE (UiDeleteHistory, ui_delete_history, UI_DELETE_HISTORY, GPasteUiHistoryAction) GtkWidget *g_paste_ui_delete_history_new (GPasteClient *client, GPasteSettings *settings, GtkWidget *actions, GtkWindow *rootwin); G_END_DECLS #endif /*__G_PASTE_UI_DELETE_HISTORY_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-delete-item.c000066400000000000000000000024251421222064600205350ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include struct _GPasteUiDeleteItem { GPasteUiItemAction parent_instance; }; G_PASTE_DEFINE_TYPE (UiDeleteItem, ui_delete_item, G_PASTE_TYPE_UI_ITEM_ACTION) static void g_paste_ui_delete_item_activate (GPasteUiItemAction *self G_GNUC_UNUSED, GPasteClient *client, const gchar *uuid) { g_paste_client_delete (client, uuid, NULL, NULL); } static void g_paste_ui_delete_item_class_init (GPasteUiDeleteItemClass *klass) { G_PASTE_UI_ITEM_ACTION_CLASS (klass)->activate = g_paste_ui_delete_item_activate; } static void g_paste_ui_delete_item_init (GPasteUiDeleteItem *self G_GNUC_UNUSED) { } /** * g_paste_ui_delete_item_new: * @client: a #GPasteClient * * Create a new instance of #GPasteUiDeleteItem * * Returns: a newly allocated #GPasteUiDeleteItem * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_delete_item_new (GPasteClient *client) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); return g_paste_ui_item_action_new (G_PASTE_TYPE_UI_DELETE_ITEM, client, "edit-delete-symbolic", _("Delete")); } gpaste-3.42.6/src/ui/gpaste-ui-delete-item.h000066400000000000000000000012151421222064600205360ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_DELETE_ITEM_H__ #define __G_PASTE_UI_DELETE_ITEM_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_DELETE_ITEM (g_paste_ui_delete_item_get_type ()) G_PASTE_FINAL_TYPE (UiDeleteItem, ui_delete_item, UI_DELETE_ITEM, GPasteUiItemAction) GtkWidget *g_paste_ui_delete_item_new (GPasteClient *client); G_END_DECLS #endif /*__G_PASTE_UI_DELETE_ITEM_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-edit-item.c000066400000000000000000000075561421222064600202320ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include "gpaste-gtk-compat.h" struct _GPasteUiEditItem { GPasteUiItemAction parent_instance; }; typedef struct { GtkWindow *rootwin; } GPasteUiEditItemPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiEditItem, ui_edit_item, G_PASTE_TYPE_UI_ITEM_ACTION) typedef struct { GPasteUiEditItemPrivate *priv; gchar *uuid; } CallbackData; static void on_item_ready (GObject *source_object, GAsyncResult *res, gpointer user_data) { g_autofree CallbackData *data = user_data; g_autofree gchar *uuid = data->uuid; GPasteUiEditItemPrivate *priv = data->priv; GPasteClient *client = G_PASTE_CLIENT (source_object); g_autofree gchar *old_item = g_paste_client_get_raw_element_finish (client, res, NULL); if (!old_item) return; GtkWidget *dialog = gtk_dialog_new_with_buttons (PACKAGE_STRING, priv->rootwin, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_USE_HEADER_BAR, _("Edit"), GTK_RESPONSE_OK, _("Cancel"), GTK_RESPONSE_CANCEL, NULL); GtkDialog *d = GTK_DIALOG (dialog); GtkWidget *text = gtk_text_view_new (); GtkTextView *tv = GTK_TEXT_VIEW (text); GtkTextBuffer *buf = gtk_text_view_get_buffer (tv); GtkWidget *scroll = gtk_scrolled_window_new (NULL, NULL); GtkScrolledWindow *sw = GTK_SCROLLED_WINDOW (scroll); gtk_text_view_set_wrap_mode (tv, GTK_WRAP_WORD); gtk_text_buffer_set_text (buf, old_item, -1); gtk_scrolled_window_set_min_content_height (sw, 300); gtk_scrolled_window_set_min_content_width (sw, 600); gtk_container_add (GTK_CONTAINER (sw), text); gtk_widget_set_vexpand (scroll, TRUE); gtk_widget_set_valign (scroll, TRUE); gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (d)), scroll, TRUE, TRUE); gtk_widget_show_all (scroll); if (gtk_dialog_run (d) == GTK_RESPONSE_OK) { const gchar *txt; g_object_get (G_OBJECT (buf), "text", &txt, NULL); if (txt && *txt) g_paste_client_replace (client, uuid, txt, NULL, NULL); } gtk_widget_destroy (dialog); } static void g_paste_ui_edit_item_activate (GPasteUiItemAction *self, GPasteClient *client, const gchar *uuid) { CallbackData *data = g_malloc (sizeof (CallbackData)); data->priv = g_paste_ui_edit_item_get_instance_private (G_PASTE_UI_EDIT_ITEM (self)); data->uuid = g_strdup (uuid); g_paste_client_get_raw_element (client, uuid, on_item_ready, data); } static void g_paste_ui_edit_item_class_init (GPasteUiEditItemClass *klass) { G_PASTE_UI_ITEM_ACTION_CLASS (klass)->activate = g_paste_ui_edit_item_activate; } static void g_paste_ui_edit_item_init (GPasteUiEditItem *self G_GNUC_UNUSED) { } /** * g_paste_ui_edit_item_new: * @client: a #GPasteClient * @rootwin: the root #GtkWindow * * Create a new instance of #GPasteUiEditItem * * Returns: a newly allocated #GPasteUiEditItem * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_edit_item_new (GPasteClient *client, GtkWindow *rootwin) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (GTK_IS_WINDOW (rootwin), NULL); GtkWidget *self = g_paste_ui_item_action_new (G_PASTE_TYPE_UI_EDIT_ITEM, client, "accessories-text-editor-symbolic", _("Edit")); GPasteUiEditItemPrivate *priv = g_paste_ui_edit_item_get_instance_private (G_PASTE_UI_EDIT_ITEM (self)); priv->rootwin = rootwin; return self; } gpaste-3.42.6/src/ui/gpaste-ui-edit-item.h000066400000000000000000000012671421222064600202300ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_EDIT_ITEM_H__ #define __G_PASTE_UI_EDIT_ITEM_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_EDIT_ITEM (g_paste_ui_edit_item_get_type ()) G_PASTE_FINAL_TYPE (UiEditItem, ui_edit_item, UI_EDIT_ITEM, GPasteUiItemAction) GtkWidget *g_paste_ui_edit_item_new (GPasteClient *client, GtkWindow *rootwin); G_END_DECLS #endif /*__G_PASTE_UI_EDIT_ITEM_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-empty-history.c000066400000000000000000000041611421222064600211730ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include struct _GPasteUiEmptyHistory { GPasteUiHistoryAction parent_instance; }; G_PASTE_DEFINE_TYPE (UiEmptyHistory, ui_empty_history, G_PASTE_TYPE_UI_HISTORY_ACTION) static gboolean g_paste_ui_empty_history_activate (GPasteUiHistoryAction *self G_GNUC_UNUSED, GPasteClient *client, GPasteSettings *settings, GtkWindow *rootwin, const gchar *history) { g_paste_util_empty_history (rootwin, client, settings, history); return TRUE; } static void g_paste_ui_empty_history_class_init (GPasteUiEmptyHistoryClass *klass) { G_PASTE_UI_HISTORY_ACTION_CLASS (klass)->activate = g_paste_ui_empty_history_activate; } static void g_paste_ui_empty_history_init (GPasteUiEmptyHistory *self G_GNUC_UNUSED) { } /** * g_paste_ui_empty_history_new: * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @actions: the #GPasteUiHistoryActions * @rootwin: the main #GtkWindow * * Create a new instance of #GPasteUiEmptyHistory * * Returns: a newly allocated #GPasteUiEmptyHistory * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_empty_history_new (GPasteClient *client, GPasteSettings *settings, GtkWidget *actions, GtkWindow *rootwin) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); g_return_val_if_fail (_G_PASTE_IS_UI_HISTORY_ACTIONS (actions), NULL); g_return_val_if_fail (GTK_IS_WINDOW (rootwin), NULL); /* Translators: this is the translation for emptying the history */ return g_paste_ui_history_action_new (G_PASTE_TYPE_UI_EMPTY_HISTORY, client, settings, actions, rootwin, _("Empty")); } gpaste-3.42.6/src/ui/gpaste-ui-empty-history.h000066400000000000000000000015561421222064600212050ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_EMPTY_HISTORY_H__ #define __G_PASTE_UI_EMPTY_HISTORY_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_EMPTY_HISTORY (g_paste_ui_empty_history_get_type ()) G_PASTE_FINAL_TYPE (UiEmptyHistory, ui_empty_history, UI_EMPTY_HISTORY, GPasteUiHistoryAction) GtkWidget *g_paste_ui_empty_history_new (GPasteClient *client, GPasteSettings *settings, GtkWidget *actions, GtkWindow *rootwin); G_END_DECLS #endif /*__G_PASTE_UI_EMPTY_HISTORY_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-empty-item.c000066400000000000000000000044641421222064600204360ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include struct _GPasteUiEmptyItem { GPasteUiItemSkeleton parent_instance; }; G_PASTE_DEFINE_TYPE (UiEmptyItem, ui_empty_item, G_PASTE_TYPE_UI_ITEM_SKELETON) static void g_paste_ui_empty_item_show_text (GPasteUiEmptyItem *self, const gchar *text) { g_paste_ui_item_skeleton_set_text (G_PASTE_UI_ITEM_SKELETON (self), text); gtk_widget_show (GTK_WIDGET (self)); } /** * g_paste_ui_empty_show_no_result: * @self: a #GPasteUiEmptyItem instance * * Show a no result message */ G_PASTE_VISIBLE void g_paste_ui_empty_item_show_no_result (GPasteUiEmptyItem *self) { g_return_if_fail (G_PASTE_IS_UI_EMPTY_ITEM (self)); g_paste_ui_empty_item_show_text (self, _("(No result)")); } /** * g_paste_ui_empty_show_empty: * @self: a #GPasteUiEmptyItem instance * * Show an empty message */ G_PASTE_VISIBLE void g_paste_ui_empty_item_show_empty (GPasteUiEmptyItem *self) { g_return_if_fail (G_PASTE_IS_UI_EMPTY_ITEM (self)); g_paste_ui_empty_item_show_text (self, _("(Empty)")); } static void g_paste_ui_empty_item_class_init (GPasteUiEmptyItemClass *klass G_GNUC_UNUSED) { } static void g_paste_ui_empty_item_init (GPasteUiEmptyItem *self) { g_paste_ui_item_skeleton_set_text (G_PASTE_UI_ITEM_SKELETON (self), _("(Couldn't connect to GPaste daemon)")); } /** * g_paste_ui_empty_item_new: * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @rootwin: the root #GtkWindow * * Create a new instance of #GPasteUiEmptyItem * * Returns: a newly allocated #GPasteUiEmptyItem * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_empty_item_new (GPasteClient *client, GPasteSettings *settings, GtkWindow *rootwin) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); g_return_val_if_fail (GTK_IS_WINDOW (rootwin), NULL); GtkWidget *self = g_paste_ui_item_skeleton_new (G_PASTE_TYPE_UI_EMPTY_ITEM, client, settings, rootwin); g_paste_ui_item_skeleton_set_activatable (G_PASTE_UI_ITEM_SKELETON (self), FALSE); return self; } gpaste-3.42.6/src/ui/gpaste-ui-empty-item.h000066400000000000000000000016241421222064600204360ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_EMPTY_ITEM_H__ #define __G_PASTE_UI_EMPTY_ITEM_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_EMPTY_ITEM (g_paste_ui_empty_item_get_type ()) G_PASTE_FINAL_TYPE (UiEmptyItem, ui_empty_item, UI_EMPTY_ITEM, GPasteUiItemSkeleton) void g_paste_ui_empty_item_show_no_result (GPasteUiEmptyItem *self); void g_paste_ui_empty_item_show_empty (GPasteUiEmptyItem *self); GtkWidget *g_paste_ui_empty_item_new (GPasteClient *client, GPasteSettings *settings, GtkWindow *rootwin); G_END_DECLS #endif /*__G_PASTE_UI_EMPTY_ITEM_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-header.c000066400000000000000000000057071421222064600175750ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include #include #include #include #include struct _GPasteUiHeader { GtkHeaderBar parent_instance; }; typedef struct { GtkButton *settings; GtkButton *search; } GPasteUiHeaderPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiHeader, ui_header, GTK_TYPE_HEADER_BAR) /** * g_paste_ui_header_show_prefs: * @self: the #GPasteUiHeader * * Show the prefs pane */ G_PASTE_VISIBLE void g_paste_ui_header_show_prefs (const GPasteUiHeader *self) { g_return_if_fail (_G_PASTE_IS_UI_HEADER (self)); const GPasteUiHeaderPrivate *priv = _g_paste_ui_header_get_instance_private (self); gtk_button_clicked (priv->settings); } /** * g_paste_ui_header_get_search_button: * @self: the #GPasteUiHeader * * Get the search button * * Returns: (transfer none): the #GPasteUISearch instance */ G_PASTE_VISIBLE GtkButton * g_paste_ui_header_get_search_button (const GPasteUiHeader *self) { g_return_val_if_fail (_G_PASTE_IS_UI_HEADER (self), NULL); const GPasteUiHeaderPrivate *priv = _g_paste_ui_header_get_instance_private (self); return priv->search; } static void g_paste_ui_header_class_init (GPasteUiHeaderClass *klass G_GNUC_UNUSED) { } static void g_paste_ui_header_init (GPasteUiHeader *self) { GPasteUiHeaderPrivate *priv = g_paste_ui_header_get_instance_private (self); GtkHeaderBar *header_bar = GTK_HEADER_BAR (self); GtkWidget *settings = g_paste_ui_settings_new (); GtkWidget *search = g_paste_ui_search_new (); priv->settings = GTK_BUTTON (settings); priv->search = GTK_BUTTON (search); gtk_header_bar_set_title(header_bar, PACKAGE_STRING); gtk_header_bar_set_show_close_button (header_bar, TRUE); gtk_header_bar_pack_end (header_bar, settings); gtk_header_bar_pack_end (header_bar, search); } /** * g_paste_ui_header_new: * @topwin: the main #GtkWindow * @client: a #GPasteClient instance * * Create a new instance of #GPasteUiHeader * * Returns: a newly allocated #GPasteUiHeader * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_header_new (GtkWindow *topwin, GPasteClient *client) { g_return_val_if_fail (GTK_IS_WINDOW (topwin), NULL); g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_UI_HEADER, NULL); GtkHeaderBar *bar = GTK_HEADER_BAR (self); gtk_header_bar_pack_start (bar, g_paste_ui_switch_new (topwin, client)); gtk_header_bar_pack_start (bar, g_paste_ui_reexec_new (topwin, client)); gtk_header_bar_pack_end (bar, g_paste_ui_about_new (gtk_window_get_application (topwin))); gtk_header_bar_pack_end (bar, g_paste_ui_new_item_new (topwin, client)); return self; } gpaste-3.42.6/src/ui/gpaste-ui-header.h000066400000000000000000000014321421222064600175710ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_HEADER_H__ #define __G_PASTE_UI_HEADER_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_HEADER (g_paste_ui_header_get_type ()) G_PASTE_FINAL_TYPE (UiHeader, ui_header, UI_HEADER, GtkHeaderBar) void g_paste_ui_header_show_prefs (const GPasteUiHeader *self); GtkButton *g_paste_ui_header_get_search_button (const GPasteUiHeader *self); GtkWidget *g_paste_ui_header_new (GtkWindow *topwin, GPasteClient *client); G_END_DECLS #endif /*__G_PASTE_UI_HEADER_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-history-action.c000066400000000000000000000113271421222064600213140ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include typedef struct { GPasteClient *client; GPasteSettings *settings; GPasteUiHistoryActions *actions; GtkWindow *rootwin; gchar *history; } GPasteUiHistoryActionPrivate; G_PASTE_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (UiHistoryAction, ui_history_action, GTK_TYPE_BUTTON) /** * g_paste_ui_history_action_set_history: * @self: a #GPasteUiHistoryAction instance * @history: the history to delete * * Set the history to delete */ G_PASTE_VISIBLE void g_paste_ui_history_action_set_history (GPasteUiHistoryAction *self, const gchar *history) { g_return_if_fail (_G_PASTE_IS_UI_HISTORY_ACTION (self)); GPasteUiHistoryActionPrivate *priv = g_paste_ui_history_action_get_instance_private (G_PASTE_UI_HISTORY_ACTION (self)); g_free (priv->history); priv->history = g_strdup (history); } static gboolean g_paste_ui_history_action_button_press_event (GtkWidget *widget, GdkEventButton *event G_GNUC_UNUSED) { GPasteUiHistoryAction *self = G_PASTE_UI_HISTORY_ACTION (widget); GPasteUiHistoryActionClass *klass = G_PASTE_UI_HISTORY_ACTION_GET_CLASS (self); const GPasteUiHistoryActionPrivate *priv = _g_paste_ui_history_action_get_instance_private (self); gboolean ret; if (priv->history && klass->activate) ret = klass->activate (self, priv->client, priv->settings, priv->rootwin, priv->history); else ret = GTK_WIDGET_CLASS (g_paste_ui_history_action_parent_class)->button_press_event (widget, event); g_paste_ui_history_actions_set_relative_to (priv->actions, NULL); return ret; } static void g_paste_ui_history_action_dispose (GObject *object) { GPasteUiHistoryActionPrivate *priv = g_paste_ui_history_action_get_instance_private (G_PASTE_UI_HISTORY_ACTION (object)); g_clear_object (&priv->client); g_clear_object (&priv->settings); G_OBJECT_CLASS (g_paste_ui_history_action_parent_class)->dispose (object); } static void g_paste_ui_history_action_finalize (GObject *object) { const GPasteUiHistoryActionPrivate *priv = _g_paste_ui_history_action_get_instance_private (G_PASTE_UI_HISTORY_ACTION (object)); g_free (priv->history); G_OBJECT_CLASS (g_paste_ui_history_action_parent_class)->finalize (object); } static void g_paste_ui_history_action_class_init (GPasteUiHistoryActionClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = g_paste_ui_history_action_dispose; object_class->finalize = g_paste_ui_history_action_finalize; GTK_WIDGET_CLASS (klass)->button_press_event = g_paste_ui_history_action_button_press_event; } static void g_paste_ui_history_action_init (GPasteUiHistoryAction *self) { GtkWidget *button = GTK_WIDGET (self); gtk_widget_set_margin_start (button, 5); gtk_widget_set_margin_end (button, 5); } /** * g_paste_ui_history_action_new: * @type: the type of the subclass to instantiate * @client: a #GPasteClient * @settings: a #GPasteSettings * @actions: a #GPasteUiHistoryActions * @rootwin: the main #GtkWindow * * Create a new instance of #GPasteUiHistoryAction * * Returns: a newly allocated #GPasteUiHistoryAction * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_history_action_new (GType type, GPasteClient *client, GPasteSettings *settings, GtkWidget *actions, GtkWindow *rootwin, const gchar *label) { g_return_val_if_fail (g_type_is_a (type, G_PASTE_TYPE_UI_HISTORY_ACTION), NULL); g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); g_return_val_if_fail (_G_PASTE_IS_UI_HISTORY_ACTIONS (actions), NULL); g_return_val_if_fail (GTK_IS_WINDOW (rootwin), NULL); GtkWidget *self = gtk_widget_new (type, "width-request", 200, "height-request", 30, NULL); GPasteUiHistoryActionPrivate *priv = g_paste_ui_history_action_get_instance_private (G_PASTE_UI_HISTORY_ACTION (self)); priv->client = g_object_ref (client); priv->settings = g_object_ref (settings); priv->actions = G_PASTE_UI_HISTORY_ACTIONS (actions); priv->rootwin = rootwin; gtk_button_set_label (GTK_BUTTON (self), label); return self; } gpaste-3.42.6/src/ui/gpaste-ui-history-action.h000066400000000000000000000030641421222064600213200ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_HISTORY_ACTION_H__ #define __G_PASTE_UI_HISTORY_ACTION_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_HISTORY_ACTION (g_paste_ui_history_action_get_type ()) G_PASTE_DERIVABLE_TYPE (UiHistoryAction, ui_history_action, UI_HISTORY_ACTION, GtkButton) struct _GPasteUiHistoryActionClass { GtkButtonClass parent_class; /*< pure virtual >*/ gboolean (*activate) (GPasteUiHistoryAction *self, GPasteClient *client, GPasteSettings *settings, GtkWindow *rootwin, const gchar *history); }; void g_paste_ui_history_action_set_history (GPasteUiHistoryAction *self, const gchar *history); GtkWidget *g_paste_ui_history_action_new (GType type, GPasteClient *client, GPasteSettings *settings, GtkWidget *actions, GtkWindow *rootwin, const gchar *label); G_END_DECLS #endif /*__G_PASTE_UI_HISTORY_ACTION_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-history-actions.c000066400000000000000000000105061421222064600214750ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include #include #include "gpaste-gtk-compat.h" struct _GPasteUiHistoryActions { GtkPopover parent_instance; }; typedef struct { GPasteClient *client; GSList *actions; } GPasteUiHistoryActionsPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiHistoryActions, ui_history_actions, GTK_TYPE_POPOVER) static void action_set_history (gpointer data, gpointer user_data) { GPasteUiHistoryAction *action = data; const gchar *history = user_data; g_paste_ui_history_action_set_history (action, history); } /** * g_paste_ui_history_actions_set_relative_to: * @self: the #GPasteUiHistoryActions * @history: (nullable): a #GPasteUiPanelHistory instance * * Set which history we'll deal with */ G_PASTE_VISIBLE void g_paste_ui_history_actions_set_relative_to (GPasteUiHistoryActions *self, GPasteUiPanelHistory *history) { g_return_if_fail (_G_PASTE_IS_UI_HISTORY_ACTIONS (self)); g_return_if_fail (!history || _G_PASTE_IS_UI_PANEL_HISTORY (history)); const GPasteUiHistoryActionsPrivate *priv = _g_paste_ui_history_actions_get_instance_private (self); const gchar *h = (history) ? g_paste_ui_panel_history_get_history (history) : NULL; g_slist_foreach (priv->actions, action_set_history, (gpointer) h); if (history) gtk_popover_set_relative_to (GTK_POPOVER (self), GTK_WIDGET (history)); else gtk_widget_hide (GTK_WIDGET (self)); } static void add_action_to_box (gpointer data, gpointer user_data) { GtkContainer *box = user_data; GtkWidget *action = data; gtk_container_add (box, action); } static void g_paste_ui_history_actions_dispose (GObject *object) { GPasteUiHistoryActionsPrivate *priv = g_paste_ui_history_actions_get_instance_private (G_PASTE_UI_HISTORY_ACTIONS (object)); g_clear_object (&priv->client); G_OBJECT_CLASS (g_paste_ui_history_actions_parent_class)->dispose (object); } static void g_paste_ui_history_actions_class_init (GPasteUiHistoryActionsClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_ui_history_actions_dispose; } static void g_paste_ui_history_actions_init (GPasteUiHistoryActions *self G_GNUC_UNUSED) { } /** * g_paste_ui_history_actions_new: * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @rootwin: the root #GtkWindow * * Create a new instance of #GPasteUiHistoryActions * * Returns: a newly allocated #GPasteUiHistoryActions * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_history_actions_new (GPasteClient *client, GPasteSettings *settings, GtkWindow *rootwin) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); g_return_val_if_fail (GTK_IS_WINDOW (rootwin), NULL); GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_UI_HISTORY_ACTIONS, "width-request", 200, "height-request", 40, NULL); GPasteUiHistoryActionsPrivate *priv = g_paste_ui_history_actions_get_instance_private (G_PASTE_UI_HISTORY_ACTIONS (self)); GtkWidget *box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2); GtkWidget *backup = g_paste_ui_backup_history_new (client, settings, self, rootwin); GtkWidget *delete = g_paste_ui_delete_history_new (client, settings, self, rootwin); GtkWidget *empty = g_paste_ui_empty_history_new (client, settings, self, rootwin); priv->client = g_object_ref (client); priv->actions = g_slist_append (priv->actions, backup); priv->actions = g_slist_append (priv->actions, empty); priv->actions = g_slist_append (priv->actions, delete); gtk_popover_set_position (GTK_POPOVER (self), GTK_POS_RIGHT); g_slist_foreach (priv->actions, add_action_to_box, box); gtk_widget_set_margin_top (box, 5); gtk_widget_set_margin_bottom (box, 5); gtk_widget_show_all (box); gtk_container_add (GTK_CONTAINER (self), box); return self; } gpaste-3.42.6/src/ui/gpaste-ui-history-actions.h000066400000000000000000000017661421222064600215120ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_HISTORY_ACTIONS_H__ #define __G_PASTE_UI_HISTORY_ACTIONS_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_HISTORY_ACTIONS (g_paste_ui_history_actions_get_type ()) G_PASTE_FINAL_TYPE (UiHistoryActions, ui_history_actions, UI_HISTORY_ACTIONS, GtkPopover) void g_paste_ui_history_actions_set_relative_to (GPasteUiHistoryActions *self, GPasteUiPanelHistory *history); GtkWidget *g_paste_ui_history_actions_new (GPasteClient *client, GPasteSettings *settings, GtkWindow *rootwin); G_END_DECLS #endif /*__G_PASTE_UI_HISTORY_ACTIONS_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-history.c000066400000000000000000000315541421222064600200450ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include #include #include #include "gpaste-gtk-compat.h" struct _GPasteUiHistory { GtkListBox parent_instance; }; enum { C_SIZE, C_UPDATE, C_LAST_SIGNAL }; typedef struct { GPasteClient *client; GPasteSettings *settings; GPasteUiPanel *panel; GPasteUiEmptyItem *dummy_item; GtkWindow *rootwin; GSList *items; guint64 size; gint32 item_height; gchar *search; GStrv search_results; guint64 c_signals[C_LAST_SIGNAL]; } GPasteUiHistoryPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiHistory, ui_history, GTK_TYPE_LIST_BOX) static void on_row_activated (GtkListBox *history G_GNUC_UNUSED, GtkListBoxRow *row) { g_paste_ui_item_activate (G_PASTE_UI_ITEM (row)); } static void g_paste_ui_history_add_item (gpointer data, gpointer user_data) { GtkContainer *self = user_data; GtkWidget *item = data; g_object_ref (item); gtk_container_add (self, item); gtk_widget_show_all (item); } static void g_paste_ui_history_add_list (GtkContainer *self, GSList *list) { g_slist_foreach (list, g_paste_ui_history_add_item, self); } static void g_paste_ui_history_remove (gpointer data, gpointer user_data) { GtkWidget *item = data; GtkContainer *self = user_data; gtk_container_remove (self, item); g_object_unref (item); } static void g_paste_ui_history_drop_list (GtkContainer *self, GSList *list) { g_slist_foreach (list, g_paste_ui_history_remove, self); g_slist_free (list); } static void g_paste_ui_history_refresh (GPasteUiHistory *self, guint64 from_index); static void g_paste_ui_history_update_height_request (GPasteSettings *settings, const gchar *key G_GNUC_UNUSED, gpointer user_data) { GPasteUiHistory *self = user_data; const GPasteUiHistoryPrivate *priv = _g_paste_ui_history_get_instance_private (self); guint64 new_size = g_paste_settings_get_max_displayed_history_size (settings); if (priv->item_height) g_object_set (G_OBJECT (self), "height-request", new_size * priv->item_height, NULL); if (new_size != priv->size) g_paste_ui_history_refresh (self, 0); } typedef struct { GPasteUiHistory *self; gchar *name; guint64 from_index; } OnUpdateCallbackData; static void g_paste_ui_history_refresh_history (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { g_autofree OnUpdateCallbackData *data = user_data; g_autofree gchar *name = data->name; GPasteUiHistory *self = data->self; GPasteUiHistoryPrivate *priv = g_paste_ui_history_get_instance_private (self); guint64 old_size = priv->size; guint64 refreshTextBound = old_size; guint64 new_size = g_paste_client_get_history_size_finish (priv->client, res, NULL); guint64 max_size = g_paste_settings_get_max_displayed_history_size (priv->settings); priv->size = MIN (new_size, max_size); if (priv->size) gtk_widget_hide (GTK_WIDGET (priv->dummy_item)); else g_paste_ui_empty_item_show_empty (priv->dummy_item); g_paste_ui_panel_update_history_length (priv->panel, name, new_size); if (old_size < priv->size) { for (guint64 i = old_size; i < priv->size; ++i) { GtkWidget *item = g_paste_ui_item_new (priv->client, priv->settings, priv->rootwin, i); priv->items = g_slist_append (priv->items, item); } g_paste_ui_history_add_list (GTK_CONTAINER (self), g_slist_nth (priv->items, old_size)); refreshTextBound = old_size; } else if (old_size > priv->size) { if (priv->size) { GSList *last = g_slist_nth (priv->items, priv->size - 1); g_return_if_fail (last); g_paste_ui_history_drop_list (GTK_CONTAINER (self), g_slist_next (last)); last->next = NULL; } else { g_paste_ui_history_drop_list (GTK_CONTAINER (self), priv->items); priv->items = NULL; } refreshTextBound = priv->size; } GSList *item = priv->items; for (guint64 i = 0; i < data->from_index; ++i) item = g_slist_next (item); for (guint64 i = data->from_index; i < refreshTextBound && item; ++i, item = g_slist_next (item)) g_paste_ui_item_set_index (item->data, i); if (!priv->item_height) { gtk_widget_measure (GTK_WIDGET ((priv->items) ? priv->items->data : priv->dummy_item), GTK_ORIENTATION_VERTICAL, -1, NULL, &priv->item_height, NULL, NULL); g_paste_ui_history_update_height_request (priv->settings, NULL, self); } } static void on_name_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { OnUpdateCallbackData *data = user_data; const GPasteUiHistoryPrivate *priv = _g_paste_ui_history_get_instance_private (data->self); data->name = g_paste_client_get_history_name_finish (priv->client, res, NULL); g_paste_client_get_history_size (priv->client, data->name, g_paste_ui_history_refresh_history, data); } static void g_paste_ui_history_refresh (GPasteUiHistory *self, guint64 from_index) { const GPasteUiHistoryPrivate *priv = _g_paste_ui_history_get_instance_private (self); if (priv->search) { g_paste_ui_history_search (self, priv->search); } else { OnUpdateCallbackData *data = g_new (OnUpdateCallbackData, 1); data->self = self; data->from_index = from_index; g_paste_client_get_history_name (priv->client, on_name_ready, data); } } static void on_search_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { GPasteUiHistory *self = user_data; GPasteUiHistoryPrivate *priv = g_paste_ui_history_get_instance_private (self); GSList *item = priv->items; g_clear_pointer (&priv->search_results, g_strfreev); priv->search_results = g_paste_client_search_finish (priv->client, res, NULL /* error */); guint64 search_results_size = g_strv_length (priv->search_results); if (priv->search_results) { if (search_results_size > priv->size) search_results_size = priv->size; for (guint64 i = 0; i < search_results_size; ++i, item = g_slist_next (item)) g_paste_ui_item_set_uuid (item->data, priv->search_results[i]); } else { g_paste_ui_empty_item_show_no_result (priv->dummy_item); } for (guint64 i = search_results_size; i < priv->size; ++i, item = g_slist_next (item)) g_paste_ui_item_set_index (item->data, (guint64) -1); } /** * g_paste_ui_history_search: * @self: a #GPasteUiHistory instance * @search: the search * * Apply a search to a #GPasteUiHistory instance */ G_PASTE_VISIBLE void g_paste_ui_history_search (GPasteUiHistory *self, const gchar *search) { g_return_if_fail (_G_PASTE_IS_UI_HISTORY (self)); GPasteUiHistoryPrivate *priv = g_paste_ui_history_get_instance_private (self); if (g_paste_str_equal (search, "")) { g_clear_pointer (&priv->search, g_free); g_clear_pointer (&priv->search_results, g_strfreev); g_paste_ui_history_refresh (self, 0); } else { if (search != priv->search) { g_free (priv->search); priv->search = g_strdup (search); } g_paste_client_search (priv->client, search, on_search_ready, self); } } /** * g_paste_ui_history_select_first: * @self: a #GPasteUiHistory instance * * Select the first element * * returns: whether anything was selected or not */ G_PASTE_VISIBLE gboolean g_paste_ui_history_select_first (GPasteUiHistory *self) { g_return_val_if_fail (_G_PASTE_IS_UI_HISTORY (self), FALSE); GPasteUiHistoryPrivate *priv = g_paste_ui_history_get_instance_private (self); if (!priv->items) return FALSE; return g_paste_ui_item_activate (priv->items->data); } static void g_paste_ui_history_on_update (GPasteClient *client G_GNUC_UNUSED, GPasteUpdateAction action, GPasteUpdateTarget target, guint64 position, gpointer user_data) { GPasteUiHistory *self = user_data; const GPasteUiHistoryPrivate *priv = _g_paste_ui_history_get_instance_private (self); gboolean refresh = FALSE; switch (target) { case G_PASTE_UPDATE_TARGET_ALL: refresh = TRUE; break; case G_PASTE_UPDATE_TARGET_POSITION: switch (action) { case G_PASTE_UPDATE_ACTION_REPLACE: g_paste_ui_item_refresh (g_slist_nth_data (priv->items, position)); break; case G_PASTE_UPDATE_ACTION_REMOVE: refresh = TRUE; break; default: g_assert_not_reached (); } break; default: g_assert_not_reached (); } if (refresh) g_paste_ui_history_refresh (self, position); } static void g_paste_ui_history_dispose (GObject *object) { GPasteUiHistoryPrivate *priv = g_paste_ui_history_get_instance_private (G_PASTE_UI_HISTORY (object)); if (priv->settings) { g_signal_handler_disconnect (priv->settings, priv->c_signals[C_SIZE]); g_clear_object (&priv->settings); } if (priv->client) { g_signal_handler_disconnect (priv->client, priv->c_signals[C_UPDATE]); g_clear_object (&priv->client); } G_OBJECT_CLASS (g_paste_ui_history_parent_class)->dispose (object); } static void g_paste_ui_history_finalize (GObject *object) { const GPasteUiHistoryPrivate *priv = _g_paste_ui_history_get_instance_private (G_PASTE_UI_HISTORY (object)); g_free (priv->search); g_strfreev (priv->search_results); G_OBJECT_CLASS (g_paste_ui_history_parent_class)->finalize (object); } static void g_paste_ui_history_class_init (GPasteUiHistoryClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = g_paste_ui_history_dispose; object_class->finalize = g_paste_ui_history_finalize; GTK_LIST_BOX_CLASS (klass)->row_activated = on_row_activated; } static void g_paste_ui_history_init (GPasteUiHistory *self G_GNUC_UNUSED) { } /** * g_paste_ui_history_new: * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @panel: the #GPasteSettingsUiPanel * @rootwin: the root #GtkWindow * * Create a new instance of #GPasteUiHistory * * Returns: a newly allocated #GPasteUiHistory * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_history_new (GPasteClient *client, GPasteSettings *settings, GPasteUiPanel *panel, GtkWindow *rootwin) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); g_return_val_if_fail (_G_PASTE_IS_UI_PANEL (panel), NULL); g_return_val_if_fail (GTK_IS_WINDOW (rootwin), NULL); GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_UI_HISTORY, NULL); GPasteUiHistoryPrivate *priv = g_paste_ui_history_get_instance_private (G_PASTE_UI_HISTORY (self)); GtkWidget *dummy_item = g_paste_ui_empty_item_new (client, settings, rootwin); priv->client = g_object_ref (client); priv->settings = g_object_ref (settings); priv->dummy_item = G_PASTE_UI_EMPTY_ITEM (dummy_item); priv->panel = panel; priv->rootwin = rootwin; gtk_container_add (GTK_CONTAINER (self), dummy_item); priv->c_signals[C_SIZE] = g_signal_connect (settings, "changed::" G_PASTE_MAX_DISPLAYED_HISTORY_SIZE_SETTING, G_CALLBACK (g_paste_ui_history_update_height_request), self); priv->c_signals[C_UPDATE] = g_signal_connect (client, "update", G_CALLBACK (g_paste_ui_history_on_update), self); g_paste_ui_history_on_update (client, G_PASTE_UPDATE_ACTION_REPLACE, G_PASTE_UPDATE_TARGET_ALL, 0, self); return self; } gpaste-3.42.6/src/ui/gpaste-ui-history.h000066400000000000000000000017061421222064600200460ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_HISTORY_H__ #define __G_PASTE_UI_HISTORY_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_HISTORY (g_paste_ui_history_get_type ()) G_PASTE_FINAL_TYPE (UiHistory, ui_history, UI_HISTORY, GtkListBox) void g_paste_ui_history_search (GPasteUiHistory *self, const gchar *search); gboolean g_paste_ui_history_select_first (GPasteUiHistory *self); GtkWidget *g_paste_ui_history_new (GPasteClient *client, GPasteSettings *settings, GPasteUiPanel *panel, GtkWindow *rootwin); G_END_DECLS #endif /*__G_PASTE_UI_HISTORY_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-item-action.c000066400000000000000000000063101421222064600205450ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include typedef struct { GPasteClient *client; gchar *uuid; } GPasteUiItemActionPrivate; G_PASTE_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (UiItemAction, ui_item_action, GTK_TYPE_BUTTON) /** * g_paste_ui_item_action_set_uuid: * @self: a #GPasteUiItemAction instance * @uuid: the uuid of the corresponding item * * Track a new uuid */ G_PASTE_VISIBLE void g_paste_ui_item_action_set_uuid (GPasteUiItemAction *self, const gchar *uuid) { g_return_if_fail (_G_PASTE_IS_UI_ITEM_ACTION (self)); GPasteUiItemActionPrivate *priv = g_paste_ui_item_action_get_instance_private (self); g_autofree gchar *old_uuid = priv->uuid; priv->uuid = g_strdup (uuid); } static gboolean g_paste_ui_item_action_button_press_event (GtkWidget *widget, GdkEventButton *event G_GNUC_UNUSED) { GPasteUiItemAction *self = G_PASTE_UI_ITEM_ACTION (widget); const GPasteUiItemActionPrivate *priv = _g_paste_ui_item_action_get_instance_private (self); GPasteUiItemActionClass *klass = G_PASTE_UI_ITEM_ACTION_GET_CLASS (self); if (klass->activate) klass->activate (self, priv->client, priv->uuid); return TRUE; } static void g_paste_ui_item_action_dispose (GObject *object) { GPasteUiItemActionPrivate *priv = g_paste_ui_item_action_get_instance_private (G_PASTE_UI_ITEM_ACTION (object)); g_clear_object (&priv->client); g_clear_pointer (&priv->uuid, g_free); G_OBJECT_CLASS (g_paste_ui_item_action_parent_class)->dispose (object); } static void g_paste_ui_item_action_class_init (GPasteUiItemActionClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_ui_item_action_dispose; GTK_WIDGET_CLASS (klass)->button_press_event = g_paste_ui_item_action_button_press_event; } static void g_paste_ui_item_action_init (GPasteUiItemAction *self G_GNUC_UNUSED) { } /** * g_paste_ui_item_action_new: * @type: the type of the subclass to instantiate * @client: a #GPasteClient * @icon_name: the name of the icon to use * @tooltip: the tooltip to display * * Create a new instance of #GPasteUiItemAction * * Returns: a newly allocated #GPasteUiItemAction * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_item_action_new (GType type, GPasteClient *client, const gchar *icon_name, const gchar *tooltip) { g_return_val_if_fail (g_type_is_a (type, G_PASTE_TYPE_UI_ITEM_ACTION), NULL); g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); GtkWidget *self = gtk_widget_new (type, NULL); GPasteUiItemActionPrivate *priv = g_paste_ui_item_action_get_instance_private (G_PASTE_UI_ITEM_ACTION (self)); GtkWidget *icon = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU); priv->client = g_object_ref (client); gtk_widget_set_tooltip_text (self, tooltip); gtk_widget_set_margin_start (icon, 5); gtk_widget_set_margin_end (icon, 5); gtk_container_add (GTK_CONTAINER (self), icon); return self; } gpaste-3.42.6/src/ui/gpaste-ui-item-action.h000066400000000000000000000022571421222064600205600ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_ITEM_ACTION_H__ #define __G_PASTE_UI_ITEM_ACTION_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_ITEM_ACTION (g_paste_ui_item_action_get_type ()) G_PASTE_DERIVABLE_TYPE (UiItemAction, ui_item_action, UI_ITEM_ACTION, GtkButton) struct _GPasteUiItemActionClass { GtkButtonClass parent_class; /*< pure virtual >*/ void (*activate) (GPasteUiItemAction *self, GPasteClient *client, const gchar *uuid); }; void g_paste_ui_item_action_set_uuid (GPasteUiItemAction *self, const gchar *uuid); GtkWidget *g_paste_ui_item_action_new (GType type, GPasteClient *client, const gchar *icon_name, const gchar *tooltip); G_END_DECLS #endif /*__G_PASTE_UI_ITEM_ACTION_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-item-skeleton.c000066400000000000000000000246621421222064600211260ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include #include #include #include "gpaste-gtk-compat.h" enum { C_SIZE, C_LAST_SIGNAL }; typedef struct { GPasteSettings *settings; GSList *actions; GtkWidget *edit; GtkWidget *upload; GtkLabel *index_label; GtkLabel *label; gboolean editable; gboolean uploadable; guint64 c_signals[C_LAST_SIGNAL]; } GPasteUiItemSkeletonPrivate; G_PASTE_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (UiItemSkeleton, ui_item_skeleton, GTK_TYPE_LIST_BOX_ROW) static void g_paste_ui_item_skeleton_set_text_size (GPasteSettings *settings, const gchar *key G_GNUC_UNUSED, gpointer user_data) { GPasteUiItemSkeletonPrivate *priv = user_data; guint64 size = g_paste_settings_get_element_size (settings); gtk_label_set_width_chars (priv->label, size); gtk_label_set_max_width_chars (priv->label, size); } static void action_set_activatable (gpointer data, gpointer user_data) { GtkWidget *w = data; gboolean *a = user_data; gtk_widget_set_sensitive (w, *a); } /** * g_paste_ui_item_skeleton_set_activatable: * @self: the #GPasteUiItemSkeleton instance * @activatable: whether the item should now be activatable or not * * Mark the item as being activatable or not */ G_PASTE_VISIBLE void g_paste_ui_item_skeleton_set_activatable (GPasteUiItemSkeleton *self, gboolean activatable) { g_return_if_fail (_G_PASTE_IS_UI_ITEM_SKELETON (self)); const GPasteUiItemSkeletonPrivate *priv = _g_paste_ui_item_skeleton_get_instance_private (self); gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (self), activatable); gtk_widget_set_sensitive (GTK_WIDGET (priv->label), activatable); g_slist_foreach (priv->actions, action_set_activatable, &activatable); if (priv->edit) gtk_widget_set_sensitive (priv->edit, activatable && priv->editable); if (priv->upload) gtk_widget_set_sensitive (priv->upload, activatable && priv->uploadable); } /** * g_paste_ui_item_skeleton_set_editable: * @self: the #GPasteUiItemSkeleton instance * @editable: whether the item should now be editable or not * * Mark the item as being editable or not */ G_PASTE_VISIBLE void g_paste_ui_item_skeleton_set_editable (GPasteUiItemSkeleton *self, gboolean editable) { g_return_if_fail (_G_PASTE_IS_UI_ITEM_SKELETON (self)); GPasteUiItemSkeletonPrivate *priv = g_paste_ui_item_skeleton_get_instance_private (self); priv->editable = editable; gtk_widget_set_sensitive (priv->edit, editable); } /** * g_paste_ui_item_skeleton_set_uploadable: * @self: the #GPasteUiItemSkeleton instance * @uploadable: whether the item should now be uploadable or not * * Mark the item as being uploadable or not */ G_PASTE_VISIBLE void g_paste_ui_item_skeleton_set_uploadable (GPasteUiItemSkeleton *self, gboolean uploadable) { g_return_if_fail (_G_PASTE_IS_UI_ITEM_SKELETON (self)); GPasteUiItemSkeletonPrivate *priv = g_paste_ui_item_skeleton_get_instance_private (self); priv->uploadable = uploadable; gtk_widget_set_sensitive (priv->upload, uploadable); } /** * g_paste_ui_item_skeleton_set_text: * @self: the #GPasteUiItemSkeleton instance * @text: the new text for the label * * Changes the displayed text */ G_PASTE_VISIBLE void g_paste_ui_item_skeleton_set_text (GPasteUiItemSkeleton *self, const gchar *text) { g_return_if_fail (_G_PASTE_IS_UI_ITEM_SKELETON (self)); g_return_if_fail (g_utf8_validate (text, -1, NULL)); const GPasteUiItemSkeletonPrivate *priv = _g_paste_ui_item_skeleton_get_instance_private (self); gtk_label_set_text (priv->label, text); } /** * g_paste_ui_item_skeleton_set_markup: * @self: the #GPasteUiItemSkeleton instance * @markup: the new markup for the label * * Changes the displayed markup */ G_PASTE_VISIBLE void g_paste_ui_item_skeleton_set_markup (GPasteUiItemSkeleton *self, const gchar *markup) { g_return_if_fail (_G_PASTE_IS_UI_ITEM_SKELETON (self)); g_return_if_fail (g_utf8_validate (markup, -1, NULL)); const GPasteUiItemSkeletonPrivate *priv = _g_paste_ui_item_skeleton_get_instance_private (self); gtk_label_set_markup (priv->label, markup); } static void action_set_uuid (gpointer data, gpointer user_data) { GPasteUiItemAction *a = data; const gchar *uuid = user_data; g_paste_ui_item_action_set_uuid (a, uuid); } /** * g_paste_ui_item_skeleton_set_index_and_uuid: * @self: the #GPasteUiItemSkeleton instance * @index: the index of the new item to display * @uuid: the uuid of the new item to display * * Changes the displayed item */ G_PASTE_VISIBLE void g_paste_ui_item_skeleton_set_index_and_uuid (GPasteUiItemSkeleton *self, guint64 index, const gchar *uuid) { g_return_if_fail (_G_PASTE_IS_UI_ITEM_SKELETON (self)); const GPasteUiItemSkeletonPrivate *priv = _g_paste_ui_item_skeleton_get_instance_private (self); if (index == (guint64) -1 || index == (guint64) -2) { gtk_label_set_text (priv->index_label, ""); } else { g_autofree gchar *_index = g_strdup_printf("%" G_GUINT64_FORMAT, index); gtk_label_set_text (priv->index_label, _index); } g_slist_foreach (priv->actions, action_set_uuid, (gpointer) uuid); } /** * g_paste_ui_item_skeleton_get_label: * @self: the #GPasteUiItemSkeleton instance * * Get the inner label * * Returns: (transfer none): The inner #GtkLabel */ G_PASTE_VISIBLE GtkLabel * g_paste_ui_item_skeleton_get_label (GPasteUiItemSkeleton *self) { g_return_val_if_fail (_G_PASTE_IS_UI_ITEM_SKELETON (self), NULL); const GPasteUiItemSkeletonPrivate *priv = _g_paste_ui_item_skeleton_get_instance_private (self); return priv->label; } static void add_action (gpointer data, gpointer user_data) { GtkWidget *w = data; GtkBox *b =user_data; gtk_widget_set_halign (w, TRUE); gtk_box_pack_end (b, w); } static void g_paste_ui_item_skeleton_dispose (GObject *object) { GPasteUiItemSkeletonPrivate *priv = g_paste_ui_item_skeleton_get_instance_private (G_PASTE_UI_ITEM_SKELETON (object)); if (priv->settings) { g_signal_handler_disconnect (priv->settings, priv->c_signals[C_SIZE]); g_clear_object (&priv->settings); } G_OBJECT_CLASS (g_paste_ui_item_skeleton_parent_class)->dispose (object); } static void g_paste_ui_item_skeleton_class_init (GPasteUiItemSkeletonClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_ui_item_skeleton_dispose; } static void g_paste_ui_item_skeleton_init (GPasteUiItemSkeleton *self) { GPasteUiItemSkeletonPrivate *priv = g_paste_ui_item_skeleton_get_instance_private (self); GtkWidget *index_label = gtk_label_new (""); GtkWidget *label = gtk_label_new (""); priv->index_label = GTK_LABEL (index_label); priv->label = GTK_LABEL (label); priv->editable = TRUE; gtk_widget_set_margin_start (index_label, 5); gtk_widget_set_margin_end (index_label, 5); gtk_widget_set_margin_top (index_label, 5); gtk_widget_set_margin_bottom (index_label, 5); gtk_widget_set_sensitive (index_label, FALSE); gtk_label_set_xalign (priv->index_label, 1.0); gtk_label_set_width_chars (priv->index_label, 3); gtk_label_set_max_width_chars (priv->index_label, 3); gtk_label_set_selectable (priv->index_label, FALSE); gtk_label_set_ellipsize (priv->label, PANGO_ELLIPSIZE_END); gtk_label_set_xalign (priv->label, 0.0); GtkWidget *hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2); gtk_widget_set_margin_start (hbox, 5); gtk_widget_set_margin_end (hbox, 5); gtk_widget_set_halign (index_label, TRUE); gtk_box_pack_start (GTK_BOX (hbox), index_label, FALSE, TRUE); gtk_widget_set_hexpand (label, TRUE); gtk_widget_set_halign (label, TRUE); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE); gtk_container_add (GTK_CONTAINER (self), hbox); } /** * g_paste_ui_item_skeleton_new: * @type: the type of the subclass * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @rootwin: the root #GtkWindow * * Create a new instance of #GPasteUiItemSkeleton * * Returns: a newly allocated #GPasteUiItemSkeleton * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_item_skeleton_new (GType type, GPasteClient *client, GPasteSettings *settings, GtkWindow *rootwin) { g_return_val_if_fail (g_type_is_a (type, G_PASTE_TYPE_UI_ITEM_SKELETON), NULL); g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); g_return_val_if_fail (GTK_IS_WINDOW (rootwin), NULL); GtkWidget *self = gtk_widget_new (type, "selectable", FALSE, NULL); GPasteUiItemSkeletonPrivate *priv = g_paste_ui_item_skeleton_get_instance_private (G_PASTE_UI_ITEM_SKELETON (self)); GtkWidget *edit = g_paste_ui_edit_item_new (client, rootwin); GtkWidget *upload = g_paste_ui_upload_item_new (client); GtkWidget *delete = g_paste_ui_delete_item_new (client); priv->settings = g_object_ref (settings); priv->edit = edit; priv->upload = upload; priv->actions = g_slist_prepend (priv->actions, edit); priv->actions = g_slist_prepend (priv->actions, upload); priv->actions = g_slist_prepend (priv->actions, delete); g_slist_foreach (priv->actions, add_action, gtk_bin_get_child (GTK_BIN (self))); priv->c_signals[C_SIZE] = g_signal_connect (settings, "changed::" G_PASTE_ELEMENT_SIZE_SETTING, G_CALLBACK (g_paste_ui_item_skeleton_set_text_size), priv); g_paste_ui_item_skeleton_set_text_size (settings, NULL, priv); return self; } gpaste-3.42.6/src/ui/gpaste-ui-item-skeleton.h000066400000000000000000000037631421222064600211320ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_ITEM_SKELETON_H__ #define __G_PASTE_UI_ITEM_SKELETON_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_ITEM_SKELETON (g_paste_ui_item_skeleton_get_type ()) G_PASTE_DERIVABLE_TYPE (UiItemSkeleton, ui_item_skeleton, UI_ITEM_SKELETON, GtkListBoxRow) struct _GPasteUiItemSkeletonClass { GtkListBoxRowClass parent_class; }; void g_paste_ui_item_skeleton_set_activatable (GPasteUiItemSkeleton *self, gboolean activatable); void g_paste_ui_item_skeleton_set_editable (GPasteUiItemSkeleton *self, gboolean editable); void g_paste_ui_item_skeleton_set_uploadable (GPasteUiItemSkeleton *self, gboolean uploadable); void g_paste_ui_item_skeleton_set_text (GPasteUiItemSkeleton *self, const gchar *text); void g_paste_ui_item_skeleton_set_markup (GPasteUiItemSkeleton *self, const gchar *markup); void g_paste_ui_item_skeleton_set_index_and_uuid (GPasteUiItemSkeleton *self, guint64 index, const gchar *uuid); GtkLabel *g_paste_ui_item_skeleton_get_label (GPasteUiItemSkeleton *self); GtkWidget *g_paste_ui_item_skeleton_new (GType type, GPasteClient *client, GPasteSettings *settings, GtkWindow *rootwin); G_END_DECLS #endif /*__G_PASTE_UI_ITEM_SKELETON_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-item.c000066400000000000000000000171671421222064600173060ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include struct _GPasteUiItem { GPasteUiItemSkeleton parent_instance; }; typedef struct { GPasteClient *client; GPasteSettings *settings; GtkWindow *rootwin; guint64 index; gboolean fake_index; gchar *uuid; guint64 size_id; } GPasteUiItemPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiItem, ui_item, G_PASTE_TYPE_UI_ITEM_SKELETON) /** * g_paste_ui_item_activate: * @self: a #GPasteUiItem instance * * Activate/Select the item * * returns: whether there was anything to select or not */ G_PASTE_VISIBLE gboolean g_paste_ui_item_activate (GPasteUiItem *self) { g_return_val_if_fail (_G_PASTE_IS_UI_ITEM (self), FALSE); const GPasteUiItemPrivate *priv = _g_paste_ui_item_get_instance_private (self); if (!priv->uuid) return FALSE; g_paste_client_select (priv->client, priv->uuid, NULL, NULL); if (g_paste_settings_get_close_on_select (priv->settings)) gtk_window_close (priv->rootwin); /* Exit the application */ return TRUE; } static void g_paste_ui_item_on_kind_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { GPasteUiItem *self = user_data; const GPasteUiItemPrivate *priv = _g_paste_ui_item_get_instance_private (self); g_autoptr (GError) error = NULL; GPasteItemKind kind = g_paste_client_get_element_kind_finish (priv->client, res, &error); if (error) return; GPasteUiItemSkeleton *sk = G_PASTE_UI_ITEM_SKELETON (self); g_paste_ui_item_skeleton_set_editable (sk, kind == G_PASTE_ITEM_KIND_TEXT); g_paste_ui_item_skeleton_set_uploadable (sk, kind == G_PASTE_ITEM_KIND_TEXT); } static void _g_paste_ui_item_ready (GPasteUiItem *self, const gchar *txt) { GPasteUiItemPrivate *priv = g_paste_ui_item_get_instance_private (self); g_autofree gchar *oneline = g_paste_util_replace (txt, "\n", " "); g_paste_client_get_element_kind (priv->client, priv->uuid, g_paste_ui_item_on_kind_ready, self); g_paste_ui_item_skeleton_set_index_and_uuid (G_PASTE_UI_ITEM_SKELETON (self), priv->index, priv->uuid); if (!priv->index) { g_autofree gchar *markup = g_markup_printf_escaped ("%s", oneline); g_paste_ui_item_skeleton_set_markup (G_PASTE_UI_ITEM_SKELETON (self), markup); } else { g_paste_ui_item_skeleton_set_text (G_PASTE_UI_ITEM_SKELETON (self), oneline); } } static void g_paste_ui_item_on_text_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { GPasteUiItem *self = user_data; GPasteUiItemPrivate *priv = g_paste_ui_item_get_instance_private (self); g_autoptr (GError) error = NULL; g_autofree gchar *txt = g_paste_client_get_element_finish (priv->client, res, &error); if (!txt || error) return; _g_paste_ui_item_ready (self, txt); } static void g_paste_ui_item_on_item_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { GPasteUiItem *self = user_data; GPasteUiItemPrivate *priv = g_paste_ui_item_get_instance_private (self); g_autoptr (GError) error = NULL; g_autoptr (GPasteClientItem) txt = g_paste_client_get_element_at_index_finish (priv->client, res, &error); if (!txt || error) return; g_autofree gchar *uuid = priv->uuid; priv->uuid = g_strdup (g_paste_client_item_get_uuid (txt)); _g_paste_ui_item_ready (self, g_paste_client_item_get_value (txt)); } static void g_paste_ui_item_reset_text (GPasteUiItem *self) { g_return_if_fail (_G_PASTE_IS_UI_ITEM (self)); const GPasteUiItemPrivate *priv = _g_paste_ui_item_get_instance_private (self); if (priv->fake_index) g_paste_client_get_element (priv->client, priv->uuid, g_paste_ui_item_on_text_ready, self); else g_paste_client_get_element_at_index (priv->client, priv->index, g_paste_ui_item_on_item_ready, self); } /** * g_paste_ui_item_refresh: * @self: a #GPasteUiItem instance * * Refresh the item */ G_PASTE_VISIBLE void g_paste_ui_item_refresh (GPasteUiItem *self) { g_return_if_fail (_G_PASTE_IS_UI_ITEM (self)); g_paste_ui_item_reset_text (self); } static void _g_paste_ui_item_set_index (GPasteUiItem *self, guint64 index, gboolean fake_index) { GPasteUiItemPrivate *priv = g_paste_ui_item_get_instance_private (self); priv->index = index; priv->fake_index = fake_index; if (index != (guint64) -1) { g_paste_ui_item_reset_text (self); gtk_widget_show (GTK_WIDGET (self)); } else if (priv->uuid) { gtk_widget_hide (GTK_WIDGET (self)); } } /** * g_paste_ui_item_set_index: * @self: a #GPasteUiItem instance * @index: the index of the corresponding item * * Track a new index */ G_PASTE_VISIBLE void g_paste_ui_item_set_index (GPasteUiItem *self, guint64 index) { g_return_if_fail (_G_PASTE_IS_UI_ITEM (self)); _g_paste_ui_item_set_index (self, index, FALSE); } /** * g_paste_ui_item_set_uuid: * @self: a #GPasteUiItem instance * @uuid: the uuid of the corresponding item * * Track a new uuid */ G_PASTE_VISIBLE void g_paste_ui_item_set_uuid (GPasteUiItem *self, const gchar *uuid) { g_return_if_fail (_G_PASTE_IS_UI_ITEM (self)); GPasteUiItemPrivate *priv = g_paste_ui_item_get_instance_private (self); g_autofree gchar *_uuid = priv->uuid; priv->uuid = g_strdup (uuid); _g_paste_ui_item_set_index (self, (guint64) -2, TRUE); } static void g_paste_ui_item_dispose (GObject *object) { GPasteUiItemPrivate *priv = g_paste_ui_item_get_instance_private (G_PASTE_UI_ITEM (object)); g_clear_object (&priv->client); g_clear_object (&priv->settings); g_clear_pointer (&priv->uuid, g_free); G_OBJECT_CLASS (g_paste_ui_item_parent_class)->dispose (object); } static void g_paste_ui_item_class_init (GPasteUiItemClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_ui_item_dispose; } static void g_paste_ui_item_init (GPasteUiItem *self) { GPasteUiItemPrivate *priv = g_paste_ui_item_get_instance_private (G_PASTE_UI_ITEM (self)); priv->index = (guint64) -1; } /** * g_paste_ui_item_new: * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @rootwin: the root #GtkWindow * @index: the index of the corresponding item * * Create a new instance of #GPasteUiItem * * Returns: a newly allocated #GPasteUiItem * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_item_new (GPasteClient *client, GPasteSettings *settings, GtkWindow *rootwin, guint64 index) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); g_return_val_if_fail (GTK_IS_WINDOW (rootwin), NULL); GtkWidget *self = g_paste_ui_item_skeleton_new (G_PASTE_TYPE_UI_ITEM, client, settings, rootwin); GPasteUiItemPrivate *priv = g_paste_ui_item_get_instance_private (G_PASTE_UI_ITEM (self)); priv->client = g_object_ref (client); priv->settings = g_object_ref (settings); priv->rootwin = rootwin; g_paste_ui_item_set_index (G_PASTE_UI_ITEM (self), index); return self; } gpaste-3.42.6/src/ui/gpaste-ui-item.h000066400000000000000000000021311421222064600172740ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_ITEM_H__ #define __G_PASTE_UI_ITEM_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_ITEM (g_paste_ui_item_get_type ()) G_PASTE_FINAL_TYPE (UiItem, ui_item, UI_ITEM, GPasteUiItemSkeleton) gboolean g_paste_ui_item_activate (GPasteUiItem *self); void g_paste_ui_item_refresh (GPasteUiItem *self); void g_paste_ui_item_set_index (GPasteUiItem *self, guint64 index); void g_paste_ui_item_set_uuid (GPasteUiItem *self, const gchar *uuid); GtkWidget *g_paste_ui_item_new (GPasteClient *client, GPasteSettings *settings, GtkWindow *rootwin, guint64 index); G_END_DECLS #endif /*__G_PASTE_UI_ITEM_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-new-item.c000066400000000000000000000070151421222064600200640ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include "gpaste-gtk-compat.h" struct _GPasteUiNewItem { GtkButton parent_instance; }; typedef struct { GPasteClient *client; GtkWindow *rootwin; } GPasteUiNewItemPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiNewItem, ui_new_item, GTK_TYPE_BUTTON) static void g_paste_ui_new_item_clicked (GtkButton *self) { const GPasteUiNewItemPrivate *priv = _g_paste_ui_new_item_get_instance_private (G_PASTE_UI_NEW_ITEM (self)); GtkWidget *dialog = gtk_dialog_new_with_buttons (PACKAGE_STRING, priv->rootwin, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_USE_HEADER_BAR, _("New"), GTK_RESPONSE_OK, _("Cancel"), GTK_RESPONSE_CANCEL, NULL); GtkDialog *d = GTK_DIALOG (dialog); GtkWidget *text = gtk_text_view_new (); GtkTextView *tv = GTK_TEXT_VIEW (text); GtkWidget *scroll = gtk_scrolled_window_new (NULL, NULL); GtkScrolledWindow *sw = GTK_SCROLLED_WINDOW (scroll); gtk_text_view_set_wrap_mode (tv, GTK_WRAP_WORD); gtk_scrolled_window_set_min_content_height (sw, 300); gtk_scrolled_window_set_min_content_width (sw, 600); gtk_container_add (GTK_CONTAINER (sw), text); gtk_widget_set_vexpand (scroll, TRUE); gtk_widget_set_valign (scroll, TRUE); gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (d)), scroll, TRUE, TRUE); gtk_widget_show_all (scroll); if (gtk_dialog_run (d) == GTK_RESPONSE_OK) { const gchar *txt; g_object_get (G_OBJECT (gtk_text_view_get_buffer (tv)), "text", &txt, NULL); if (txt && *txt) g_paste_client_add (priv->client, txt, NULL, NULL); } gtk_widget_destroy (dialog); } static void g_paste_ui_new_item_dispose (GObject *object) { GPasteUiNewItemPrivate *priv = g_paste_ui_new_item_get_instance_private (G_PASTE_UI_NEW_ITEM (object)); g_clear_object (&priv->client); G_OBJECT_CLASS (g_paste_ui_new_item_parent_class)->dispose (object); } static void g_paste_ui_new_item_class_init (GPasteUiNewItemClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_ui_new_item_dispose; GTK_BUTTON_CLASS (klass)->clicked = g_paste_ui_new_item_clicked; } static void g_paste_ui_new_item_init (GPasteUiNewItem *self) { GtkWidget *widget = GTK_WIDGET (self); gtk_widget_set_tooltip_text (widget, _("New")); gtk_widget_set_valign (widget, GTK_ALIGN_CENTER); gtk_container_add (GTK_CONTAINER (self), gtk_image_new_from_icon_name ("document-new-symbolic", GTK_ICON_SIZE_BUTTON)); } /** * g_paste_ui_new_item_new: * @rootwin: the root #GtkWindow * @client: a #GPasteClient * * Create a new instance of #GPasteUiNewItem * * Returns: a newly allocated #GPasteUiNewItem * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_new_item_new (GtkWindow *rootwin, GPasteClient *client) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (GTK_IS_WINDOW (rootwin), NULL); GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_UI_NEW_ITEM, NULL); GPasteUiNewItemPrivate *priv = g_paste_ui_new_item_get_instance_private (G_PASTE_UI_NEW_ITEM (self)); priv->client = g_object_ref (client); priv->rootwin = rootwin; return self; } gpaste-3.42.6/src/ui/gpaste-ui-new-item.h000066400000000000000000000012341421222064600200660ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_NEW_ITEM_H__ #define __G_PASTE_UI_NEW_ITEM_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_NEW_ITEM (g_paste_ui_new_item_get_type ()) G_PASTE_FINAL_TYPE (UiNewItem, ui_new_item, UI_NEW_ITEM, GtkButton) GtkWidget *g_paste_ui_new_item_new (GtkWindow *rootwin, GPasteClient *client); G_END_DECLS #endif /*__G_PASTE_UI_NEW_ITEM_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-panel-history.c000066400000000000000000000116161421222064600211370ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include "gpaste-gtk-compat.h" struct _GPasteUiPanelHistory { GtkListBoxRow parent_instance; }; typedef struct { GPasteClient *client; GtkLabel *index_label; GtkLabel *label; gchar *history; } GPasteUiPanelHistoryPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiPanelHistory, ui_panel_history, GTK_TYPE_LIST_BOX_ROW) /** * g_paste_ui_panel_history_activate: * @self: a #GPasteUiPanelHistory instance * * Switch to this history */ G_PASTE_VISIBLE void g_paste_ui_panel_history_activate (GPasteUiPanelHistory *self) { g_return_if_fail (_G_PASTE_IS_UI_PANEL_HISTORY (self)); const GPasteUiPanelHistoryPrivate *priv = _g_paste_ui_panel_history_get_instance_private (self); g_paste_client_switch_history (priv->client, priv->history, NULL, NULL); } /** * g_paste_ui_panel_history_set_length: * @self: a #GPasteUiPanelHistory instance * @length: the length of the #GPasteHistory * * Update the index label of this history */ G_PASTE_VISIBLE void g_paste_ui_panel_history_set_length (GPasteUiPanelHistory *self, guint64 length) { g_return_if_fail (_G_PASTE_IS_UI_PANEL_HISTORY (self)); const GPasteUiPanelHistoryPrivate *priv = _g_paste_ui_panel_history_get_instance_private (self); g_autofree gchar *_length = g_strdup_printf("%" G_GUINT64_FORMAT, length); gtk_label_set_text (priv->index_label, _length); } /** * g_paste_ui_panel_history_get_history: * @self: a #GPasteUiPanelHistory instance * * Get the underlying history name * * Returns: the name of the history */ G_PASTE_VISIBLE const gchar * g_paste_ui_panel_history_get_history (const GPasteUiPanelHistory *self) { g_return_val_if_fail (_G_PASTE_IS_UI_PANEL_HISTORY (self), NULL); const GPasteUiPanelHistoryPrivate *priv = _g_paste_ui_panel_history_get_instance_private ((GPasteUiPanelHistory *) self); return priv->history; } static void on_size_ready (GObject *source_object, GAsyncResult *res, gpointer user_data) { GPasteUiPanelHistory *self = user_data; g_paste_ui_panel_history_set_length (self, g_paste_client_get_history_size_finish (G_PASTE_CLIENT (source_object), res, NULL)); } static void g_paste_ui_panel_history_dispose (GObject *object) { GPasteUiPanelHistoryPrivate *priv = g_paste_ui_panel_history_get_instance_private (G_PASTE_UI_PANEL_HISTORY (object)); g_clear_object (&priv->client); G_OBJECT_CLASS (g_paste_ui_panel_history_parent_class)->dispose (object); } static void g_paste_ui_panel_history_class_init (GPasteUiPanelHistoryClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_ui_panel_history_dispose; } static void g_paste_ui_panel_history_init (GPasteUiPanelHistory *self) { GPasteUiPanelHistoryPrivate *priv = g_paste_ui_panel_history_get_instance_private (self); GtkWidget *hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10); GtkBox *box = GTK_BOX (hbox); GtkWidget *l = gtk_label_new (""); GtkLabel *label = priv->label = GTK_LABEL (l); GtkWidget *il = gtk_label_new (""); GtkLabel *index_label = priv->index_label = GTK_LABEL (il); gtk_widget_set_sensitive (il, FALSE); gtk_label_set_xalign (index_label, 1.0); gtk_label_set_width_chars (index_label, 3); gtk_label_set_selectable (index_label, FALSE); gtk_widget_set_margin_start (hbox, 5); gtk_widget_set_margin_end (hbox, 5); gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_END); gtk_box_pack_start (box, il, FALSE, FALSE); gtk_widget_set_hexpand (l, TRUE); gtk_widget_set_halign (l, TRUE); gtk_box_pack_start (box, l, TRUE, TRUE); gtk_container_add (GTK_CONTAINER (self), hbox); } /** * g_paste_ui_panel_history_new: * @client: a #GPasteClient instance * @history: the history we represent * * Create a new instance of #GPasteUiPanelHistory * * Returns: a newly allocated #GPasteUiPanelHistory * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_panel_history_new (GPasteClient *client, const gchar *history) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (g_utf8_validate (history, -1, NULL), NULL); GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_UI_PANEL_HISTORY, "width-request", 100, "height-request", 50, NULL); GPasteUiPanelHistoryPrivate *priv = g_paste_ui_panel_history_get_instance_private (G_PASTE_UI_PANEL_HISTORY (self)); priv->client = g_object_ref (client); priv->history = g_strdup (history); gtk_label_set_text (priv->label, history); g_paste_client_get_history_size (client, history, on_size_ready, self); return self; } gpaste-3.42.6/src/ui/gpaste-ui-panel-history.h000066400000000000000000000017771421222064600211530ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_PANEL_HISTORY_H__ #define __G_PASTE_UI_PANEL_HISTORY_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_PANEL_HISTORY (g_paste_ui_panel_history_get_type ()) G_PASTE_FINAL_TYPE (UiPanelHistory, ui_panel_history, UI_PANEL_HISTORY, GtkListBoxRow) void g_paste_ui_panel_history_activate (GPasteUiPanelHistory *self); void g_paste_ui_panel_history_set_length (GPasteUiPanelHistory *self, guint64 length); const gchar *g_paste_ui_panel_history_get_history (const GPasteUiPanelHistory *self); GtkWidget *g_paste_ui_panel_history_new (GPasteClient *client, const gchar *history); G_END_DECLS #endif /*__G_PASTE_UI_PANEL_HISTORY_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-panel.c000066400000000000000000000311141421222064600174330ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include "gpaste-gtk-compat.h" struct _GPasteUiPanel { GtkBox parent_instance; }; enum { C_ACTIVATED, C_BUTTON_PRESSED, C_DELETE_HISTORY, C_EMPTY_HISTORY, C_SWITCH_ACTIVATED, C_SWITCH_CLICKED, C_SWITCH_HISTORY, C_LAST_SIGNAL }; typedef struct { GPasteClient *client; GPasteSettings *settings; GPasteUiHistoryActions *actions; GtkListBox *list_box; GtkEntry *switch_entry; GList *histories; GtkWidget *search_entry; guint64 c_signals[C_LAST_SIGNAL]; } GPasteUiPanelPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiPanel, ui_panel, GTK_TYPE_BOX) static gint32 history_equals (gconstpointer a, gconstpointer b) { return !g_paste_str_equal (b, g_paste_ui_panel_history_get_history (a)); } static GList * history_find (GList *histories, const gchar *history) { return g_list_find_custom (histories, history, history_equals); } /** * g_paste_ui_panel_update_history_length: * @self: a #GPasteUiPanel instance * @history: the history to update * @length: the new length * * Update the displayed length of the specified history */ G_PASTE_VISIBLE void g_paste_ui_panel_update_history_length (GPasteUiPanel *self, const gchar *history, guint64 length) { g_return_if_fail (_G_PASTE_IS_UI_PANEL (self)); const GPasteUiPanelPrivate *priv = _g_paste_ui_panel_get_instance_private (self); GList *h = history_find (priv->histories, history); if (h) { GPasteUiPanelHistory *hh = h->data; g_paste_ui_panel_history_set_length (hh, length); } } static void on_history_deleted (GPasteClient *client G_GNUC_UNUSED, const gchar *history, gpointer user_data) { GPasteUiPanelPrivate *priv = user_data; if (g_paste_str_equal (history, G_PASTE_DEFAULT_HISTORY)) return; GList *h = history_find (priv->histories, history); if (!h) return; priv->histories = g_list_remove_link (priv->histories, h); gtk_container_remove (GTK_CONTAINER (priv->list_box), h->data); } static void on_history_emptied (GPasteClient *client G_GNUC_UNUSED, const gchar *history, gpointer user_data) { GPasteUiPanel *self = user_data; g_paste_ui_panel_update_history_length (self, history, 0); } static void g_paste_ui_panel_add_history (GPasteUiPanelPrivate *priv, const gchar *history, gboolean select); static void on_history_switched (GPasteClient *client G_GNUC_UNUSED, const gchar *history, gpointer user_data) { GPasteUiPanelPrivate *priv = user_data; g_paste_ui_panel_add_history (priv, history, TRUE); } static void on_row_activated (GtkListBox *panel G_GNUC_UNUSED, GtkListBoxRow *row, gpointer user_data G_GNUC_UNUSED) { g_paste_ui_panel_history_activate (G_PASTE_UI_PANEL_HISTORY (row)); } static void g_paste_ui_panel_add_history (GPasteUiPanelPrivate *priv, const gchar *history, gboolean select) { GtkContainer *c = GTK_CONTAINER (priv->list_box); GList *concurrent = history_find (priv->histories, history); GtkListBoxRow *row; if (concurrent) { row = concurrent->data; } else { GtkWidget *h = g_paste_ui_panel_history_new (priv->client, history); g_object_ref (h); gtk_container_add (c, h); gtk_widget_show_all (h); priv->histories = g_list_prepend (priv->histories, h); row = GTK_LIST_BOX_ROW (h); } if (select) gtk_list_box_select_row (priv->list_box, row); } typedef struct { GPasteUiPanelPrivate *priv; gchar *name; } HistoriesData; static void on_histories_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { g_autofree HistoriesData *data = user_data; GPasteUiPanelPrivate *priv = data->priv; g_autoptr (GError) error = NULL; g_auto (GStrv) histories = g_paste_client_list_histories_finish (priv->client, res, &error); g_autofree gchar *current = data->name; g_paste_ui_panel_add_history (priv, G_PASTE_DEFAULT_HISTORY, g_paste_str_equal (G_PASTE_DEFAULT_HISTORY, current)); if (error) { g_critical ("Error while listing available histories: %s", error->message); return; } for (GStrv h = histories; *h; ++h) g_paste_ui_panel_add_history (priv, *h, g_paste_str_equal (*h, current)); } static void on_name_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { GPasteUiPanelPrivate *priv = user_data; gchar *name = g_paste_client_get_history_name_finish (priv->client, res, NULL); HistoriesData *data = g_malloc (sizeof (HistoriesData)); data->priv = priv; data->name = name; g_paste_client_list_histories (priv->client, on_histories_ready, data); } static gboolean g_paste_ui_panel_button_press_event (GtkWidget *widget G_GNUC_UNUSED, GdkEventButton *event, gpointer user_data) { GPasteUiPanelPrivate *priv = user_data; GdkEvent *_event = (GdkEvent *) event; if (gdk_event_triggers_context_menu (_event)) { gdouble y; if (!gdk_event_get_axis (_event, GDK_AXIS_Y, &y)) return FALSE; g_paste_ui_history_actions_set_relative_to (priv->actions, G_PASTE_UI_PANEL_HISTORY (gtk_list_box_get_row_at_y (priv->list_box, y))); gtk_widget_show_all (GTK_WIDGET (priv->actions)); } return FALSE; } static void g_paste_ui_panel_switch_activated (GtkEntry *entry, gpointer user_data) { GPasteUiPanelPrivate *priv = user_data; const gchar *text = gtk_entry_get_text (entry); g_paste_client_switch_history (priv->client, (text && *text) ? text : G_PASTE_DEFAULT_HISTORY, NULL, NULL); gtk_entry_set_text (entry, ""); gtk_widget_grab_focus (priv->search_entry); } static void g_paste_ui_panel_switch_clicked (GtkEntry *entry, GtkEntryIconPosition icon_pos G_GNUC_UNUSED, GdkEvent *event G_GNUC_UNUSED, gpointer user_data) { g_paste_ui_panel_switch_activated (entry, user_data); } static void g_paste_ui_panel_dispose (GObject *object) { GPasteUiPanelPrivate *priv = g_paste_ui_panel_get_instance_private (G_PASTE_UI_PANEL (object)); if (priv->c_signals[C_ACTIVATED]) { g_signal_handler_disconnect (priv->list_box, priv->c_signals[C_ACTIVATED]); g_signal_handler_disconnect (priv->list_box, priv->c_signals[C_BUTTON_PRESSED]); g_signal_handler_disconnect (priv->switch_entry, priv->c_signals[C_SWITCH_ACTIVATED]); g_signal_handler_disconnect (priv->switch_entry, priv->c_signals[C_SWITCH_CLICKED]); priv->c_signals[C_ACTIVATED] = 0; } if (priv->client) { g_signal_handler_disconnect (priv->client, priv->c_signals[C_DELETE_HISTORY]); g_signal_handler_disconnect (priv->client, priv->c_signals[C_EMPTY_HISTORY]); g_signal_handler_disconnect (priv->client, priv->c_signals[C_SWITCH_HISTORY]); g_clear_object (&priv->client); } g_clear_object (&priv->settings); G_OBJECT_CLASS (g_paste_ui_panel_parent_class)->dispose (object); } static void g_paste_ui_panel_class_init (GPasteUiPanelClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_ui_panel_dispose; } static void g_paste_ui_panel_init (GPasteUiPanel *self) { GPasteUiPanelPrivate *priv = g_paste_ui_panel_get_instance_private (self); GtkWidget *list_box = gtk_list_box_new (); GtkWidget *switch_entry = gtk_entry_new (); GtkBox *box = GTK_BOX (self); priv->list_box = GTK_LIST_BOX (list_box); priv->switch_entry = GTK_ENTRY (switch_entry); gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self)), GTK_STYLE_CLASS_SIDEBAR); gtk_entry_set_icon_from_icon_name (priv->switch_entry, GTK_ENTRY_ICON_SECONDARY, "go-jump-symbolic"); gtk_widget_set_tooltip_text (switch_entry, _("Switch to")); gtk_widget_set_margin_top (switch_entry, 5); gtk_widget_set_margin_bottom (switch_entry, 5); gtk_entry_set_placeholder_text (priv->switch_entry, G_PASTE_DEFAULT_HISTORY); priv->c_signals[C_ACTIVATED] = g_signal_connect (G_OBJECT (priv->list_box), "row-activated", G_CALLBACK (on_row_activated), NULL); priv->c_signals[C_BUTTON_PRESSED] = g_signal_connect (G_OBJECT (list_box), "button-press-event", G_CALLBACK (g_paste_ui_panel_button_press_event), priv); priv->c_signals[C_SWITCH_ACTIVATED] = g_signal_connect (G_OBJECT (switch_entry), "activate", G_CALLBACK (g_paste_ui_panel_switch_activated), priv); priv->c_signals[C_SWITCH_CLICKED] = g_signal_connect (G_OBJECT (switch_entry), "icon-press", G_CALLBACK (g_paste_ui_panel_switch_clicked), priv); gtk_widget_set_valign (list_box, TRUE); gtk_box_pack_start (box, list_box, FALSE, TRUE); gtk_box_pack_start (box, switch_entry, FALSE, FALSE); } /** * g_paste_ui_panel_new: * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @rootwin: the root #GtkWindow * @search_entry: the #GtkSearchEntry * * Create a new instance of #GPasteUiPanel * * Returns: a newly allocated #GPasteUiPanel * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_panel_new (GPasteClient *client, GPasteSettings *settings, GtkWindow *rootwin, GtkSearchEntry *search_entry) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); g_return_val_if_fail (GTK_IS_WINDOW (rootwin), NULL); g_return_val_if_fail (GTK_IS_SEARCH_ENTRY (search_entry), NULL); GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_UI_PANEL, "orientation", GTK_ORIENTATION_VERTICAL, NULL); GPasteUiPanelPrivate *priv = g_paste_ui_panel_get_instance_private (G_PASTE_UI_PANEL (self)); priv->client = g_object_ref (client); priv->settings = g_object_ref (settings); priv->actions = G_PASTE_UI_HISTORY_ACTIONS (g_paste_ui_history_actions_new (client, settings, rootwin)); priv->search_entry = GTK_WIDGET (search_entry); priv->c_signals[C_DELETE_HISTORY] = g_signal_connect (priv->client, "delete-history", G_CALLBACK (on_history_deleted), priv); priv->c_signals[C_EMPTY_HISTORY] = g_signal_connect (priv->client, "empty-history", G_CALLBACK (on_history_emptied), self); priv->c_signals[C_SWITCH_HISTORY] = g_signal_connect (priv->client, "switch-history", G_CALLBACK (on_history_switched), priv); g_paste_client_get_history_name (client, on_name_ready, priv); return self; } gpaste-3.42.6/src/ui/gpaste-ui-panel.h000066400000000000000000000017441421222064600174460ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_PANEL_H__ #define __G_PASTE_UI_PANEL_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_PANEL (g_paste_ui_panel_get_type ()) G_PASTE_FINAL_TYPE (UiPanel, ui_panel, UI_PANEL, GtkBox) void g_paste_ui_panel_update_history_length (GPasteUiPanel *self, const gchar *history, guint64 length); GtkWidget *g_paste_ui_panel_new (GPasteClient *client, GPasteSettings *settings, GtkWindow *rootwin, GtkSearchEntry *search_entry); G_END_DECLS #endif /*__G_PASTE_UI_PANEL_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-reexec.c000066400000000000000000000044251421222064600176140ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include struct _GPasteUiReexec { GtkButton parent_instance; }; typedef struct { GPasteClient *client; GtkWindow *topwin; } GPasteUiReexecPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiReexec, ui_reexec, GTK_TYPE_BUTTON) static void g_paste_ui_reexec_clicked (GtkButton *button) { const GPasteUiReexecPrivate *priv = _g_paste_ui_reexec_get_instance_private (G_PASTE_UI_REEXEC (button)); if (g_paste_util_confirm_dialog (priv->topwin, _("Restart"), _("Do you really want to restart the daemon?"))) g_paste_client_reexecute (priv->client, NULL, NULL); } static void g_paste_ui_reexec_dispose (GObject *object) { GPasteUiReexecPrivate *priv = g_paste_ui_reexec_get_instance_private (G_PASTE_UI_REEXEC (object)); g_clear_object (&priv->client); G_OBJECT_CLASS (g_paste_ui_reexec_parent_class)->dispose (object); } static void g_paste_ui_reexec_class_init (GPasteUiReexecClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_ui_reexec_dispose; GTK_BUTTON_CLASS (klass)->clicked = g_paste_ui_reexec_clicked; } static void g_paste_ui_reexec_init (GPasteUiReexec *self) { GtkWidget *widget = GTK_WIDGET (self); gtk_widget_set_tooltip_text (widget, _("Restart the daemon")); gtk_widget_set_valign (widget, GTK_ALIGN_CENTER); gtk_container_add (GTK_CONTAINER (self), gtk_image_new_from_icon_name ("view-refresh-symbolic", GTK_ICON_SIZE_BUTTON)); } /** * g_paste_ui_reexec_new: * @topwin: the main #GtkWindow * @client: a #GPasteClient instance * * Create a new instance of #GPasteUiReexec * * Returns: a newly allocated #GPasteUiReexec * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_reexec_new (GtkWindow *topwin, GPasteClient *client) { g_return_val_if_fail (GTK_IS_WINDOW (topwin), NULL); g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_UI_REEXEC,NULL); GPasteUiReexecPrivate *priv = g_paste_ui_reexec_get_instance_private (G_PASTE_UI_REEXEC (self)); priv->topwin = topwin; priv->client = g_object_ref (client); return self; } gpaste-3.42.6/src/ui/gpaste-ui-reexec.h000066400000000000000000000012101421222064600176060ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_REEXEC_H__ #define __G_PASTE_UI_REEXEC_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_REEXEC (g_paste_ui_reexec_get_type ()) G_PASTE_FINAL_TYPE (UiReexec, ui_reexec, UI_REEXEC, GtkButton) GtkWidget *g_paste_ui_reexec_new (GtkWindow *topwin, GPasteClient *client); G_END_DECLS #endif /*__G_PASTE_UI_REEXEC_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-search-bar.c000066400000000000000000000027711421222064600203520ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include struct _GPasteUiSearchBar { GtkSearchBar parent_instance; }; typedef struct { GtkSearchEntry *entry; } GPasteUiSearchBarPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiSearchBar, ui_search_bar, GTK_TYPE_SEARCH_BAR) /** * g_paste_ui_search_bar_get_entry: * * Get the #GtkSearchEntry * * Returns: (transfer none): the #GtkSearchEntry */ G_PASTE_VISIBLE GtkSearchEntry * g_paste_ui_search_bar_get_entry (const GPasteUiSearchBar *self) { g_return_val_if_fail (_G_PASTE_IS_UI_SEARCH_BAR (self), NULL); const GPasteUiSearchBarPrivate *priv = _g_paste_ui_search_bar_get_instance_private (self); return priv->entry; } static void g_paste_ui_search_bar_class_init (GPasteUiSearchBarClass *klass G_GNUC_UNUSED) { } static void g_paste_ui_search_bar_init (GPasteUiSearchBar *self) { GPasteUiSearchBarPrivate *priv = g_paste_ui_search_bar_get_instance_private (self); GtkWidget *entry = gtk_search_entry_new (); priv->entry = GTK_SEARCH_ENTRY (entry); gtk_container_add (GTK_CONTAINER (self), entry); } /** * g_paste_ui_search_bar_new: * * Create a new instance of #GPasteUiSearchBar * * Returns: a newly allocated #GPasteUiSearchBar * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_search_bar_new (void) { return gtk_widget_new (G_PASTE_TYPE_UI_SEARCH_BAR, NULL); } gpaste-3.42.6/src/ui/gpaste-ui-search-bar.h000066400000000000000000000012641421222064600203530ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_SEARCH_BAR_H__ #define __G_PASTE_UI_SEARCH_BAR_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_SEARCH_BAR (g_paste_ui_search_bar_get_type ()) G_PASTE_FINAL_TYPE (UiSearchBar, ui_search_bar, UI_SEARCH_BAR, GtkSearchBar) GtkSearchEntry *g_paste_ui_search_bar_get_entry (const GPasteUiSearchBar *self); GtkWidget *g_paste_ui_search_bar_new (void); G_END_DECLS #endif /*__G_PASTE_UI_SEARCH_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-search.c000066400000000000000000000017501421222064600176040ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include struct _GPasteUiSearch { GtkToggleButton parent_instance; }; G_PASTE_DEFINE_TYPE (UiSearch, ui_search, GTK_TYPE_TOGGLE_BUTTON) static void g_paste_ui_search_class_init (GPasteUiSearchClass *klass G_GNUC_UNUSED) { } static void g_paste_ui_search_init (GPasteUiSearch *self) { GtkWidget *widget = GTK_WIDGET (self); gtk_widget_set_tooltip_text (widget, _("Search")); gtk_widget_set_valign (widget, GTK_ALIGN_CENTER); gtk_container_add (GTK_CONTAINER (self), gtk_image_new_from_icon_name ("edit-find-symbolic", GTK_ICON_SIZE_BUTTON)); } /** * g_paste_ui_search_new: * * Create a new instance of #GPasteUiSearch * * Returns: a newly allocated #GPasteUiSearch * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_search_new (void) { return gtk_widget_new (G_PASTE_TYPE_UI_SEARCH, NULL); } gpaste-3.42.6/src/ui/gpaste-ui-search.h000066400000000000000000000011061421222064600176040ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_SEARCH_H__ #define __G_PASTE_UI_SEARCH_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_SEARCH (g_paste_ui_search_get_type ()) G_PASTE_FINAL_TYPE (UiSearch, ui_search, UI_SEARCH, GtkToggleButton) GtkWidget *g_paste_ui_search_new (void); G_END_DECLS #endif /*__G_PASTE_UI_SEARCH_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-settings.c000066400000000000000000000027131421222064600201770ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include "gpaste-gtk-compat.h" struct _GPasteUiSettings { GtkMenuButton parent_instance; }; G_PASTE_DEFINE_TYPE (UiSettings, ui_settings, GTK_TYPE_MENU_BUTTON) static void g_paste_ui_settings_class_init (GPasteUiSettingsClass *klass G_GNUC_UNUSED) { } static void g_paste_ui_settings_init (GPasteUiSettings *self) { GtkWidget *widget = GTK_WIDGET (self); GtkMenuButton *menu = GTK_MENU_BUTTON (self); GtkWidget *popover = gtk_popover_new (GTK_WIDGET (self)); GtkWidget *settings_widget = g_paste_settings_ui_widget_new (); gtk_widget_set_tooltip_text (widget, _("GPaste Settings")); gtk_widget_set_valign (widget, GTK_ALIGN_CENTER); gtk_widget_set_margin_top (settings_widget, 10); gtk_menu_button_set_direction (menu, GTK_ARROW_NONE); gtk_menu_button_set_use_popover (menu, TRUE); gtk_menu_button_set_popover (menu, popover); gtk_container_add (GTK_CONTAINER (popover), settings_widget); gtk_widget_show_all (settings_widget); } /** * g_paste_ui_settings_new: * * Create a new instance of #GPasteUiSettings * * Returns: a newly allocated #GPasteUiSettings * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_settings_new (void) { return gtk_widget_new (G_PASTE_TYPE_UI_SETTINGS, NULL); } gpaste-3.42.6/src/ui/gpaste-ui-settings.h000066400000000000000000000011261421222064600202010ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_SETTINGS_H__ #define __G_PASTE_UI_SETTINGS_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_SETTINGS (g_paste_ui_settings_get_type ()) G_PASTE_FINAL_TYPE (UiSettings, ui_settings, UI_SETTINGS, GtkMenuButton) GtkWidget *g_paste_ui_settings_new (void); G_END_DECLS #endif /*__G_PASTE_UI_SETTINGS_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-shortcuts-window.c000066400000000000000000000066071421222064600217100ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include struct _GPasteUiShortcutsWindow { GtkShortcutsWindow parent_instance; }; G_PASTE_DEFINE_TYPE (UiShortcutsWindow, ui_shortcuts_window, GTK_TYPE_SHORTCUTS_WINDOW) static void g_paste_ui_shortcuts_window_class_init (GPasteUiShortcutsWindowClass *klass G_GNUC_UNUSED) { } static void g_paste_ui_shortcuts_window_init (GPasteUiShortcutsWindow *self G_GNUC_UNUSED) { } static inline void add_shortcut (GtkContainer *group, const gchar *title, const gchar *accelerator) { gtk_container_add (group, gtk_widget_new (GTK_TYPE_SHORTCUTS_SHORTCUT, "visible", TRUE, "title", title, "accelerator", accelerator, NULL)); } /** * g_paste_ui_shortcuts_window_new: * @settings: a #GPasteSettings instance * * Create a new instance of #GPasteUiShortcutsWindow * * Returns: a newly allocated #GPasteUiShortcutsWindow * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_shortcuts_window_new (const GPasteSettings *settings) { g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), NULL); GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_UI_SHORTCUTS_WINDOW, "type", GTK_WINDOW_TOPLEVEL, "window-position", GTK_WIN_POS_CENTER_ALWAYS, "modal", TRUE, "resizable", FALSE, NULL); GtkWidget *section = gtk_widget_new (GTK_TYPE_SHORTCUTS_SECTION, "section-name", "shortcuts", "visible", TRUE, "max-height", 10, NULL); GtkWidget *general_group = gtk_widget_new (GTK_TYPE_SHORTCUTS_GROUP, "title", _("General"), "visible", TRUE, NULL); GtkContainer *ggroup = GTK_CONTAINER (general_group); gtk_container_add (GTK_CONTAINER (self), section); gtk_container_add (GTK_CONTAINER (section), general_group); add_shortcut (ggroup, _("Delete the active item from history"), g_paste_settings_get_pop (settings)); add_shortcut (ggroup, _("Launch the graphical tool"), g_paste_settings_get_launch_ui (settings)); add_shortcut (ggroup, _("Mark the active item as being a password"), g_paste_settings_get_make_password (settings)); add_shortcut (ggroup, _("Display the history"), g_paste_settings_get_show_history (settings)); add_shortcut (ggroup, _("Sync the clipboard to the primary selection"), g_paste_settings_get_sync_clipboard_to_primary (settings)); add_shortcut (ggroup, _("Sync the primary selection to the clipboard"), g_paste_settings_get_sync_primary_to_clipboard (settings)); add_shortcut (ggroup, _("Upload the active item to a pastebin service"), g_paste_settings_get_upload (settings)); return self; } gpaste-3.42.6/src/ui/gpaste-ui-shortcuts-window.h000066400000000000000000000012761421222064600217120ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_SHORTCUTS_WINDOW_H__ #define __G_PASTE_UI_SHORTCUTS_WINDOW_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_SHORTCUTS_WINDOW (g_paste_ui_shortcuts_window_get_type ()) G_PASTE_FINAL_TYPE (UiShortcutsWindow, ui_shortcuts_window, UI_SHORTCUTS_WINDOW, GtkShortcutsWindow) GtkWidget *g_paste_ui_shortcuts_window_new (const GPasteSettings *settings); G_END_DECLS #endif /*__G_PASTE_UI_SHORTCUTS_WINDOW_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-switch.c000066400000000000000000000065241421222064600176440ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include struct _GPasteUiSwitch { GtkSwitch parent_instance; }; enum { C_TRACKING, C_LAST_SIGNAL }; typedef struct { GPasteClient *client; GtkWindow *topwin; guint64 c_signals[C_LAST_SIGNAL]; } GPasteUiSwitchPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiSwitch, ui_switch, GTK_TYPE_SWITCH) static void on_tracking_changed (GPasteClient *client G_GNUC_UNUSED, gboolean state, gpointer user_data) { GtkSwitch *sw = user_data; gtk_switch_set_active (sw, state); } static gboolean g_paste_ui_button_press_event (GtkWidget *widget, GdkEventButton *event G_GNUC_UNUSED) { const GPasteUiSwitchPrivate *priv = _g_paste_ui_switch_get_instance_private (G_PASTE_UI_SWITCH (widget)); GtkSwitch *sw = GTK_SWITCH (widget); gboolean track = !gtk_switch_get_active (sw); gboolean changed = TRUE; if (!track) { changed = g_paste_util_confirm_dialog (priv->topwin, _("Stop"), _("Do you really want to stop tracking clipboard changes?")); track = !changed; } if (changed) g_paste_client_track (priv->client, track, NULL, NULL); return GDK_EVENT_STOP; } static void g_paste_ui_switch_dispose (GObject *object) { GPasteUiSwitchPrivate *priv = g_paste_ui_switch_get_instance_private (G_PASTE_UI_SWITCH (object)); if (priv->c_signals[C_TRACKING]) { g_signal_handler_disconnect (priv->client, priv->c_signals[C_TRACKING]); priv->c_signals[C_TRACKING] = 0; } g_clear_object (&priv->client); G_OBJECT_CLASS (g_paste_ui_switch_parent_class)->dispose (object); } static void g_paste_ui_switch_class_init (GPasteUiSwitchClass *klass) { GTK_WIDGET_CLASS (klass)->button_press_event = g_paste_ui_button_press_event; G_OBJECT_CLASS (klass)->dispose = g_paste_ui_switch_dispose; } static void g_paste_ui_switch_init (GPasteUiSwitch *self) { GtkWidget *widget = GTK_WIDGET (self); gtk_widget_set_tooltip_text (widget, _("Track clipboard changes")); gtk_widget_set_valign (widget, GTK_ALIGN_CENTER); } /** * g_paste_ui_switch_new: * @topwin: the main #GtkWindow * @client: a #GPasteClient instance * * Create a new instance of #GPasteUiSwitch * * Returns: a newly allocated #GPasteUiSwitch * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_switch_new (GtkWindow *topwin, GPasteClient *client) { g_return_val_if_fail (GTK_IS_WINDOW (topwin), NULL); g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_UI_SWITCH, NULL); GPasteUiSwitchPrivate *priv = g_paste_ui_switch_get_instance_private (G_PASTE_UI_SWITCH (self)); priv->topwin = topwin; priv->client = g_object_ref (client); priv->c_signals[C_TRACKING] = g_signal_connect (G_OBJECT (priv->client), "tracking", G_CALLBACK (on_tracking_changed), self); gtk_switch_set_active (GTK_SWITCH (self), g_paste_client_is_active (client)); return self; } gpaste-3.42.6/src/ui/gpaste-ui-switch.h000066400000000000000000000012101421222064600176340ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_SWITCH_H__ #define __G_PASTE_UI_SWITCH_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_SWITCH (g_paste_ui_switch_get_type ()) G_PASTE_FINAL_TYPE (UiSwitch, ui_switch, UI_SWITCH, GtkSwitch) GtkWidget *g_paste_ui_switch_new (GtkWindow *topwin, GPasteClient *client); G_END_DECLS #endif /*__G_PASTE_UI_SWITCH_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-upload-item.c000066400000000000000000000024271421222064600205610ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include struct _GPasteUiUploadItem { GPasteUiItemAction parent_instance; }; G_PASTE_DEFINE_TYPE (UiUploadItem, ui_upload_item, G_PASTE_TYPE_UI_ITEM_ACTION) static void g_paste_ui_upload_item_activate (GPasteUiItemAction *self G_GNUC_UNUSED, GPasteClient *client, const gchar *uuid) { g_paste_client_upload (client, uuid, NULL, NULL); } static void g_paste_ui_upload_item_class_init (GPasteUiUploadItemClass *klass) { G_PASTE_UI_ITEM_ACTION_CLASS (klass)->activate = g_paste_ui_upload_item_activate; } static void g_paste_ui_upload_item_init (GPasteUiUploadItem *self G_GNUC_UNUSED) { } /** * g_paste_ui_upload_item_new: * @client: a #GPasteClient * * Create a new instance of #GPasteUiUploadItem * * Returns: a newly allocated #GPasteUiUploadItem * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_upload_item_new (GPasteClient *client) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), NULL); return g_paste_ui_item_action_new (G_PASTE_TYPE_UI_UPLOAD_ITEM, client, "document-send-symbolic", _("Upload")); } gpaste-3.42.6/src/ui/gpaste-ui-upload-item.h000066400000000000000000000012151421222064600205600ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_UPLOAD_ITEM_H__ #define __G_PASTE_UI_UPLOAD_ITEM_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_UPLOAD_ITEM (g_paste_ui_upload_item_get_type ()) G_PASTE_FINAL_TYPE (UiUploadItem, ui_upload_item, UI_UPLOAD_ITEM, GPasteUiItemAction) GtkWidget *g_paste_ui_upload_item_new (GPasteClient *client); G_END_DECLS #endif /*__G_PASTE_UI_UPLOAD_ITEM_H__*/ gpaste-3.42.6/src/ui/gpaste-ui-window.c000066400000000000000000000261721421222064600176530ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include #include #include #include #include "gpaste-gtk-compat.h" struct _GPasteUiWindow { GtkApplicationWindow parent_instance; }; enum { C_SEARCH, C_LAST_SIGNAL }; typedef struct { GPasteUiHeader *header; GPasteUiHistory *history; GPasteClient *client; GPasteSettings *settings; GtkSearchBar *search_bar; GtkSearchEntry *search_entry; gboolean initialized; guint64 c_signals[C_LAST_SIGNAL]; } GPasteUiWindowPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (UiWindow, ui_window, GTK_TYPE_APPLICATION_WINDOW) static gboolean _empty (gpointer user_data) { gpointer *data = (gpointer *) user_data; GPasteUiWindow *self = data[0]; GPasteUiWindowPrivate *priv = g_paste_ui_window_get_instance_private (self); if (!priv->initialized) return G_SOURCE_CONTINUE; g_autofree gchar *history = data[1]; g_free (data); g_paste_util_empty_history (GTK_WINDOW (self), priv->client, priv->settings, history); return G_SOURCE_REMOVE; } /** * g_paste_ui_window_empty_history: * @self: the #GPasteUiWindow * @history: the history to empty * * Empty a history */ G_PASTE_VISIBLE void g_paste_ui_window_empty_history (GPasteUiWindow *self, const gchar *history) { g_return_if_fail (_G_PASTE_IS_UI_WINDOW (self)); g_return_if_fail (g_utf8_validate (history, -1, NULL)); gpointer *data = g_new (gpointer, 2); data[0] = self; data[1] = g_strdup (history); g_source_set_name_by_id (g_idle_add (_empty, data), "[GPaste] empty"); } static gboolean _search (gpointer user_data) { gpointer *data = (gpointer *) user_data; GPasteUiWindowPrivate *priv = data[0]; if (!priv->initialized) return G_SOURCE_CONTINUE; g_autofree gchar *search = data[1]; g_free (data); gtk_button_clicked (g_paste_ui_header_get_search_button (priv->header)); gtk_entry_set_text (GTK_ENTRY (priv->search_entry), search); return G_SOURCE_REMOVE; } /** * g_paste_ui_window_search: * @self: the #GPasteUiWindow * @search: the text to search * * Do a search */ G_PASTE_VISIBLE void g_paste_ui_window_search (GPasteUiWindow *self, const gchar *search) { g_return_if_fail (_G_PASTE_IS_UI_WINDOW (self)); g_return_if_fail (g_utf8_validate (search, -1, NULL)); GPasteUiWindowPrivate *priv = g_paste_ui_window_get_instance_private (self); gpointer *data = g_new (gpointer, 2); data[0] = priv; data[1] = g_strdup (search); g_source_set_name_by_id (g_idle_add (_search, data), "[GPaste] search"); } static gboolean _show_prefs (gpointer user_data) { GPasteUiWindowPrivate *priv = user_data; if (!priv->initialized) return G_SOURCE_CONTINUE; g_paste_ui_header_show_prefs (priv->header); return G_SOURCE_REMOVE; } /** * g_paste_ui_window_show_prefs: * @self: the #GPasteUiWindow * * Show the prefs pane */ G_PASTE_VISIBLE void g_paste_ui_window_show_prefs (GPasteUiWindow *self) { g_return_if_fail (_G_PASTE_IS_UI_WINDOW (self)); GPasteUiWindowPrivate *priv = g_paste_ui_window_get_instance_private (self); g_source_set_name_by_id (g_idle_add (_show_prefs, priv), "[GPaste] show_prefs"); } static gboolean on_key_press_event (GtkWidget *widget, GdkEventKey *event) { const GPasteUiWindowPrivate *priv = _g_paste_ui_window_get_instance_private (G_PASTE_UI_WINDOW (widget)); GtkWidget *focus = gtk_window_get_focus (GTK_WINDOW (widget)); GdkEvent *_event = (GdkEvent *) event; gboolean search_has_focus = focus == GTK_WIDGET (priv->search_entry); gboolean search_in_progress = search_has_focus && gtk_entry_get_text_length (GTK_ENTRY (priv->search_entry)); gboolean forward_to_search = FALSE; guint keyval; if (gdk_event_get_keyval (_event, &keyval)) { switch (keyval) { case GDK_KEY_Escape: if (!search_in_progress) { gtk_window_close (GTK_WINDOW (widget)); return GDK_EVENT_STOP; } else { forward_to_search = TRUE; } break; case GDK_KEY_Return: case GDK_KEY_KP_Enter: case GDK_KEY_ISO_Enter: if (search_in_progress && g_paste_ui_history_select_first (priv->history)) return GDK_EVENT_STOP; break; default: forward_to_search = TRUE; break; } } if (forward_to_search && gtk_search_bar_handle_event (priv->search_bar, _event)) return GDK_EVENT_STOP; gboolean res = GTK_WIDGET_CLASS (g_paste_ui_window_parent_class)->key_press_event (widget, event); if (res == GDK_EVENT_STOP || !forward_to_search || search_has_focus) return res; // fallback to explicitely focusing search to see if key can be handled gtk_entry_grab_focus_without_selecting (GTK_ENTRY (priv->search_entry)); if (gtk_search_bar_handle_event (priv->search_bar, _event)) return GDK_EVENT_STOP; if (GTK_WIDGET_CLASS (g_paste_ui_window_parent_class)->key_press_event (widget, event) == GDK_EVENT_STOP) return GDK_EVENT_STOP; gtk_widget_grab_focus (focus); return res; } static void on_search (GtkSearchEntry *entry, gpointer user_data) { GPasteUiWindowPrivate *priv = user_data; g_paste_ui_history_search (priv->history, gtk_entry_get_text (GTK_ENTRY (entry))); } static gboolean focus_search (gpointer user_data) { GPasteUiWindow *self = user_data; const GPasteUiWindowPrivate *priv = _g_paste_ui_window_get_instance_private (self); GtkWindow *win = user_data; GtkWidget *widget = user_data; if (!GTK_IS_WIDGET (widget)) return G_SOURCE_REMOVE; if (!gtk_widget_get_realized (widget)) return G_SOURCE_CONTINUE; gtk_window_set_focus (win, GTK_WIDGET (priv->search_entry)); return G_SOURCE_REMOVE; } static void g_paste_ui_window_dispose (GObject *object) { GPasteUiWindow *self = G_PASTE_UI_WINDOW (object); GPasteUiWindowPrivate *priv = g_paste_ui_window_get_instance_private (self); if (priv->c_signals[C_SEARCH]) { GPasteUiSearchBar *search_bar = G_PASTE_UI_SEARCH_BAR (priv->search_bar); GtkSearchEntry *entry = g_paste_ui_search_bar_get_entry (search_bar); g_signal_handler_disconnect (entry, priv->c_signals[C_SEARCH]); priv->c_signals[C_SEARCH] = 0; } g_clear_object (&priv->client); G_OBJECT_CLASS (g_paste_ui_window_parent_class)->dispose (object); } static void g_paste_ui_window_class_init (GPasteUiWindowClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_ui_window_dispose; GTK_WIDGET_CLASS (klass)->key_press_event = on_key_press_event; } static void g_paste_ui_window_init (GPasteUiWindow *self) { GPasteUiWindowPrivate *priv = g_paste_ui_window_get_instance_private (self); GtkWindow *win = GTK_WINDOW (self); GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_widget_set_margin_start (vbox, 5); gtk_widget_set_margin_end (vbox, 5); gtk_widget_set_margin_bottom (vbox, 5); GtkWidget *search_bar = g_paste_ui_search_bar_new (); GtkContainer *box = GTK_CONTAINER (vbox); priv->search_bar = GTK_SEARCH_BAR (search_bar); gtk_container_add (GTK_CONTAINER (win), vbox); gtk_box_pack_start (GTK_BOX (box), search_bar, FALSE, FALSE); GtkSearchEntry *entry = priv->search_entry = g_paste_ui_search_bar_get_entry (G_PASTE_UI_SEARCH_BAR (search_bar)); priv->c_signals[C_SEARCH] = g_signal_connect (entry, "search-changed", G_CALLBACK (on_search), priv); g_source_set_name_by_id (g_idle_add (focus_search, self), "[GPaste] focus_search"); } static void on_client_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { GPasteUiWindowPrivate *priv = g_paste_ui_window_get_instance_private (user_data); GtkWindow *win = GTK_WINDOW (user_data); g_autoptr (GError) error = NULL; g_autoptr (GPasteClient) client = g_paste_client_new_finish (res, &error); if (error) { priv->initialized = TRUE; g_critical ("%s: %s\n", _("Couldn't connect to GPaste daemon"), error->message); gtk_window_close (win); /* will exit the application */ } g_autoptr (GPasteSettings) settings = g_paste_settings_new (); GtkWidget *header = g_paste_ui_header_new (win, client); GtkWidget *panel = g_paste_ui_panel_new (client, settings, win, priv->search_entry); GtkWidget *history = g_paste_ui_history_new (client, settings, G_PASTE_UI_PANEL (panel), win); GPasteUiHeader *h = priv->header = G_PASTE_UI_HEADER (header); priv->history = G_PASTE_UI_HISTORY (history); priv->client = g_object_ref (client); priv->settings = g_paste_settings_new(); gtk_window_set_titlebar (win, header); gtk_application_window_set_help_overlay (GTK_APPLICATION_WINDOW (user_data), GTK_SHORTCUTS_WINDOW (g_paste_ui_shortcuts_window_new (settings))); GtkContainer *vbox = GTK_CONTAINER (gtk_bin_get_child (GTK_BIN (win))); GtkWidget *hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); GtkBox *box = GTK_BOX (hbox); gtk_box_set_spacing (box, 2); gtk_box_pack_start (box, panel, FALSE, FALSE); gtk_box_pack_start (box, gtk_separator_new (GTK_ORIENTATION_VERTICAL), FALSE, FALSE); gtk_widget_set_hexpand (history, TRUE); gtk_widget_set_halign (history, TRUE); gtk_box_pack_start (box, history, TRUE, TRUE); gtk_widget_set_vexpand (hbox, TRUE); gtk_widget_set_valign (hbox, TRUE); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE); g_object_bind_property (g_paste_ui_header_get_search_button (h), "active", gtk_container_get_children (vbox)->data, "search-mode-enabled", G_BINDING_BIDIRECTIONAL); gtk_widget_show_all (GTK_WIDGET (win)); priv->initialized = TRUE; } /** * g_paste_ui_window_new: * @app: the #GtkApplication * * Create a new instance of #GPasteUiWindow * * Returns: a newly allocated #GPasteUiWindow * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_ui_window_new (GtkApplication *app) { g_return_val_if_fail (GTK_IS_APPLICATION (app), NULL); GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_UI_WINDOW, "application", app, "type", GTK_WINDOW_TOPLEVEL, "window-position", GTK_WIN_POS_CENTER_ALWAYS, "resizable", FALSE, "icon-name", G_PASTE_ICON_NAME, NULL); g_paste_client_new (on_client_ready, self); return self; } gpaste-3.42.6/src/ui/gpaste-ui-window.h000066400000000000000000000016171421222064600176550ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UI_WINDOW_H__ #define __G_PASTE_UI_WINDOW_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_UI_WINDOW (g_paste_ui_window_get_type ()) G_PASTE_FINAL_TYPE (UiWindow, ui_window, UI_WINDOW, GtkApplicationWindow) void g_paste_ui_window_empty_history (GPasteUiWindow *self, const gchar *history); void g_paste_ui_window_search (GPasteUiWindow *self, const gchar *search); void g_paste_ui_window_show_prefs (GPasteUiWindow *self); GtkWidget *g_paste_ui_window_new (GtkApplication *app); G_END_DECLS #endif /*__G_PASTE_UI_WINDOW_H__*/ gpaste-3.42.6/src/ui/gpaste-ui.c000066400000000000000000000074601421222064600163450ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include static GPasteUiWindow * get_ui_window(gpointer user_data) { return G_PASTE_UI_WINDOW (gtk_application_get_windows (GTK_APPLICATION (user_data))->data); } static void prefs_activated (GSimpleAction *action G_GNUC_UNUSED, GVariant *parameter G_GNUC_UNUSED, gpointer user_data) { g_paste_ui_window_show_prefs (get_ui_window (user_data)); } static gboolean show_about_dialog (gpointer user_data) { GtkWidget *widget = user_data; if (!GTK_IS_WIDGET (widget)) return G_SOURCE_REMOVE; if (!gtk_widget_get_realized (widget)) return G_SOURCE_CONTINUE; GtkWindow *parent = GTK_WINDOW (widget); const gchar *authors[] = { "Marc-Antoine Perennou ", NULL }; gtk_show_about_dialog (parent, "program-name", PACKAGE_NAME, "version", PACKAGE_VERSION, "logo-icon-name", G_PASTE_ICON_NAME, "license-type", GTK_LICENSE_BSD, "authors", authors, "copyright", "Copyright (c) 2010-2018, Marc-Antoine Perennou", "comments", "Clipboard management system", "website", "http://www.imagination-land.org/tags/GPaste.html", "website-label", "Follow GPaste news", "wrap-license", TRUE, NULL); return G_SOURCE_REMOVE; } static void about_activated (GSimpleAction *action G_GNUC_UNUSED, GVariant *parameter G_GNUC_UNUSED, gpointer user_data) { g_source_set_name_by_id (g_idle_add (show_about_dialog, gtk_application_get_windows (GTK_APPLICATION (user_data))->data), "[GPaste] about_dialog"); } static void empty_activated (GSimpleAction *action G_GNUC_UNUSED, GVariant *parameter, gpointer user_data) { g_paste_ui_window_empty_history (get_ui_window (user_data), g_variant_get_string (parameter, NULL)); } static void quit_activated (GSimpleAction *action G_GNUC_UNUSED, GVariant *parameter G_GNUC_UNUSED, gpointer user_data) { g_application_quit (G_APPLICATION (user_data)); } static void search_activated (GSimpleAction *action G_GNUC_UNUSED, GVariant *parameter, gpointer user_data) { g_paste_ui_window_search (get_ui_window (user_data), g_variant_get_string (parameter, NULL)); } gint main (gint argc, gchar *argv[]) { G_PASTE_INIT_APPLICATION_FULL ("Ui", g_paste_util_show_win); GActionEntry app_entries[] = { { "about", about_activated, NULL, NULL, NULL, { 0 } }, { "empty", empty_activated, "s", NULL, NULL, { 0 } }, { "prefs", prefs_activated, NULL, NULL, NULL, { 0 } }, { "quit", quit_activated, NULL, NULL, NULL, { 0 } }, { "search", search_activated, "s", NULL, NULL, { 0 } } }; g_action_map_add_action_entries (G_ACTION_MAP (app), app_entries, G_N_ELEMENTS (app_entries), app); GMenu *menu = g_menu_new (); g_menu_append (menu, _("GPaste Settings"), "app.prefs"); g_menu_append (menu, _("Keyboard Shortcuts"), "win.show-help-overlay"); g_menu_append (menu, _("About GPaste"), "app.about"); g_menu_append (menu, _("Quit"), "app.quit"); gtk_application_set_app_menu (app, G_MENU_MODEL (menu)); G_GNUC_UNUSED GtkWidget *window = g_paste_ui_window_new (app); return g_application_run (gapp, argc, argv); } gpaste-3.42.6/src/ui/meson.build000066400000000000000000000045121421222064600164400ustar00rootroot00000000000000gpaste_ui_sources = [ 'gpaste-ui-about.c', 'gpaste-ui-backup-history.c', 'gpaste-ui-delete-history.c', 'gpaste-ui-delete-item.c', 'gpaste-ui-edit-item.c', 'gpaste-ui-empty-history.c', 'gpaste-ui-empty-item.c', 'gpaste-ui-header.c', 'gpaste-ui-history-action.c', 'gpaste-ui-history-actions.c', 'gpaste-ui-history.c', 'gpaste-ui-item-action.c', 'gpaste-ui-item-skeleton.c', 'gpaste-ui-item.c', 'gpaste-ui-new-item.c', 'gpaste-ui-panel-history.c', 'gpaste-ui-panel.c', 'gpaste-ui-reexec.c', 'gpaste-ui-search-bar.c', 'gpaste-ui-search.c', 'gpaste-ui-settings.c', 'gpaste-ui-shortcuts-window.c', 'gpaste-ui-switch.c', 'gpaste-ui-upload-item.c', 'gpaste-ui-window.c', 'gpaste-ui.c', 'tmp/gpaste-client.c', 'tmp/gpaste-client-item.c', 'tmp/gpaste-util.c', 'tmp/gpaste-settings.c', 'tmp/gpaste-update-enums.c', 'tmp/gpaste-settings-ui-panel.c', 'tmp/gpaste-settings-ui-stack.c', 'tmp/gpaste-settings-ui-widget.c', 'tmp/gpaste-item-enums.c' ] gpaste_ui_headers = [ 'gpaste-ui-about.h', 'gpaste-ui-backup-history.h', 'gpaste-ui-delete-history.h', 'gpaste-ui-delete-item.h', 'gpaste-ui-edit-item.h', 'gpaste-ui-empty-history.h', 'gpaste-ui-empty-item.h', 'gpaste-ui-header.h', 'gpaste-ui-history-action.h', 'gpaste-ui-history-actions.h', 'gpaste-ui-history.h', 'gpaste-ui-item-action.h', 'gpaste-ui-item-skeleton.h', 'gpaste-ui-item.h', 'gpaste-ui-new-item.h', 'gpaste-ui-panel-history.h', 'gpaste-ui-panel.h', 'gpaste-ui-reexec.h', 'gpaste-ui-search-bar.h', 'gpaste-ui-search.h', 'gpaste-ui-settings.h', 'gpaste-ui-shortcuts-window.h', 'gpaste-ui-switch.h', 'gpaste-ui-upload-item.h', 'gpaste-ui-window.h', 'tmp/gpaste-client.h', 'tmp/gpaste-client-item.h', 'tmp/gpaste-util.h', 'tmp/gpaste-settings.h', 'tmp/gpaste-update-enums.h', 'tmp/gpaste-settings-ui-panel.h', 'tmp/gpaste-settings-ui-stack.h', 'tmp/gpaste-settings-ui-widget.h', 'tmp/gpaste-item-enums.h' ] gpaste_ui_headers_dep = declare_dependency( include_directories: include_directories('tmp', '../libgpaste'), sources: gpaste_ui_headers, ) tmp_inc = include_directories('tmp') executable( 'gpaste-ui', sources: gpaste_ui_sources, install: true, dependencies: [ glib_dep, gtk3_dep, gpaste_ui_headers_dep ], install_dir: join_paths(get_option('libexecdir'), 'gpaste'), ) gpaste-3.42.6/src/ui/tmp/000077500000000000000000000000001421222064600150745ustar00rootroot00000000000000gpaste-3.42.6/src/ui/tmp/gpaste-client-item.c000066400000000000000000000045351421222064600207420ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include struct _GPasteClientItem { GObject parent_instance; }; typedef struct { gchar *uuid; gchar *value; } GPasteClientItemPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (ClientItem, client_item, G_TYPE_OBJECT) /** * g_paste_client_item_get_uuid: * @self: a #GPasteClientItem instance * * Returns the uuid of the item */ G_PASTE_VISIBLE const gchar * g_paste_client_item_get_uuid (const GPasteClientItem *self) { g_return_val_if_fail (_G_PASTE_IS_CLIENT_ITEM (self), NULL); const GPasteClientItemPrivate *priv = _g_paste_client_item_get_instance_private (self); return priv->uuid;; } /** * g_paste_client_item_get_value: * @self: a #GPasteClientItem instance * * Returns the value of the item */ G_PASTE_VISIBLE const gchar * g_paste_client_item_get_value (const GPasteClientItem *self) { g_return_val_if_fail (_G_PASTE_IS_CLIENT_ITEM (self), NULL); const GPasteClientItemPrivate *priv = _g_paste_client_item_get_instance_private (self); return priv->value; } static void g_paste_client_item_finalize (GObject *object) { GPasteClientItemPrivate *priv = g_paste_client_item_get_instance_private (G_PASTE_CLIENT_ITEM (object)); g_free (priv->uuid); g_free (priv->value); } static void g_paste_client_item_class_init (GPasteClientItemClass *klass) { G_OBJECT_CLASS (klass)->finalize = g_paste_client_item_finalize; } static void g_paste_client_item_init (GPasteClientItem *self G_GNUC_UNUSED) { } /** * g_paste_client_item_new: * @uuid: the uuid of the item * @value: the value of the item * * Create a new instance of #GPasteClientItem * * Returns: (transfer full): a newly allocated #GPasteClientItem * free it with g_object_unref */ G_PASTE_VISIBLE GPasteClientItem * g_paste_client_item_new (const gchar *uuid, const gchar *value) { g_return_val_if_fail (g_uuid_string_is_valid (uuid), NULL); g_return_val_if_fail (g_utf8_validate (value, -1, NULL), NULL); GPasteClientItem *self = g_object_new (G_PASTE_TYPE_CLIENT_ITEM, NULL); GPasteClientItemPrivate *priv = g_paste_client_item_get_instance_private (self); priv->uuid = g_strdup (uuid); priv->value = g_strdup (value); return self; } gpaste-3.42.6/src/ui/tmp/gpaste-client-item.h000066400000000000000000000014721421222064600207440ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_CLIENT_ITEM_H__ #define __G_PASTE_CLIENT_ITEM_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_CLIENT_ITEM (g_paste_client_item_get_type ()) G_PASTE_FINAL_TYPE (ClientItem, client_item, CLIENT_ITEM, GObject) const gchar *g_paste_client_item_get_uuid (const GPasteClientItem *self); const gchar *g_paste_client_item_get_value (const GPasteClientItem *self); GPasteClientItem *g_paste_client_item_new (const gchar *uuid, const gchar *value); G_END_DECLS #endif /*__G_PASTE_CLIENT_ITEM_H__*/ gpaste-3.42.6/src/ui/tmp/gpaste-client.c000066400000000000000000002076331421222064600200120ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include "gpaste-gdbus-macros.h" #include struct _GPasteClient { GDBusProxy parent_instance; }; G_PASTE_DEFINE_TYPE (Client, client, G_TYPE_DBUS_PROXY) enum { DELETE_HISTORY, EMPTY_HISTORY, SHOW_HISTORY, SWITCH_HISTORY, TRACKING, UPDATE, LAST_SIGNAL }; static guint64 signals[LAST_SIGNAL] = { 0 }; /*******************/ /* Methods / Async */ /*******************/ #define DBUS_CALL_NO_PARAM_ASYNC(method) \ DBUS_CALL_NO_PARAM_ASYNC_BASE (CLIENT, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAM_ASYNC(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_ASYNC_BASE (CLIENT, param_type, param_name, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAMV_ASYNC(method, paramv) \ DBUS_CALL_ONE_PARAMV_ASYNC_BASE (CLIENT, paramv, G_PASTE_DAEMON_##method) #define DBUS_CALL_TWO_PARAMS_ASYNC(method, params) \ DBUS_CALL_TWO_PARAMS_ASYNC_BASE (CLIENT, params, G_PASTE_DAEMON_##method) #define DBUS_CALL_THREE_PARAMS_ASYNC(method, params) \ DBUS_CALL_THREE_PARAMS_ASYNC_BASE (CLIENT, params, G_PASTE_DAEMON_##method) /****************************/ /* Methods / Async - Finish */ /****************************/ #define DBUS_ASYNC_FINISH_NO_RETURN \ DBUS_ASYNC_FINISH_NO_RETURN_BASE (CLIENT) #define DBUS_ASYNC_FINISH_RET_STRING \ DBUS_ASYNC_FINISH_RET_STRING_BASE (CLIENT) #define DBUS_ASYNC_FINISH_RET_ITEM \ DBUS_ASYNC_FINISH_RET_ITEM_BASE (CLIENT) #define DBUS_ASYNC_FINISH_RET_STRV \ DBUS_ASYNC_FINISH_RET_STRV_BASE (CLIENT) #define DBUS_ASYNC_FINISH_RET_ITEMS \ DBUS_ASYNC_FINISH_RET_ITEMS_BASE (CLIENT) #define DBUS_ASYNC_FINISH_RET_UINT64 \ DBUS_ASYNC_FINISH_RET_UINT64_BASE (CLIENT) /******************/ /* Methods / Sync */ /******************/ #define DBUS_CALL_NO_PARAM_NO_RETURN(method) \ DBUS_CALL_NO_PARAM_NO_RETURN_BASE (CLIENT, G_PASTE_DAEMON_##method) #define DBUS_CALL_NO_PARAM_RET_STRING(method) \ DBUS_CALL_NO_PARAM_RET_STRING_BASE (CLIENT, G_PASTE_DAEMON_##method) #define DBUS_CALL_NO_PARAM_RET_STRV(method) \ DBUS_CALL_NO_PARAM_RET_STRV_BASE (CLIENT, G_PASTE_DAEMON_##method) #define DBUS_CALL_NO_PARAM_RET_ITEMS(method) \ DBUS_CALL_NO_PARAM_RET_ITEMS_BASE (CLIENT, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAM_NO_RETURN(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_NO_RETURN_BASE (CLIENT, param_type, param_name, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAM_RET_UINT64(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_RET_UINT64_BASE (CLIENT, param_type, param_name, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAM_RET_STRING(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_RET_STRING_BASE (CLIENT, param_type, param_name, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAM_RET_STRV(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_RET_STRV_BASE (CLIENT, param_type, param_name, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAM_RET_ITEM(method, param_type, param_name) \ DBUS_CALL_ONE_PARAM_RET_ITEM_BASE (CLIENT, param_type, param_name, G_PASTE_DAEMON_##method) #define DBUS_CALL_ONE_PARAMV_RET_ITEMS(method, paramv) \ DBUS_CALL_ONE_PARAMV_RET_ITEMS_BASE (CLIENT, G_PASTE_DAEMON_##method, paramv) #define DBUS_CALL_TWO_PARAMS_NO_RETURN(method, params) \ DBUS_CALL_TWO_PARAMS_NO_RETURN_BASE (CLIENT, params, G_PASTE_DAEMON_##method) #define DBUS_CALL_THREE_PARAMS_NO_RETURN(method, params) \ DBUS_CALL_THREE_PARAMS_NO_RETURN_BASE (CLIENT, params, G_PASTE_DAEMON_##method) /**************/ /* Properties */ /**************/ #define DBUS_GET_BOOLEAN_PROPERTY(property) \ DBUS_GET_BOOLEAN_PROPERTY_BASE (CLIENT, G_PASTE_DAEMON_PROP_##property) #define DBUS_GET_STRING_PROPERTY(property) \ DBUS_GET_STRING_PROPERTY_BASE (CLIENT, G_PASTE_DAEMON_PROP_##property) /***********/ /* Signals */ /***********/ #define HANDLE_SIGNAL(sig) \ if (g_paste_str_equal (signal_name, G_PASTE_DAEMON_SIG_##sig)) \ { \ g_signal_emit (self, \ signals[sig], \ 0, /* detail */ \ NULL); \ } #define HANDLE_SIGNAL_WITH_DATA(sig, ans_type, get_data) \ if (g_paste_str_equal (signal_name, G_PASTE_DAEMON_SIG_##sig)) \ { \ GVariantIter params_iter; \ g_variant_iter_init (¶ms_iter, parameters); \ g_autoptr (GVariant) variant = g_variant_iter_next_value (¶ms_iter); \ ans_type answer = get_data; \ g_signal_emit (self, \ signals[sig], \ 0, /* detail */ \ answer, \ NULL); \ } #define NEW_SIGNAL(name) \ g_signal_new (name, \ G_PASTE_TYPE_CLIENT, \ G_SIGNAL_RUN_LAST, \ 0, /* class offset */ \ NULL, /* accumulator */ \ NULL, /* accumulator data */ \ g_cclosure_marshal_VOID__VOID, \ G_TYPE_NONE, \ 0) /* number of params */ #define NEW_SIGNAL_WITH_DATA(name, type) \ g_signal_new (name, \ G_PASTE_TYPE_CLIENT, \ G_SIGNAL_RUN_LAST, \ 0, /* class offset */ \ NULL, /* accumulator */ \ NULL, /* accumulator data */ \ g_cclosure_marshal_VOID__##type, \ G_TYPE_NONE, \ 1, \ G_TYPE_##type) #define NEW_SIGNAL_WITH_DATA_GENERIC(name, type) \ g_signal_new (name, \ G_PASTE_TYPE_CLIENT, \ G_SIGNAL_RUN_LAST, \ 0, /* class offset */ \ NULL, /* accumulator */ \ NULL, /* accumulator data */ \ g_cclosure_marshal_generic, \ G_TYPE_NONE, \ 1, \ G_TYPE_##type) /******************/ /* Methods / Sync */ /******************/ /** * g_paste_client_about_sync: * @self: a #GPasteClient instance * @error: a #GError * * Display the about dialog */ G_PASTE_VISIBLE void g_paste_client_about_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_NO_RETURN (ABOUT); } /** * g_paste_client_add_sync: * @self: a #GPasteClient instance * @text: the text to add * @error: a #GError * * Add an item to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_sync (GPasteClient *self, const gchar *text, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (ADD, string, text); } /** * g_paste_client_add_file_sync: * @self: a #GPasteClient instance * @file: the file to add * @error: a #GError * * Add the file contents to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_file_sync (GPasteClient *self, const gchar *file, GError **error) { g_autofree gchar *absolute_path = NULL; if (!g_path_is_absolute (file)) { g_autofree gchar *current_dir = g_get_current_dir (); absolute_path = g_build_filename (current_dir, file, NULL); } DBUS_CALL_ONE_PARAM_NO_RETURN (ADD_FILE, string, ((absolute_path) ? absolute_path : file)); } /** * g_paste_client_add_password_sync: * @self: a #GPasteClient instance * @name: the name to identify the password to add * @password: the password to add * @error: a #GError * * Add the password to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_password_sync (GPasteClient *self, const gchar *name, const gchar *password, GError **error) { GVariant *params[] = { g_variant_new_string (name), g_variant_new_string (password) }; DBUS_CALL_TWO_PARAMS_NO_RETURN (ADD_PASSWORD, params); } /** * g_paste_client_backup_history_sync: * @self: a #GPasteClient instance * @history: the name of the history * @backup: the name of the backup * @error: a #GError * * Backup the current history */ G_PASTE_VISIBLE void g_paste_client_backup_history_sync (GPasteClient *self, const gchar *history, const gchar *backup, GError **error) { GVariant *params[] = { g_variant_new_string (history), g_variant_new_string (backup) }; DBUS_CALL_TWO_PARAMS_NO_RETURN (BACKUP_HISTORY, params); } /** * g_paste_client_delete_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to delete * @error: a #GError * * Delete an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_delete_sync (GPasteClient *self, const gchar *uuid, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (DELETE, string, uuid); } /** * g_paste_client_delete_history_sync: * @self: a #GPasteClient instance * @name: the name of the history to delete * @error: a #GError * * Delete a history */ G_PASTE_VISIBLE void g_paste_client_delete_history_sync (GPasteClient *self, const gchar *name, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (DELETE_HISTORY, string, name); } /** * g_paste_client_delete_password_sync: * @self: a #GPasteClient instance * @name: the name of the password to delete * @error: a #GError * * Delete the password from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_delete_password_sync (GPasteClient *self, const gchar *name, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (DELETE_PASSWORD, string, name); } /** * g_paste_client_empty_history_sync: * @self: a #GPasteClient instance * @name: the name of the history to empty * @error: a #GError * * Empty the history from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_empty_history_sync (GPasteClient *self, const gchar *name, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (EMPTY_HISTORY, string, name); } /** * g_paste_client_get_element_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to get * @error: a #GError * * Get an item from the #GPasteDaemon * * Returns: (transfer full): a newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_client_get_element_sync (GPasteClient *self, const gchar *uuid, GError **error) { DBUS_CALL_ONE_PARAM_RET_STRING (GET_ELEMENT, string, uuid); } /** * g_paste_client_get_element_at_index_sync: * @self: a #GPasteClient instance * @index: the index of the element we want to get * @error: a #GError * * Get an item from the #GPasteDaemon * * Returns: (transfer full): a new #GPasteClientItem */ G_PASTE_VISIBLE GPasteClientItem * g_paste_client_get_element_at_index_sync (GPasteClient *self, guint64 index, GError **error) { DBUS_CALL_ONE_PARAM_RET_ITEM (GET_ELEMENT_AT_INDEX, uint64, index); } static gchar * _g_paste_client_get_element_kind_sync (GPasteClient *self, const gchar *uuid, GError **error) { DBUS_CALL_ONE_PARAM_RET_STRING (GET_ELEMENT_KIND, string, uuid); } /** * g_paste_client_get_element_kind_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to get * @error: a #GError * * Get the kind of an item from the #GPasteDaemon * * Returns: The #GPasteItemKind */ G_PASTE_VISIBLE GPasteItemKind g_paste_client_get_element_kind_sync (GPasteClient *self, const gchar *uuid, GError **error) { g_autofree gchar *kind = _g_paste_client_get_element_kind_sync (self, uuid, error); GEnumValue *k = (kind) ? g_enum_get_value_by_nick (g_type_class_peek (G_PASTE_TYPE_ITEM_KIND), kind) : NULL; return (k) ? k->value : G_PASTE_ITEM_KIND_INVALID; } /** * g_paste_client_get_elements_sync: * @self: a #GPasteClient instance * @uuids: (array length=n_uuids): the uuids of the elements we want to get * @n_uuids: the number of uuids * @error: a #GError * * Get some items from the #GPasteDaemon * * Returns: (element-type GPasteClientItem) (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GList * g_paste_client_get_elements_sync (GPasteClient *self, const gchar **uuids, guint64 n_uuids, GError **error) { GVariant *param = g_variant_new_strv (uuids, n_uuids); DBUS_CALL_ONE_PARAMV_RET_ITEMS (GET_ELEMENTS, param); } /** * g_paste_client_get_history_sync: * @self: a #GPasteClient instance * @error: a #GError * * Get the history from the #GPasteDaemon * * Returns: (element-type GPasteClientItem) (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GList * g_paste_client_get_history_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_RET_ITEMS (GET_HISTORY); } /** * g_paste_client_get_history_name_sync: * @self: a #GPasteClient instance * @error: a #GError * * Get the name of the history from the #GPasteDaemon * * Returns: (transfer full): a newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_client_get_history_name_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_RET_STRING (GET_HISTORY_NAME); } /** * g_paste_client_get_history_size_sync: * @self: a #GPasteClient instance * @name: the name of the history * @error: a #GError * * Get the history size from the #GPasteDaemon * * Returns: the size of the history */ G_PASTE_VISIBLE guint64 g_paste_client_get_history_size_sync (GPasteClient *self, const gchar *name, GError **error) { DBUS_CALL_ONE_PARAM_RET_UINT64 (GET_HISTORY_SIZE, string, name); } /** * g_paste_client_get_raw_element_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to get * @error: a #GError * * Get an item from the #GPasteDaemon * * Returns: (transfer full): a newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_client_get_raw_element_sync (GPasteClient *self, const gchar *uuid, GError **error) { DBUS_CALL_ONE_PARAM_RET_STRING (GET_RAW_ELEMENT, string, uuid); } /** * g_paste_client_get_raw_history_sync: * @self: a #GPasteClient instance * @error: a #GError * * Get the history from the #GPasteDaemon * * Returns: (element-type GPasteClientItem) (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GList * g_paste_client_get_raw_history_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_RET_ITEMS (GET_RAW_HISTORY); } /** * g_paste_client_list_histories_sync: * @self: a #GPasteClient instance * @error: a #GError * * List all available hisotries * * Returns: (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GStrv g_paste_client_list_histories_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_RET_STRV (LIST_HISTORIES); } /** * g_paste_client_merge_sync: * @self: a #GPasteClient instance * @decoration: (nullable): the decoration to apply to each entry * @separator: (nullable): the separator to add between each entry * @uuids: (array length=n_uuids): the uuids of the elements we want to get * @n_uuids: the number of uuids * @error: a #GError * * Merge some history entries * * If decoration is " and separator is , and entries are foo bar baz * result will be "foo","bar","baz" */ G_PASTE_VISIBLE void g_paste_client_merge_sync (GPasteClient *self, const gchar *decoration, const gchar *separator, const gchar **uuids, guint64 n_uuids, GError **error) { GVariant *params[] = { g_variant_new_string (decoration ? decoration : ""), g_variant_new_string (separator ? separator : ""), g_variant_new_strv (uuids, n_uuids) }; DBUS_CALL_THREE_PARAMS_NO_RETURN (MERGE, params); } /** * g_paste_client_on_extension_state_changed_sync: * @self: a #GPasteClient instance * @state: the new state of the extension * @error: a #GError * * Call this when the extension changes its state */ G_PASTE_VISIBLE void g_paste_client_on_extension_state_changed_sync (GPasteClient *self, gboolean state, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (ON_EXTENSION_STATE_CHANGED, boolean, state); } /** * g_paste_client_reexecute_sync: * @self: a #GPasteClient instance * @error: a #GError * * Reexecute the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_reexecute_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_NO_RETURN (REEXECUTE); } /** * g_paste_client_rename_password_sync: * @self: a #GPasteClient instance * @old_name: the name of the password to rename * @new_name: the new name to give it * @error: a #GError * * Rename the password in the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_rename_password_sync (GPasteClient *self, const gchar *old_name, const gchar *new_name, GError **error) { GVariant *params[] = { g_variant_new_string (old_name), g_variant_new_string (new_name) }; DBUS_CALL_TWO_PARAMS_NO_RETURN (RENAME_PASSWORD, params); } /** * g_paste_client_replace_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to replace * @contents: the replacement contents * @error: a #GError * * Replace the contents of an item */ G_PASTE_VISIBLE void g_paste_client_replace_sync (GPasteClient *self, const gchar *uuid, const gchar *contents, GError **error) { GVariant *params[] = { g_variant_new_string (uuid), g_variant_new_string (contents) }; DBUS_CALL_TWO_PARAMS_NO_RETURN (REPLACE, params); } /** * g_paste_client_search_sync: * @self: a #GPasteClient instance * @pattern: the pattern to look for in history * @error: a #GError * * Search for items matching @pattern in history * * Returns: (transfer full): The uuids of the matching items */ G_PASTE_VISIBLE GStrv g_paste_client_search_sync (GPasteClient *self, const gchar *pattern, GError **error) { DBUS_CALL_ONE_PARAM_RET_STRV (SEARCH, string, pattern); } /** * g_paste_client_select_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to select * @error: a #GError * * Select an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_select_sync (GPasteClient *self, const gchar *uuid, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (SELECT, string, uuid); } /** * g_paste_client_set_password_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to set as password * @name: the name to identify the password * @error: a #GError * * Set the item as password */ G_PASTE_VISIBLE void g_paste_client_set_password_sync (GPasteClient *self, const gchar *uuid, const gchar *name, GError **error) { GVariant *params[] = { g_variant_new_string (uuid), g_variant_new_string (name) }; DBUS_CALL_TWO_PARAMS_NO_RETURN (SET_PASSWORD, params); } /** * g_paste_client_show_history_sync: * @self: a #GPasteClient instance * @error: a #GError * * Emit the ShowHistory signal */ G_PASTE_VISIBLE void g_paste_client_show_history_sync (GPasteClient *self, GError **error) { DBUS_CALL_NO_PARAM_NO_RETURN (SHOW_HISTORY); } /** * g_paste_client_switch_history_sync: * @self: a #GPasteClient instance * @name: the name of the history to switch to * @error: a #GError * * Switch to another history */ G_PASTE_VISIBLE void g_paste_client_switch_history_sync (GPasteClient *self, const gchar *name, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (SWITCH_HISTORY, string, name); } /** * g_paste_client_track_sync: * @self: a #GPasteClient instance * @state: the new tracking state of the #GPasteDaemon * @error: a #GError * * Change the tracking state of the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_track_sync (GPasteClient *self, gboolean state, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (TRACK, boolean, state); } /** * g_paste_client_upload_sync: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to upload * @error: a #GError * * Upload an item to a pastebin service */ G_PASTE_VISIBLE void g_paste_client_upload_sync (GPasteClient *self, const gchar *uuid, GError **error) { DBUS_CALL_ONE_PARAM_NO_RETURN (UPLOAD, string, uuid); } /*******************/ /* Methods / Async */ /*******************/ /** * g_paste_client_about: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Display the about dialog */ G_PASTE_VISIBLE void g_paste_client_about (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (ABOUT); } /** * g_paste_client_add: * @self: a #GPasteClient instance * @text: the text to add * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Add an item to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add (GPasteClient *self, const gchar *text, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (ADD, string, text); } /** * g_paste_client_add_file: * @self: a #GPasteClient instance * @file: the file to add * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Add the file contents to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_file (GPasteClient *self, const gchar *file, GAsyncReadyCallback callback, gpointer user_data) { g_autofree gchar *absolute_path = NULL; if (!g_path_is_absolute (file)) { g_autofree gchar *current_dir = g_get_current_dir (); absolute_path = g_build_filename (current_dir, file, NULL); } DBUS_CALL_ONE_PARAM_ASYNC (ADD_FILE, string, ((absolute_path) ? absolute_path : file)); } /** * g_paste_client_add_password: * @self: a #GPasteClient instance * @name: the name to identify the password to add * @password: the password to add * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Add the password to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_password (GPasteClient *self, const gchar *name, const gchar *password, GAsyncReadyCallback callback, gpointer user_data) { GVariant *params[] = { g_variant_new_string (name), g_variant_new_string (password) }; DBUS_CALL_TWO_PARAMS_ASYNC (ADD_PASSWORD, params); } /** * g_paste_client_backup_history: * @self: a #GPasteClient instance * @history: the name of the history * @backup: the name of the backup * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Backup the current history */ G_PASTE_VISIBLE void g_paste_client_backup_history (GPasteClient *self, const gchar *history, const gchar *backup, GAsyncReadyCallback callback, gpointer user_data) { GVariant *params[] = { g_variant_new_string (history), g_variant_new_string (backup) }; DBUS_CALL_TWO_PARAMS_ASYNC (BACKUP_HISTORY, params); } /** * g_paste_client_delete: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to delete * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Delete an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_delete (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (DELETE, string, uuid); } /** * g_paste_client_delete_history: * @self: a #GPasteClient instance * @name: the name of the history to delete * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Delete a history */ G_PASTE_VISIBLE void g_paste_client_delete_history (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (DELETE_HISTORY, string, name); } /** * g_paste_client_delete_password: * @self: a #GPasteClient instance * @name: the name of the password to delete * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: The data to pass to @callback. * * Delete the password from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_delete_password (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (DELETE_PASSWORD, string, name); } /** * g_paste_client_empty_history: * @self: a #GPasteClient instance * @name: the name of the history to empty * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Empty the history from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_empty_history (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (EMPTY_HISTORY, string, name); } /** * g_paste_client_get_element: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to get * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_element (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (GET_ELEMENT, string, uuid); } /** * g_paste_client_get_element_at_index: * @self: a #GPasteClient instance * @index: the index of the element we want to get * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_element_at_index (GPasteClient *self, guint64 index, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (GET_ELEMENT_AT_INDEX, uint64, index); } /** * g_paste_client_get_element_kind: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to get * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get the kind of an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_element_kind (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (GET_ELEMENT_KIND, string, uuid); } /** * g_paste_client_get_elements: * @self: a #GPasteClient instance * @uuids: (array length=n_uuids): the uuids of the elements we want to get * @n_uuids: the number of uuids * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get some items from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_elements (GPasteClient *self, const gchar **uuids, guint64 n_uuids, GAsyncReadyCallback callback, gpointer user_data) { GVariant *param = g_variant_new_strv (uuids, n_uuids); DBUS_CALL_ONE_PARAMV_ASYNC (GET_ELEMENTS, param); } /** * g_paste_client_get_history: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get the history from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_history (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (GET_HISTORY); } /** * g_paste_client_get_history_name: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get the name of the history from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_history_name (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (GET_HISTORY_NAME); } /** * g_paste_client_get_history_size: * @self: a #GPasteClient instance * @name: the name of the history * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get the history isize from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_history_size (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (GET_HISTORY_SIZE, string, name); } /** * g_paste_client_get_raw_element: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to get * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_raw_element (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (GET_RAW_ELEMENT, string, uuid); } /** * g_paste_client_get_raw_history: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Get the history from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_get_raw_history (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (GET_RAW_HISTORY); } /** * g_paste_client_list_histories: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * List all available hisotries */ G_PASTE_VISIBLE void g_paste_client_list_histories (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (LIST_HISTORIES); } /** * g_paste_client_merge: * @self: a #GPasteClient instance * @decoration: (nullable): the decoration to apply to each entry * @separator: (nullable): the separator to add between each entry * @uuids: (array length=n_uuids): the uuids of the elements we want to get * @n_uuids: the number of uuids * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Merge some history entries * * If decoration is " and separator is , and entries are foo bar baz * result will be "foo","bar","baz" */ G_PASTE_VISIBLE void g_paste_client_merge (GPasteClient *self, const gchar *decoration, const gchar *separator, const gchar **uuids, guint64 n_uuids, GAsyncReadyCallback callback, gpointer user_data) { GVariant *params[] = { g_variant_new_string (decoration ? decoration : ""), g_variant_new_string (separator ? separator : ""), g_variant_new_strv (uuids, n_uuids) }; DBUS_CALL_THREE_PARAMS_ASYNC (MERGE, params); } /** * g_paste_client_on_extension_state_changed: * @self: a #GPasteClient instance * @state: the new state of the extension * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Call this when the extension changes its state */ G_PASTE_VISIBLE void g_paste_client_on_extension_state_changed (GPasteClient *self, gboolean state, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (ON_EXTENSION_STATE_CHANGED, boolean, state); } /** * g_paste_client_reexecute: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Reexecute the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_reexecute (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (REEXECUTE); } /** * g_paste_client_rename_password: * @self: a #GPasteClient instance * @old_name: the old name of the password to rename * @new_name: the new name to give it * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: The data to pass to @callback. * * Rename the password in the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_rename_password (GPasteClient *self, const gchar *old_name, const gchar *new_name, GAsyncReadyCallback callback, gpointer user_data) { GVariant *params[] = { g_variant_new_string (old_name), g_variant_new_string (new_name) }; DBUS_CALL_TWO_PARAMS_ASYNC (RENAME_PASSWORD, params); } /** * g_paste_client_replace: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to replace * @contents: the replacement contents * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: The data to pass to @callback. * * Replace the contents of an item */ G_PASTE_VISIBLE void g_paste_client_replace (GPasteClient *self, const gchar *uuid, const gchar *contents, GAsyncReadyCallback callback, gpointer user_data) { GVariant *params[] = { g_variant_new_string (uuid), g_variant_new_string (contents) }; DBUS_CALL_TWO_PARAMS_ASYNC (REPLACE, params); } /** * g_paste_client_search: * @self: a #GPasteClient instance * @pattern: the pattern to look for in history * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Search for items matching @pattern in history */ G_PASTE_VISIBLE void g_paste_client_search (GPasteClient *self, const gchar *pattern, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (SEARCH, string, pattern); } /** * g_paste_client_select: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to select * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Select an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_select (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (SELECT, string, uuid); } /** * g_paste_client_set_password: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to set as password * @name: the name to identify the password * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: The data to pass to @callback. * * Set the item as password */ G_PASTE_VISIBLE void g_paste_client_set_password (GPasteClient *self, const gchar *uuid, const gchar *name, GAsyncReadyCallback callback, gpointer user_data) { GVariant *params[] = { g_variant_new_string (uuid), g_variant_new_string (name) }; DBUS_CALL_TWO_PARAMS_ASYNC (SET_PASSWORD, params); } /** * g_paste_client_show_history: * @self: a #GPasteClient instance * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Emit the ShowHistory signal */ G_PASTE_VISIBLE void g_paste_client_show_history (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_NO_PARAM_ASYNC (SHOW_HISTORY); } /** * g_paste_client_switch_history: * @self: a #GPasteClient instance * @name: the name of the history to switch to * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable):The data to pass to @callback. * * Switch to another history */ G_PASTE_VISIBLE void g_paste_client_switch_history (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (SWITCH_HISTORY, string, name); } /** * g_paste_client_track: * @self: a #GPasteClient instance * @state: the new tracking state of the #GPasteDaemon * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Change the tracking state of the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_track (GPasteClient *self, gboolean state, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (TRACK, boolean, state); } /** * g_paste_client_upload: * @self: a #GPasteClient instance * @uuid: the uuid of the element we want to upload * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * @user_data: (nullable): The data to pass to @callback. * * Upload an item to a pastebin service */ G_PASTE_VISIBLE void g_paste_client_upload (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data) { DBUS_CALL_ONE_PARAM_ASYNC (UPLOAD, string, uuid); } /****************************/ /* Methods / Async - Finish */ /****************************/ /** * g_paste_client_about_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Display the about dialog */ G_PASTE_VISIBLE void g_paste_client_about_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_add_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Add an item to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_add_file_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Add the file contents to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_file_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_add_password_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Add the password to the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_add_password_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_backup_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Backup the current history */ G_PASTE_VISIBLE void g_paste_client_backup_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_delete_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Delete an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_delete_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_delete_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Delete a history */ G_PASTE_VISIBLE void g_paste_client_delete_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_delete_password_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Delete the password from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_delete_password_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_empty_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Empty the history from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_empty_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_get_element_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get an item from the #GPasteDaemon * * Returns: (transfer full): a newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_client_get_element_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_STRING; } /** * g_paste_client_get_element_at_index_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get an item from the #GPasteDaemon * * Returns: (transfer full): a new #GPasteClientItem */ G_PASTE_VISIBLE GPasteClientItem * g_paste_client_get_element_at_index_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_ITEM; } static gchar * _g_paste_client_get_element_kind_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_STRING; } /** * g_paste_client_get_element_kind_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get this kind of an item from the #GPasteDaemon * * Returns: The #GPasteItemKind */ G_PASTE_VISIBLE GPasteItemKind g_paste_client_get_element_kind_finish (GPasteClient *self, GAsyncResult *result, GError **error) { g_autofree gchar *kind = _g_paste_client_get_element_kind_finish (self, result, error); GEnumValue *k = (kind) ? g_enum_get_value_by_nick (g_type_class_peek (G_PASTE_TYPE_ITEM_KIND), kind) : NULL; return (k) ? k->value : G_PASTE_ITEM_KIND_INVALID; } /** * g_paste_client_get_elements_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get some items from the #GPasteDaemon * * Returns: (element-type GPasteClientItem) (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GList * g_paste_client_get_elements_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_ITEMS; } /** * g_paste_client_get_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get the history from the #GPasteDaemon * * Returns: (element-type GPasteClientItem) (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GList * g_paste_client_get_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_ITEMS; } /** * g_paste_client_get_history_name_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get the name of the history from the #GPasteDaemon * * Returns: (transfer full): a newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_client_get_history_name_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_STRING; } /** * g_paste_client_get_history_size_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get the history size from the #GPasteDaemon * * Returns: the size of the history */ G_PASTE_VISIBLE guint64 g_paste_client_get_history_size_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_UINT64; } /** * g_paste_client_get_raw_element_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get an item from the #GPasteDaemon * * Returns: (transfer full): a newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_client_get_raw_element_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_STRING; } /** * g_paste_client_get_raw_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Get the history from the #GPasteDaemon * * Returns: (element-type GPasteClientItem) (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GList * g_paste_client_get_raw_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_ITEMS; } /** * g_paste_client_list_histories_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * List all available hisotries * * Returns: (transfer full): a newly allocated array of string */ G_PASTE_VISIBLE GStrv g_paste_client_list_histories_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_STRV; } /** * g_paste_client_merge_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Merge some history entries */ G_PASTE_VISIBLE void g_paste_client_merge_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_on_extension_state_changed_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Call this when the extension changes its state */ G_PASTE_VISIBLE void g_paste_client_on_extension_state_changed_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_reexecute_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Reexecute the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_reexecute_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_rename_password_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Rename the password in the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_rename_password_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_replace_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Replace the contents of an item */ G_PASTE_VISIBLE void g_paste_client_replace_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_search_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Search for items matching @pattern in history * * Returns: (transfer full): The indexes of the matching items */ G_PASTE_VISIBLE GStrv g_paste_client_search_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_RET_STRV; } /** * g_paste_client_select_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Select an item from the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_select_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_set_password_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Set the item as password */ G_PASTE_VISIBLE void g_paste_client_set_password_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_show_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Emit the ShowHistory signal */ G_PASTE_VISIBLE void g_paste_client_show_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_switch_history_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Switch to another history */ G_PASTE_VISIBLE void g_paste_client_switch_history_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_track_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Change the tracking state of the #GPasteDaemon */ G_PASTE_VISIBLE void g_paste_client_track_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /** * g_paste_client_upload_finish: * @self: a #GPasteClient instance * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call. * @error: a #GError * * Upload an item to a pastebin service */ G_PASTE_VISIBLE void g_paste_client_upload_finish (GPasteClient *self, GAsyncResult *result, GError **error) { DBUS_ASYNC_FINISH_NO_RETURN; } /**************/ /* Properties */ /**************/ /** * g_paste_client_is_active: * @self: a #GPasteClient instance * * Check if the daemon is active * * Returns: whether the daemon is active or not */ G_PASTE_VISIBLE gboolean g_paste_client_is_active (GPasteClient *self) { DBUS_GET_BOOLEAN_PROPERTY (ACTIVE); } /** * g_paste_client_get_version: * @self: a #GPasteClient instance * * Get the version of the running gpaste daemon * * Returns: the version of the daemon */ G_PASTE_VISIBLE gchar * g_paste_client_get_version (GPasteClient *self) { DBUS_GET_STRING_PROPERTY (VERSION); } static void g_paste_client_g_signal (GDBusProxy *proxy, const gchar *sender_name G_GNUC_UNUSED, const gchar *signal_name, GVariant *parameters) { GPasteClient *self = G_PASTE_CLIENT (proxy); HANDLE_SIGNAL (SHOW_HISTORY) else HANDLE_SIGNAL_WITH_DATA (DELETE_HISTORY, const gchar *, g_variant_get_string (variant, NULL)) else HANDLE_SIGNAL_WITH_DATA (EMPTY_HISTORY, const gchar *, g_variant_get_string (variant, NULL)) else HANDLE_SIGNAL_WITH_DATA (SWITCH_HISTORY, const gchar *, g_variant_get_string (variant, NULL)) else if (g_paste_str_equal (signal_name, G_PASTE_DAEMON_SIG_UPDATE)) { GVariantIter params_iter; g_variant_iter_init (¶ms_iter, parameters); g_autoptr (GVariant) v1 = g_variant_iter_next_value (¶ms_iter); g_autoptr (GVariant) v2 = g_variant_iter_next_value (¶ms_iter); g_autoptr (GVariant) v3 = g_variant_iter_next_value (¶ms_iter); g_signal_emit (self, signals[UPDATE], 0, /* detail */ g_enum_get_value_by_nick (g_type_class_peek (G_PASTE_TYPE_UPDATE_ACTION), g_variant_get_string (v1, NULL))->value, g_enum_get_value_by_nick (g_type_class_peek (G_PASTE_TYPE_UPDATE_TARGET), g_variant_get_string (v2, NULL))->value, g_variant_get_uint64 (v3), NULL); } } static void g_paste_client_g_properties_changed (GDBusProxy *proxy, GVariant *changed_properties, const gchar * const *invalidated_properties G_GNUC_UNUSED) { GPasteClient *self = G_PASTE_CLIENT (proxy); GVariantDict dict; g_variant_dict_init (&dict, changed_properties); if (g_variant_dict_contains (&dict, G_PASTE_DAEMON_PROP_ACTIVE)) { g_autoptr (GVariant) v = g_dbus_proxy_get_cached_property (proxy, G_PASTE_DAEMON_PROP_ACTIVE); g_signal_emit (self, signals[TRACKING], 0, /* detail */ g_variant_get_boolean (v), NULL); } } static void g_paste_client_class_init (GPasteClientClass *klass) { GDBusProxyClass *proxy_class = G_DBUS_PROXY_CLASS (klass); proxy_class->g_signal = g_paste_client_g_signal; proxy_class->g_properties_changed = g_paste_client_g_properties_changed; /** * GPasteClient::delete-history: * @client: the object on which the signal was emitted * @history: the name of the history we deleted * * The "delete-history" signal is emitted when we delete * a history. */ signals[DELETE_HISTORY] = NEW_SIGNAL_WITH_DATA ("delete-history", STRING); /** * GPasteClient::empty-history: * @client: the object on which the signal was emitted * @history: the name of the history we emptied * * The "empty-history" signal is emitted when we empty * a history. */ signals[EMPTY_HISTORY] = NEW_SIGNAL_WITH_DATA ("empty-history", STRING); /** * GPasteClient::show-history: * @client: the object on which the signal was emitted * * The "show-history" signal is emitted when we switch * from a history to another. */ signals[SHOW_HISTORY] = NEW_SIGNAL ("show-history"); /** * GPasteClient::switch-history: * @client: the object on which the signal was emitted * @history: the name of the history we switch to * * The "switch-history" signal is emitted when we switch * from a history to another. */ signals[SWITCH_HISTORY] = NEW_SIGNAL_WITH_DATA ("switch-history", STRING); /** * GPasteClient::track: * @client: the object on which the signal was emitted * @tracking_state: whether we're now tracking or not * * The "tracking" signal is emitted when the daemon starts or stops tracking * clipboard changes. */ signals[TRACKING] = NEW_SIGNAL_WITH_DATA ("tracking", BOOLEAN); /** * GPasteClient::update: * @client: the object on which the signal was emitted * @action: the kind of update * @target: the items which need updating * @index: the index of the item, when the target is POSITION * * The "update" signal is emitted whenever anything changed * in the history (something was added, removed, selected, replaced...). */ signals[UPDATE] = g_signal_new ("update", G_PASTE_TYPE_CLIENT, G_SIGNAL_RUN_LAST, 0, /* class offset */ NULL, /* accumulator */ NULL, /* accumulator data */ g_cclosure_marshal_generic, G_TYPE_NONE, 3, /* number of params */ G_PASTE_TYPE_UPDATE_ACTION, G_PASTE_TYPE_UPDATE_TARGET, G_TYPE_UINT64); } static void g_paste_client_init (GPasteClient *self) { GDBusProxy *proxy = G_DBUS_PROXY (self); g_autoptr (GDBusNodeInfo) g_paste_daemon_dbus_info = g_dbus_node_info_new_for_xml (G_PASTE_DAEMON_INTERFACE, NULL); /* Error */ g_dbus_proxy_set_interface_info (proxy, g_paste_daemon_dbus_info->interfaces[0]); } /** * g_paste_client_new_sync: * @error: Return location for error or %NULL. * * Create a new instance of #GPasteClient * * Returns: (transfer full): a newly allocated #GPasteClient * free it with g_object_unref */ G_PASTE_VISIBLE GPasteClient * g_paste_client_new_sync (GError **error) { CUSTOM_PROXY_NEW (CLIENT, DAEMON, G_PASTE_BUS_NAME); } /** * g_paste_client_new: * @callback: Callback function to invoke when the proxy is ready. * @user_data: User data to pass to @callback. * * Create a new instance of #GPasteClient */ G_PASTE_VISIBLE void g_paste_client_new (GAsyncReadyCallback callback, gpointer user_data) { CUSTOM_PROXY_NEW_ASYNC (CLIENT, DAEMON, G_PASTE_BUS_NAME); } /** * g_paste_client_new_finish: * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to the async ctor. * @error: Return location for error or %NULL. * * Create a new instance of #GPasteClient * * Returns: (transfer full): a newly allocated #GPasteClient * free it with g_object_unref */ G_PASTE_VISIBLE GPasteClient * g_paste_client_new_finish (GAsyncResult *result, GError **error) { CUSTOM_PROXY_NEW_FINISH (CLIENT); } gpaste-3.42.6/src/ui/tmp/gpaste-client.h000066400000000000000000000627151421222064600200170ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_CLIENT_H__ #define __G_PASTE_CLIENT_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_CLIENT (g_paste_client_get_type ()) G_PASTE_FINAL_TYPE (Client, client, CLIENT, GDBusProxy) /*******************/ /* Methods / Sync */ /*******************/ void g_paste_client_about_sync (GPasteClient *self, GError **error); void g_paste_client_add_sync (GPasteClient *self, const gchar *text, GError **error); void g_paste_client_add_file_sync (GPasteClient *self, const gchar *file, GError **error); void g_paste_client_add_password_sync (GPasteClient *self, const gchar *name, const gchar *password, GError **error); void g_paste_client_backup_history_sync (GPasteClient *self, const gchar *history, const gchar *backup, GError **error); void g_paste_client_delete_sync (GPasteClient *self, const gchar *uuid, GError **error); void g_paste_client_delete_history_sync (GPasteClient *self, const gchar *name, GError **error); void g_paste_client_delete_password_sync (GPasteClient *self, const gchar *name, GError **error); void g_paste_client_empty_history_sync (GPasteClient *self, const gchar *name, GError **error); gchar *g_paste_client_get_element_sync (GPasteClient *self, const gchar *uuid, GError **error); GList *g_paste_client_get_elements_sync (GPasteClient *self, const gchar **uuids, guint64 n_uuids, GError **error); GList *g_paste_client_get_history_sync (GPasteClient *self, GError **error); gchar *g_paste_client_get_history_name_sync (GPasteClient *self, GError **error); guint64 g_paste_client_get_history_size_sync (GPasteClient *self, const gchar *name, GError **error); gchar *g_paste_client_get_raw_element_sync (GPasteClient *self, const gchar *uuid, GError **error); GList *g_paste_client_get_raw_history_sync (GPasteClient *self, GError **error); GStrv g_paste_client_list_histories_sync (GPasteClient *self, GError **error); void g_paste_client_merge_sync (GPasteClient *self, const gchar *decoration, const gchar *separator, const gchar **uuids, guint64 n_uuids, GError **error); void g_paste_client_on_extension_state_changed_sync (GPasteClient *self, gboolean state, GError **error); void g_paste_client_reexecute_sync (GPasteClient *self, GError **error); void g_paste_client_rename_password_sync (GPasteClient *self, const gchar *old_name, const gchar *new_name, GError **error); void g_paste_client_replace_sync (GPasteClient *self, const gchar *uuid, const gchar *contents, GError **error); GStrv g_paste_client_search_sync (GPasteClient *self, const gchar *pattern, GError **error); void g_paste_client_select_sync (GPasteClient *self, const gchar *uuid, GError **error); void g_paste_client_set_password_sync (GPasteClient *self, const gchar *uuid, const gchar *name, GError **error); void g_paste_client_show_history_sync (GPasteClient *self, GError **error); void g_paste_client_switch_history_sync (GPasteClient *self, const gchar *name, GError **error); void g_paste_client_track_sync (GPasteClient *self, gboolean state, GError **error); void g_paste_client_upload_sync (GPasteClient *self, const gchar *uuid, GError **error); GPasteClientItem *g_paste_client_get_element_at_index_sync (GPasteClient *self, guint64 index, GError **error); GPasteItemKind g_paste_client_get_element_kind_sync (GPasteClient *self, const gchar *uuid, GError **error); /*******************/ /* Methods / Async */ /*******************/ void g_paste_client_about (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_add (GPasteClient *self, const gchar *text, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_add_file (GPasteClient *self, const gchar *file, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_add_password (GPasteClient *self, const gchar *name, const gchar *password, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_backup_history (GPasteClient *self, const gchar *history, const gchar *backup, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_delete (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_delete_history (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_delete_password (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_empty_history (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_element (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_element_at_index (GPasteClient *self, guint64 index, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_element_kind (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_elements (GPasteClient *self, const gchar **uuids, guint64 n_uuids, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_history (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_history_name (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_history_size (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_raw_element (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_get_raw_history (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_list_histories (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_merge (GPasteClient *self, const gchar *decoration, const gchar *separator, const gchar **uuids, guint64 n_uuids, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_on_extension_state_changed (GPasteClient *self, gboolean state, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_reexecute (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_rename_password (GPasteClient *self, const gchar *old_name, const gchar *new_name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_replace (GPasteClient *self, const gchar *uuid, const gchar *contents, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_search (GPasteClient *self, const gchar *pattern, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_select (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_set_password (GPasteClient *self, const gchar *uuid, const gchar *name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_show_history (GPasteClient *self, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_switch_history (GPasteClient *self, const gchar *name, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_track (GPasteClient *self, gboolean state, GAsyncReadyCallback callback, gpointer user_data); void g_paste_client_upload (GPasteClient *self, const gchar *uuid, GAsyncReadyCallback callback, gpointer user_data); /****************************/ /* Methods / Async - Finish */ /****************************/ void g_paste_client_about_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_add_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_add_file_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_add_password_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_backup_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_delete_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_delete_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_delete_password_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_empty_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); gchar *g_paste_client_get_element_finish (GPasteClient *self, GAsyncResult *result, GError **error); GList *g_paste_client_get_elements_finish (GPasteClient *self, GAsyncResult *result, GError **error); GList *g_paste_client_get_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); gchar *g_paste_client_get_history_name_finish (GPasteClient *self, GAsyncResult *result, GError **error); guint64 g_paste_client_get_history_size_finish (GPasteClient *self, GAsyncResult *result, GError **error); gchar *g_paste_client_get_raw_element_finish (GPasteClient *self, GAsyncResult *result, GError **error); GList *g_paste_client_get_raw_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); GStrv g_paste_client_list_histories_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_merge_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_on_extension_state_changed_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_reexecute_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_rename_password_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_replace_finish (GPasteClient *self, GAsyncResult *result, GError **error); GStrv g_paste_client_search_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_select_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_set_password_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_show_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_switch_history_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_track_finish (GPasteClient *self, GAsyncResult *result, GError **error); void g_paste_client_upload_finish (GPasteClient *self, GAsyncResult *result, GError **error); GPasteClientItem *g_paste_client_get_element_at_index_finish (GPasteClient *self, GAsyncResult *result, GError **error); GPasteItemKind g_paste_client_get_element_kind_finish (GPasteClient *self, GAsyncResult *result, GError **error); /**************/ /* Properties */ /**************/ gboolean g_paste_client_is_active (GPasteClient *self); gchar *g_paste_client_get_version (GPasteClient *self); /****************/ /* Constructors */ /****************/ GPasteClient *g_paste_client_new_sync (GError **error); void g_paste_client_new (GAsyncReadyCallback callback, gpointer user_data); GPasteClient *g_paste_client_new_finish (GAsyncResult *result, GError **error); G_END_DECLS #endif /*__G_PASTE_CLIENT_H__*/ gpaste-3.42.6/src/ui/tmp/gpaste-item-enums.c000066400000000000000000000016351421222064600206110ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include G_PASTE_VISIBLE GType g_paste_item_kind_get_type (void) { static GType etype = 0; if (!etype) { static const GEnumValue values[] = { { G_PASTE_ITEM_KIND_TEXT, "G_PASTE_ITEM_KIND_TEXT", "Text" }, { G_PASTE_ITEM_KIND_URIS, "G_PASTE_ITEM_KIND_URIS", "Uris" }, { G_PASTE_ITEM_KIND_IMAGE, "G_PASTE_ITEM_KIND_IMAGE", "Image" }, { G_PASTE_ITEM_KIND_PASSWORD, "G_PASTE_ITEM_KIND_PASSWORD", "Password" }, { G_PASTE_ITEM_KIND_INVALID, NULL, NULL } }; etype = g_enum_register_static (g_intern_static_string ("GPasteItemKind"), values); g_type_class_ref (etype); } return etype; } gpaste-3.42.6/src/ui/tmp/gpaste-item-enums.h000066400000000000000000000012751421222064600206160ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_ITEM_ENUMS_H__ #define __G_PASTE_ITEM_ENUMS_H__ #include G_BEGIN_DECLS typedef enum { G_PASTE_ITEM_KIND_TEXT = 1, G_PASTE_ITEM_KIND_URIS, G_PASTE_ITEM_KIND_IMAGE, G_PASTE_ITEM_KIND_PASSWORD, G_PASTE_ITEM_KIND_INVALID = 0 } GPasteItemKind; #define G_PASTE_TYPE_ITEM_KIND (g_paste_item_kind_get_type ()) GType g_paste_item_kind_get_type (void); G_END_DECLS #endif /*__G_PASTE_ITEM_ENUMS_H__*/ gpaste-3.42.6/src/ui/tmp/gpaste-settings-ui-panel.c000066400000000000000000000266671421222064600221120ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include struct _GPasteSettingsUiPanel { GtkGrid parent_instance; }; typedef struct { GSList *callback_data; guint64 current_line; } GPasteSettingsUiPanelPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (SettingsUiPanel, settings_ui_panel, GTK_TYPE_GRID) #define CALLBACK_DATA(w) \ GPasteSettingsUiPanelPrivate *priv = g_paste_settings_ui_panel_get_instance_private (self); \ _CallbackDataWrapper *_data = (_CallbackDataWrapper *) g_malloc0 (sizeof (_CallbackDataWrapper)); \ CallbackDataWrapper *data = (CallbackDataWrapper *) _data; \ priv->callback_data = g_slist_prepend (priv->callback_data, _data); \ _data->widget = GTK_WIDGET (w); \ data->callback = G_CALLBACK (on_value_changed); \ data->reset_cb = on_reset; \ data->custom_data = user_data; #define G_PASTE_CALLBACK(cb_type) \ CallbackDataWrapper *data = (CallbackDataWrapper *) user_data; \ ((cb_type) data->callback) #define G_PASTE_RESET_CALLBACK() \ CallbackDataWrapper *data = (CallbackDataWrapper *) user_data; \ (data->reset_cb) typedef struct { GCallback callback; GPasteResetCallback reset_cb; gpointer custom_data; } CallbackDataWrapper; enum { C_W_ACTION, C_W_RESET, C_W_LAST_SIGNAL }; typedef struct { CallbackDataWrapper wrap; GtkWidget *widget; GtkWidget *reset_widget; guint64 c_signals[C_W_LAST_SIGNAL]; } _CallbackDataWrapper; static void boolean_wrapper (GObject *object, GParamSpec *pspec G_GNUC_UNUSED, gpointer user_data) { G_PASTE_CALLBACK (GPasteBooleanCallback) (gtk_switch_get_active (GTK_SWITCH (object)), data->custom_data); } static GtkLabel * g_paste_settings_ui_panel_add_label (GPasteSettingsUiPanel *self, const gchar *label) { GtkWidget *button_label = gtk_widget_new (GTK_TYPE_LABEL, "label", label, "xalign", 0.0, NULL); GPasteSettingsUiPanelPrivate *priv = g_paste_settings_ui_panel_get_instance_private (self); gtk_widget_set_hexpand (button_label, TRUE); gtk_grid_attach (GTK_GRID (self), button_label, 0, priv->current_line++, 1, 1); return GTK_LABEL (button_label); } static gboolean g_paste_settings_ui_panel_on_reset_pressed (GtkWidget *widget G_GNUC_UNUSED, GdkEventButton *event G_GNUC_UNUSED, gpointer user_data) { G_PASTE_RESET_CALLBACK () (data->custom_data); return FALSE; } static GtkWidget * g_paste_settings_ui_panel_make_reset_button (_CallbackDataWrapper *data) { data->reset_widget = gtk_button_new_from_icon_name ("edit-delete-symbolic", GTK_ICON_SIZE_BUTTON); data->c_signals[C_W_RESET] = g_signal_connect (data->reset_widget, "button-press-event", G_CALLBACK (g_paste_settings_ui_panel_on_reset_pressed), data); if (!((CallbackDataWrapper *) data)->reset_cb) gtk_widget_set_sensitive (data->reset_widget, FALSE); return data->reset_widget; } /** * g_paste_settings_ui_panel_add_boolean_setting: * @self: a #GPasteSettingsUiPanel instance * @label: the label to display * @value: the deafault value * @on_value_changed: (closure user_data) (scope notified): the callback to call when the value changes * @on_reset: (closure user_data) (scope notified): the callback to call when the value is reset * * Add a new boolean settings to the current pane * * Returns: (transfer none): the #GtkSwitch we just added */ G_PASTE_VISIBLE GtkSwitch * g_paste_settings_ui_panel_add_boolean_setting (GPasteSettingsUiPanel *self, const gchar *label, gboolean value, GPasteBooleanCallback on_value_changed, GPasteResetCallback on_reset, gpointer user_data) { GtkGrid *grid = GTK_GRID (self); GtkLabel *button_label = g_paste_settings_ui_panel_add_label (self, label); GtkWidget *widget = gtk_switch_new (); GtkSwitch *sw = GTK_SWITCH (widget); CALLBACK_DATA (widget); gtk_switch_set_active (sw, value); _data->c_signals[C_W_ACTION] = g_signal_connect (widget, "notify::active", G_CALLBACK (boolean_wrapper), data); gtk_grid_attach_next_to (grid, widget, GTK_WIDGET (button_label), GTK_POS_RIGHT, 1, 1); gtk_grid_attach_next_to (grid, g_paste_settings_ui_panel_make_reset_button (_data), widget, GTK_POS_RIGHT, 1, 1); return sw; } /** * g_paste_settings_ui_panel_add_separator: * @self: a #GPasteSettingsUiPanel instance * * Add a new separator to the current pane */ G_PASTE_VISIBLE void g_paste_settings_ui_panel_add_separator (GPasteSettingsUiPanel *self) { GPasteSettingsUiPanelPrivate *priv = g_paste_settings_ui_panel_get_instance_private (self); gtk_grid_attach (GTK_GRID (self), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL), 0, priv->current_line++, 3, 1); } static void range_wrapper (GtkSpinButton *spinbutton, gpointer user_data) { G_PASTE_CALLBACK (GPasteRangeCallback) (gtk_spin_button_get_value (spinbutton), data->custom_data); } /** * g_paste_settings_ui_panel_add_range_setting: * @self: a #GPasteSettingsUiPanel instance * @label: the label to display * @value: the deafault value * @min: the minimal authorized value * @max: the maximal authorized value * @step: the step between proposed values * @on_value_changed: (closure user_data) (scope notified): the callback to call when the value changes * @on_reset: (closure user_data) (scope notified): the callback to call when the value is reset * * Add a new boolean settings to the current pane * * Returns: (transfer none): the #GtkSpinButton we just added */ G_PASTE_VISIBLE GtkSpinButton * g_paste_settings_ui_panel_add_range_setting (GPasteSettingsUiPanel *self, const gchar *label, gdouble value, gdouble min, gdouble max, gdouble step, GPasteRangeCallback on_value_changed, GPasteResetCallback on_reset, gpointer user_data) { GtkGrid *grid = GTK_GRID (self); GtkLabel *button_label = g_paste_settings_ui_panel_add_label (self, label); GtkWidget *button = gtk_spin_button_new_with_range (min, max, step); GtkSpinButton *b = GTK_SPIN_BUTTON (button); CALLBACK_DATA (button); gtk_widget_set_hexpand (button, TRUE); gtk_spin_button_set_value (b, value); _data->c_signals[C_W_ACTION] = g_signal_connect (GTK_SPIN_BUTTON (button), "value-changed", G_CALLBACK (range_wrapper), data); gtk_grid_attach_next_to (grid, button, GTK_WIDGET (button_label), GTK_POS_RIGHT, 1, 1); gtk_grid_attach_next_to (grid, g_paste_settings_ui_panel_make_reset_button (_data), button, GTK_POS_RIGHT, 1, 1); return b; } static void text_wrapper (GtkEditable *editable, gpointer user_data) { G_PASTE_CALLBACK (GPasteTextCallback) (gtk_entry_get_text (GTK_ENTRY (editable)), data->custom_data); } /** * g_paste_settings_ui_panel_add_text_setting: * @self: a #GPasteSettingsUiPanel instance * @label: the label to display * @value: the deafault value * @on_value_changed: (closure user_data) (scope notified): the callback to call when the value changes * @on_reset: (closure user_data) (scope notified): the callback to call when the value is reset * * Add a new text settings to the current pane * * Returns: (transfer none): the #GtkEntry we just added */ G_PASTE_VISIBLE GtkEntry * g_paste_settings_ui_panel_add_text_setting (GPasteSettingsUiPanel *self, const gchar *label, const gchar *value, GPasteTextCallback on_value_changed, GPasteResetCallback on_reset, gpointer user_data) { GtkGrid *grid = GTK_GRID (self); GtkLabel *entry_label = g_paste_settings_ui_panel_add_label (self, label); GtkWidget *entry = gtk_entry_new (); GtkEntry *e = GTK_ENTRY (entry); CALLBACK_DATA (entry); gtk_widget_set_hexpand (entry, TRUE); gtk_entry_set_text (e, value); _data->c_signals[C_W_ACTION] = g_signal_connect (GTK_EDITABLE (entry), "changed", G_CALLBACK (text_wrapper), data); gtk_grid_attach_next_to (GTK_GRID (self), entry, GTK_WIDGET (entry_label), GTK_POS_RIGHT, 1, 1); if (on_reset) gtk_grid_attach_next_to (grid, g_paste_settings_ui_panel_make_reset_button (_data), entry, GTK_POS_RIGHT, 1, 1); return e; } static void clean_callback_data (gpointer data, gpointer user_data G_GNUC_UNUSED) { g_autofree _CallbackDataWrapper *wrap = data; g_signal_handler_disconnect (wrap->widget, wrap->c_signals[C_W_ACTION]); if (wrap->reset_widget) g_signal_handler_disconnect (wrap->reset_widget, wrap->c_signals[C_W_RESET]); } static void g_paste_settings_ui_panel_dispose (GObject *object) { GPasteSettingsUiPanelPrivate *priv = g_paste_settings_ui_panel_get_instance_private (G_PASTE_SETTINGS_UI_PANEL (object)); g_slist_foreach (priv->callback_data, clean_callback_data, NULL); g_slist_free (priv->callback_data); priv->callback_data = NULL; G_OBJECT_CLASS (g_paste_settings_ui_panel_parent_class)->dispose (object); } static void g_paste_settings_ui_panel_class_init (GPasteSettingsUiPanelClass *klass) { G_OBJECT_CLASS (klass)->dispose = g_paste_settings_ui_panel_dispose; } static void g_paste_settings_ui_panel_init (GPasteSettingsUiPanel *self) { GPasteSettingsUiPanelPrivate *priv = g_paste_settings_ui_panel_get_instance_private (self); priv->callback_data = NULL; priv->current_line = 0; GtkGrid *grid = GTK_GRID (self); gtk_grid_set_column_spacing (grid, 10); gtk_grid_set_row_spacing (grid, 10); } /** * g_paste_settings_ui_panel_new: * * Create a new instance of #GPasteSettingsUiPanel * * Returns: a newly allocated #GPasteSettingsUiPanel * free it with g_object_unref */ G_PASTE_VISIBLE GPasteSettingsUiPanel * g_paste_settings_ui_panel_new (void) { return G_PASTE_SETTINGS_UI_PANEL (gtk_widget_new (G_PASTE_TYPE_SETTINGS_UI_PANEL, NULL)); } gpaste-3.42.6/src/ui/tmp/gpaste-settings-ui-panel.h000066400000000000000000000057701421222064600221070ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SETTINGS_UI_PANEL_H__ #define __G_PASTE_SETTINGS_UI_PANEL_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_SETTINGS_UI_PANEL (g_paste_settings_ui_panel_get_type ()) G_PASTE_FINAL_TYPE (SettingsUiPanel, settings_ui_panel, SETTINGS_UI_PANEL, GtkGrid) typedef void (*GPasteBooleanCallback) (gboolean data, gpointer user_data); typedef void (*GPasteRangeCallback) (gdouble data, gpointer user_data); typedef void (*GPasteTextCallback) (const gchar *data, gpointer user_data); typedef void (*GPasteResetCallback) (gpointer user_data); GtkSwitch *g_paste_settings_ui_panel_add_boolean_setting (GPasteSettingsUiPanel *self, const gchar *label, gboolean value, GPasteBooleanCallback on_value_changed, GPasteResetCallback on_reset, gpointer user_data); void g_paste_settings_ui_panel_add_separator (GPasteSettingsUiPanel *self); GtkSpinButton *g_paste_settings_ui_panel_add_range_setting (GPasteSettingsUiPanel *self, const gchar *label, gdouble value, gdouble min, gdouble max, gdouble step, GPasteRangeCallback on_value_changed, GPasteResetCallback on_reset, gpointer user_data); GtkEntry *g_paste_settings_ui_panel_add_text_setting (GPasteSettingsUiPanel *self, const gchar *label, const gchar *value, GPasteTextCallback on_value_changed, GPasteResetCallback on_reset, gpointer user_data); GPasteSettingsUiPanel *g_paste_settings_ui_panel_new (void); G_END_DECLS #endif /*__G_PASTE_SETTINGS_UI_PANEL_H__*/ gpaste-3.42.6/src/ui/tmp/gpaste-settings-ui-stack.c000066400000000000000000000740631421222064600221110ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include struct _GPasteSettingsUiStack { GtkStack parent_instance; }; enum { C_SETTINGS, C_LAST_SIGNAL }; typedef struct { GPasteClient *client; GPasteSettings *settings; GError *init_error; GtkSwitch *close_on_select_switch; GtkSwitch *images_support_switch; GtkSwitch *growing_lines_switch; GtkSwitch *primary_to_history_switch; GtkSwitch *save_history_switch; GtkSwitch *synchronize_clipboards_switch; GtkSwitch *track_changes_switch; GtkSwitch *trim_items_switch; GtkSpinButton *element_size_button; GtkSpinButton *max_displayed_history_size_button; GtkSpinButton *max_history_size_button; GtkSpinButton *max_memory_usage_button; GtkSpinButton *max_text_item_size_button; GtkSpinButton *min_text_item_size_button; GtkEntry *launch_ui_entry; GtkEntry *make_password_entry; GtkEntry *pop_entry; GtkEntry *show_history_entry; GtkEntry *sync_clipboard_to_primary_entry; GtkEntry *sync_primary_to_clipboard_entry; GtkEntry *upload_entry; gchar ***actions; GtkSwitch *extension_enabled_switch; GtkSwitch *track_extension_state_switch; guint64 c_signals[C_LAST_SIGNAL]; } GPasteSettingsUiStackPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (SettingsUiStack, settings_ui_stack, GTK_TYPE_STACK) #define SETTING_CALLBACK_FULL(setting, type, cast) \ static inline void \ setting##_callback (type value, \ gpointer user_data) \ { \ g_paste_settings_set_##setting (G_PASTE_SETTINGS (user_data), value); \ } #define SETTING_CALLBACK(setting, type) SETTING_CALLBACK_FULL (setting, type, type) #define BOOLEAN_CALLBACK(setting) SETTING_CALLBACK (setting, gboolean) #define STRING_CALLBACK(setting) SETTING_CALLBACK (setting, const gchar *) #define UINT64_CALLBACK(setting) SETTING_CALLBACK_FULL (setting, gdouble, uint64) /** * g_paste_settings_ui_stack_add_panel: * @self: a #GPasteSettingsUiStack instance * @name: the name of the panel * @label: the label to display * @panel: (transfer none): the #GPasteSettingsUiPanel to add * * Add a new panel to the #GPasteSettingsUiStack */ G_PASTE_VISIBLE void g_paste_settings_ui_stack_add_panel (GPasteSettingsUiStack *self, const gchar *name, const gchar *label, GPasteSettingsUiPanel *panel) { g_return_if_fail (_G_PASTE_IS_SETTINGS_UI_STACK (self)); gtk_stack_add_titled (GTK_STACK (self), GTK_WIDGET (panel), name, label); } BOOLEAN_CALLBACK (close_on_select) BOOLEAN_CALLBACK (extension_enabled) BOOLEAN_CALLBACK (growing_lines) BOOLEAN_CALLBACK (images_support) BOOLEAN_CALLBACK (primary_to_history) BOOLEAN_CALLBACK (save_history) BOOLEAN_CALLBACK (synchronize_clipboards) BOOLEAN_CALLBACK (track_changes) BOOLEAN_CALLBACK (track_extension_state) BOOLEAN_CALLBACK (trim_items) static GPasteSettingsUiPanel * g_paste_settings_ui_stack_private_make_behaviour_panel (GPasteSettingsUiStackPrivate *priv) { GPasteSettings *settings = priv->settings; GPasteSettingsUiPanel *panel = g_paste_settings_ui_panel_new (); priv->track_changes_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Track clipboard changes"), g_paste_settings_get_track_changes (settings), track_changes_callback, (GPasteResetCallback) g_paste_settings_reset_track_changes, settings); priv->close_on_select_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Close UI on select"), g_paste_settings_get_close_on_select (settings), close_on_select_callback, (GPasteResetCallback) g_paste_settings_reset_close_on_select, settings); if (g_paste_util_has_gnome_shell ()) { priv->extension_enabled_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Enable the gnome-shell extension"), g_paste_settings_get_extension_enabled (settings), extension_enabled_callback, NULL, settings); priv->track_extension_state_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Sync the daemon state with the extension's one"), g_paste_settings_get_track_extension_state (settings), track_extension_state_callback, (GPasteResetCallback) g_paste_settings_reset_track_extension_state, settings); } g_paste_settings_ui_panel_add_separator (panel); priv->primary_to_history_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Primary selection affects history"), g_paste_settings_get_primary_to_history (settings), primary_to_history_callback, (GPasteResetCallback) g_paste_settings_reset_primary_to_history, settings); priv->synchronize_clipboards_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Synchronize clipboard with primary selection"), g_paste_settings_get_synchronize_clipboards (settings), synchronize_clipboards_callback, (GPasteResetCallback) g_paste_settings_reset_synchronize_clipboards, settings); g_paste_settings_ui_panel_add_separator (panel); priv->images_support_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Images support"), g_paste_settings_get_images_support (settings), images_support_callback, (GPasteResetCallback) g_paste_settings_reset_images_support, settings); priv->trim_items_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Trim items"), g_paste_settings_get_trim_items (settings), trim_items_callback, (GPasteResetCallback) g_paste_settings_reset_trim_items, settings); priv->growing_lines_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Detect growing lines"), g_paste_settings_get_growing_lines (settings), growing_lines_callback, (GPasteResetCallback) g_paste_settings_reset_growing_lines, settings); g_paste_settings_ui_panel_add_separator (panel); priv->save_history_switch = g_paste_settings_ui_panel_add_boolean_setting (panel, _("Save history"), g_paste_settings_get_save_history (settings), save_history_callback, (GPasteResetCallback) g_paste_settings_reset_save_history, settings); return panel; } UINT64_CALLBACK (element_size) UINT64_CALLBACK (max_displayed_history_size) UINT64_CALLBACK (max_history_size) UINT64_CALLBACK (max_memory_usage) UINT64_CALLBACK (max_text_item_size) UINT64_CALLBACK (min_text_item_size) static GPasteSettingsUiPanel * g_paste_settings_ui_stack_private_make_history_settings_panel (GPasteSettingsUiStackPrivate *priv) { GPasteSettings *settings = priv->settings; GPasteSettingsUiPanel *panel = g_paste_settings_ui_panel_new (); priv->element_size_button = g_paste_settings_ui_panel_add_range_setting (panel, _("Max element size when displaying"), (gdouble) g_paste_settings_get_element_size (settings), 0, 511, 5, element_size_callback, (GPasteResetCallback) g_paste_settings_reset_element_size, settings); priv->max_displayed_history_size_button = g_paste_settings_ui_panel_add_range_setting (panel, _("Max displayed history size"), (gdouble) g_paste_settings_get_max_displayed_history_size (settings), 10, 255, 5, max_displayed_history_size_callback, (GPasteResetCallback) g_paste_settings_reset_max_displayed_history_size, settings); priv->max_history_size_button = g_paste_settings_ui_panel_add_range_setting (panel, _("Max history size"), (gdouble) g_paste_settings_get_max_history_size (settings), 100, 65535, 5, max_history_size_callback, (GPasteResetCallback) g_paste_settings_reset_max_history_size, settings); priv->max_memory_usage_button = g_paste_settings_ui_panel_add_range_setting (panel, _("Max memory usage (MB)"), (gdouble) g_paste_settings_get_max_memory_usage (settings), 5, 16383, 5, max_memory_usage_callback, (GPasteResetCallback) g_paste_settings_reset_max_memory_usage, settings); priv->max_text_item_size_button = g_paste_settings_ui_panel_add_range_setting (panel, _("Max text item length"), (gdouble) g_paste_settings_get_max_text_item_size (settings), 1, G_MAXUINT64, 1, max_text_item_size_callback, (GPasteResetCallback) g_paste_settings_reset_max_text_item_size, settings); priv->min_text_item_size_button = g_paste_settings_ui_panel_add_range_setting (panel, _("Min text item length"), (gdouble) g_paste_settings_get_min_text_item_size (settings), 1, 65535, 1, min_text_item_size_callback, (GPasteResetCallback) g_paste_settings_reset_min_text_item_size, settings); return panel; } STRING_CALLBACK (launch_ui) STRING_CALLBACK (make_password) STRING_CALLBACK (pop) STRING_CALLBACK (show_history) STRING_CALLBACK (sync_clipboard_to_primary) STRING_CALLBACK (sync_primary_to_clipboard) STRING_CALLBACK (upload) static GPasteSettingsUiPanel * g_paste_settings_ui_stack_private_make_keybindings_panel (GPasteSettingsUiStackPrivate *priv) { GPasteSettings *settings = priv->settings; GPasteSettingsUiPanel *panel = g_paste_settings_ui_panel_new (); /* translators: Keyboard shortcut to delete the active item from history */ priv->pop_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Delete the active item from history"), g_paste_settings_get_pop (settings), pop_callback, (GPasteResetCallback) g_paste_settings_reset_pop, settings); /* translators: Keyboard shortcut to launch the graphical tool */ priv->launch_ui_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Launch the graphical tool"), g_paste_settings_get_launch_ui (settings), launch_ui_callback, (GPasteResetCallback) g_paste_settings_reset_launch_ui, settings); /* translators: Keyboard shortcut to mark the active item as being a password */ priv->make_password_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Mark the active item as being a password"), g_paste_settings_get_make_password (settings), make_password_callback, (GPasteResetCallback) g_paste_settings_reset_make_password, settings); /* translators: Keyboard shortcut to display the history */ priv->show_history_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Display the history"), g_paste_settings_get_show_history (settings), show_history_callback, (GPasteResetCallback) g_paste_settings_reset_show_history, settings); /* translators: Keyboard shortcut to sync the clipboard to the primary selection */ priv->sync_clipboard_to_primary_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Sync the clipboard to the primary selection"), g_paste_settings_get_sync_clipboard_to_primary (settings), sync_clipboard_to_primary_callback, (GPasteResetCallback) g_paste_settings_reset_sync_clipboard_to_primary, settings); /* translators: Keyboard shortcut to sync the primary selection to the clipboard */ priv->sync_primary_to_clipboard_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Sync the primary selection to the clipboard"), g_paste_settings_get_sync_primary_to_clipboard (settings), sync_primary_to_clipboard_callback, (GPasteResetCallback) g_paste_settings_reset_sync_primary_to_clipboard, settings); /* translators: Keyboard shortcut to upload the active item from history to a pastebin service */ priv->upload_entry = g_paste_settings_ui_panel_add_text_setting (panel, _("Upload the active item to a pastebin service"), g_paste_settings_get_upload (settings), upload_callback, (GPasteResetCallback) g_paste_settings_reset_upload, settings); return panel; } static gboolean g_paste_settings_ui_check_connection_error (GError *error) { if (!error) return FALSE; fprintf (stderr, "%s: %s\n", _("Couldn't connect to GPaste daemon"), error->message); return TRUE; } /** * g_paste_settings_ui_stack_fill: * @self: a #GPasteSettingsUiStack instance * * Fill the #GPasteSettingsUiStack with default panels */ G_PASTE_VISIBLE void g_paste_settings_ui_stack_fill (GPasteSettingsUiStack *self) { GPasteSettingsUiStackPrivate *priv = g_paste_settings_ui_stack_get_instance_private (self); g_paste_settings_ui_stack_add_panel (self, "general", _("General behaviour"), g_paste_settings_ui_stack_private_make_behaviour_panel (priv)); g_paste_settings_ui_stack_add_panel (self, "history", _("History settings"), g_paste_settings_ui_stack_private_make_history_settings_panel (priv)); g_paste_settings_ui_stack_add_panel (self, "keyboard", _("Keyboard shortcuts"), g_paste_settings_ui_stack_private_make_keybindings_panel (priv)); } static void g_paste_settings_ui_stack_settings_changed (GPasteSettings *settings, const gchar *key, gpointer user_data) { GPasteSettingsUiStackPrivate *priv = user_data; if (g_paste_str_equal (key, G_PASTE_CLOSE_ON_SELECT_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->close_on_select_switch), g_paste_settings_get_close_on_select (settings)); else if (g_paste_str_equal (key, G_PASTE_ELEMENT_SIZE_SETTING)) gtk_spin_button_set_value (priv->element_size_button, g_paste_settings_get_element_size (settings)); else if (g_paste_str_equal (key, G_PASTE_GROWING_LINES_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->growing_lines_switch), g_paste_settings_get_growing_lines (settings)); else if (g_paste_str_equal (key, G_PASTE_IMAGES_SUPPORT_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->images_support_switch), g_paste_settings_get_images_support (settings)); else if (g_paste_str_equal (key, G_PASTE_LAUNCH_UI_SETTING)) gtk_entry_set_text (priv->launch_ui_entry, g_paste_settings_get_launch_ui (settings)); else if (g_paste_str_equal (key, G_PASTE_MAKE_PASSWORD_SETTING)) gtk_entry_set_text (priv->make_password_entry, g_paste_settings_get_make_password (settings)); else if (g_paste_str_equal (key, G_PASTE_MAX_DISPLAYED_HISTORY_SIZE_SETTING)) gtk_spin_button_set_value (priv->max_displayed_history_size_button, g_paste_settings_get_max_displayed_history_size (settings)); else if (g_paste_str_equal (key, G_PASTE_MAX_HISTORY_SIZE_SETTING)) gtk_spin_button_set_value (priv->max_history_size_button, g_paste_settings_get_max_history_size (settings)); else if (g_paste_str_equal (key, G_PASTE_MAX_MEMORY_USAGE_SETTING)) gtk_spin_button_set_value (priv->max_memory_usage_button, g_paste_settings_get_max_memory_usage (settings)); else if (g_paste_str_equal (key, G_PASTE_MAX_TEXT_ITEM_SIZE_SETTING)) gtk_spin_button_set_value (priv->max_text_item_size_button, g_paste_settings_get_max_text_item_size (settings)); else if (g_paste_str_equal (key, G_PASTE_MIN_TEXT_ITEM_SIZE_SETTING)) gtk_spin_button_set_value (priv->min_text_item_size_button, g_paste_settings_get_min_text_item_size (settings)); else if (g_paste_str_equal (key, G_PASTE_POP_SETTING)) gtk_entry_set_text (priv->pop_entry, g_paste_settings_get_pop (settings)); else if (g_paste_str_equal (key, G_PASTE_PRIMARY_TO_HISTORY_SETTING )) gtk_switch_set_active (GTK_SWITCH (priv->primary_to_history_switch), g_paste_settings_get_primary_to_history (settings)); else if (g_paste_str_equal (key, G_PASTE_SAVE_HISTORY_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->save_history_switch), g_paste_settings_get_save_history (settings)); else if (g_paste_str_equal (key, G_PASTE_SHOW_HISTORY_SETTING)) gtk_entry_set_text (priv->show_history_entry, g_paste_settings_get_show_history (settings)); else if (g_paste_str_equal (key, G_PASTE_SYNC_CLIPBOARD_TO_PRIMARY_SETTING)) gtk_entry_set_text (priv->sync_clipboard_to_primary_entry, g_paste_settings_get_sync_clipboard_to_primary (settings)); else if (g_paste_str_equal (key, G_PASTE_SYNC_PRIMARY_TO_CLIPBOARD_SETTING)) gtk_entry_set_text (priv->sync_primary_to_clipboard_entry, g_paste_settings_get_sync_primary_to_clipboard (settings)); else if (g_paste_str_equal (key, G_PASTE_UPLOAD_SETTING)) gtk_entry_set_text (priv->upload_entry, g_paste_settings_get_upload (settings)); else if (g_paste_str_equal (key, G_PASTE_SYNCHRONIZE_CLIPBOARDS_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->synchronize_clipboards_switch), g_paste_settings_get_synchronize_clipboards (settings)); else if (g_paste_str_equal (key, G_PASTE_TRACK_CHANGES_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->track_changes_switch), g_paste_settings_get_track_changes (settings)); else if (g_paste_str_equal (key, G_PASTE_TRIM_ITEMS_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->trim_items_switch), g_paste_settings_get_trim_items (settings)); else if (g_paste_util_has_gnome_shell ()) { if (g_paste_str_equal (key, G_PASTE_EXTENSION_ENABLED_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->extension_enabled_switch), g_paste_settings_get_extension_enabled (settings)); else if (g_paste_str_equal (key, G_PASTE_TRACK_EXTENSION_STATE_SETTING)) gtk_switch_set_active (GTK_SWITCH (priv->track_extension_state_switch), g_paste_settings_get_track_extension_state (settings)); } } static void g_paste_settings_ui_stack_dispose (GObject *object) { GPasteSettingsUiStackPrivate *priv = g_paste_settings_ui_stack_get_instance_private (G_PASTE_SETTINGS_UI_STACK (object)); if (priv->settings) /* first dispose call */ { g_signal_handler_disconnect (priv->settings, priv->c_signals[C_SETTINGS]); g_clear_object (&priv->settings); g_clear_object (&priv->client); } G_OBJECT_CLASS (g_paste_settings_ui_stack_parent_class)->dispose (object); } static void g_paste_settings_ui_stack_finalize (GObject *object) { const GPasteSettingsUiStackPrivate *priv = _g_paste_settings_ui_stack_get_instance_private (G_PASTE_SETTINGS_UI_STACK (object)); GStrv *actions = priv->actions; for (guint64 i = 0; actions[i]; ++i) g_free ((GStrv) actions[i]); g_free ((GStrv *) actions); G_OBJECT_CLASS (g_paste_settings_ui_stack_parent_class)->finalize (object); } static void g_paste_settings_ui_stack_class_init (GPasteSettingsUiStackClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = g_paste_settings_ui_stack_dispose; object_class->finalize = g_paste_settings_ui_stack_finalize; } static void g_paste_settings_ui_stack_init (GPasteSettingsUiStack *self) { GPasteSettingsUiStackPrivate *priv = g_paste_settings_ui_stack_get_instance_private (self); priv->init_error = NULL; priv->client = g_paste_client_new_sync (&priv->init_error); priv->settings = g_paste_settings_new (); priv->c_signals[C_SETTINGS] = g_signal_connect (priv->settings, "changed", G_CALLBACK (g_paste_settings_ui_stack_settings_changed), priv); GStrv *actions = priv->actions = (GStrv *) g_malloc (3 * sizeof (GStrv)); GStrv action = actions[0] = (GStrv) g_malloc (2 * sizeof (gchar *)); action[0] = (gchar *) "switch"; /* translators: This is the name of a multi-history management action */ action[1] = _("Switch to"); action = actions[1] = (GStrv) g_malloc (2 * sizeof (gchar *)); action[0] = (gchar *) "delete"; /* translators: This is the name of a multi-history management action */ action[1] = _("Delete"); actions[2] = NULL; } /** * g_paste_settings_ui_stack_new: * * Create a new instance of #GPasteSettingsUiStack * * Returns: (nullable): a newly allocated #GPasteSettingsUiStack * free it with g_object_unref */ G_PASTE_VISIBLE GPasteSettingsUiStack * g_paste_settings_ui_stack_new (void) { GPasteSettingsUiStack *self = G_PASTE_SETTINGS_UI_STACK (gtk_widget_new (G_PASTE_TYPE_SETTINGS_UI_STACK, "margin", 12, "homogeneous", TRUE, NULL)); const GPasteSettingsUiStackPrivate *priv = _g_paste_settings_ui_stack_get_instance_private (self); if (g_paste_settings_ui_check_connection_error (priv->init_error)) { g_object_unref (self); return NULL; } return self; } gpaste-3.42.6/src/ui/tmp/gpaste-settings-ui-stack.h000066400000000000000000000020161421222064600221030ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SETTINGS_UI_STACK_H__ #define __G_PASTE_SETTINGS_UI_STACK_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_SETTINGS_UI_STACK (g_paste_settings_ui_stack_get_type ()) G_PASTE_FINAL_TYPE (SettingsUiStack, settings_ui_stack, SETTINGS_UI_STACK, GtkStack) void g_paste_settings_ui_stack_add_panel (GPasteSettingsUiStack *self, const gchar *name, const gchar *label, GPasteSettingsUiPanel *panel); void g_paste_settings_ui_stack_fill (GPasteSettingsUiStack *self); GPasteSettingsUiStack *g_paste_settings_ui_stack_new (void); G_END_DECLS #endif /*__G_PASTE_SETTINGS_UI_STACK_H__*/ gpaste-3.42.6/src/ui/tmp/gpaste-settings-ui-widget.c000066400000000000000000000045151421222064600222620ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include struct _GPasteSettingsUiWidget { GtkGrid parent_instance; }; typedef struct { GPasteSettingsUiStack *stack; } GPasteSettingsUiWidgetPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (SettingsUiWidget, settings_ui_widget, GTK_TYPE_GRID) /** * g_paste_settings_ui_widget_get_stack: * @self: a #GPasteSettingsUiWidget instance * * Get the inner GtkStack from the Widget * * Returns: (transfer none): the #GtkStack */ G_PASTE_VISIBLE GPasteSettingsUiStack * g_paste_settings_ui_widget_get_stack (GPasteSettingsUiWidget *self) { g_return_val_if_fail (_G_PASTE_IS_SETTINGS_UI_WIDGET (self), NULL); const GPasteSettingsUiWidgetPrivate *priv = _g_paste_settings_ui_widget_get_instance_private (self); return priv->stack; } static void g_paste_settings_ui_widget_class_init (GPasteSettingsUiWidgetClass *klass G_GNUC_UNUSED) { } static void g_paste_settings_ui_widget_init (GPasteSettingsUiWidget *self) { GPasteSettingsUiWidgetPrivate *priv = g_paste_settings_ui_widget_get_instance_private (self); GtkGrid *grid = GTK_GRID (self); guint64 current_line = 0; GPasteSettingsUiStack *stack = priv->stack = g_paste_settings_ui_stack_new (); if (!stack) return; g_paste_settings_ui_stack_fill (stack); gtk_grid_attach (grid, gtk_widget_new (GTK_TYPE_STACK_SWITCHER, "stack", GTK_STACK (stack), "halign", GTK_ALIGN_CENTER, NULL), 0, current_line++, 1, 1); gtk_grid_attach (grid, GTK_WIDGET (stack), 0, current_line++, 1, 1); } /** * g_paste_settings_ui_widget_new: * * Create a new instance of #GPasteSettingsUiWidget * * Returns: (nullable): a newly allocated #GPasteSettingsUiWidget * free it with g_object_unref */ G_PASTE_VISIBLE GtkWidget * g_paste_settings_ui_widget_new (void) { GtkWidget *self = gtk_widget_new (G_PASTE_TYPE_SETTINGS_UI_WIDGET, NULL); const GPasteSettingsUiWidgetPrivate *priv = _g_paste_settings_ui_widget_get_instance_private (G_PASTE_SETTINGS_UI_WIDGET (self)); if (!priv->stack) { g_object_unref (self); return NULL; } return self; } gpaste-3.42.6/src/ui/tmp/gpaste-settings-ui-widget.h000066400000000000000000000013661421222064600222700ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SETTINGS_UI_WIDGET_H__ #define __G_PASTE_SETTINGS_UI_WIDGET_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_SETTINGS_UI_WIDGET (g_paste_settings_ui_widget_get_type ()) G_PASTE_FINAL_TYPE (SettingsUiWidget, settings_ui_widget, SETTINGS_UI_WIDGET, GtkGrid) GPasteSettingsUiStack *g_paste_settings_ui_widget_get_stack (GPasteSettingsUiWidget *self); GtkWidget *g_paste_settings_ui_widget_new (void); G_END_DECLS #endif /*__G_PASTE_SETTINGS_UI_WIDGET_H__*/ gpaste-3.42.6/src/ui/tmp/gpaste-settings.c000066400000000000000000001053061421222064600203660ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #define G_SETTINGS_ENABLE_BACKEND 1 #include struct _GPasteSettings { GObject parent_instance; }; enum { C_CHANGED, C_SHELL_CHANGED, C_LAST_SIGNAL }; typedef struct { GSettings *settings; GSettings *shell_settings; gboolean close_on_select; guint64 element_size; gboolean empty_history_confirmation; gboolean growing_lines; gchar *history_name; gboolean images_support; gchar *launch_ui; gchar *make_password; guint64 max_displayed_history_size; guint64 max_history_size; guint64 max_memory_usage; guint64 max_text_item_size; guint64 min_text_item_size; gchar *pop; gboolean primary_to_history; gboolean rich_text_support; gboolean save_history; gchar *show_history; gchar *sync_clipboard_to_primary; gchar *sync_primary_to_clipboard; gboolean synchronize_clipboards; gboolean track_changes; gboolean track_extension_state; gboolean trim_items; gchar *upload; gboolean extension_enabled; guint64 c_signals[C_LAST_SIGNAL]; } GPasteSettingsPrivate; G_PASTE_DEFINE_TYPE_WITH_PRIVATE (Settings, settings, G_TYPE_OBJECT) enum { CHANGED, REBIND, TRACK, LAST_SIGNAL }; static guint64 signals[LAST_SIGNAL] = { 0 }; #define SETTING(name, key, type, setting_type, fail, guards, clear_func, dup_func) \ G_PASTE_VISIBLE type \ g_paste_settings_get_##name (const GPasteSettings *self) \ { \ g_return_val_if_fail (_G_PASTE_IS_SETTINGS ((gpointer) self), fail); \ const GPasteSettingsPrivate *priv = _g_paste_settings_get_instance_private (self); \ return priv->name; \ } \ G_PASTE_VISIBLE void \ g_paste_settings_reset_##name (GPasteSettings *self) \ { \ g_return_if_fail (_G_PASTE_IS_SETTINGS (self)); \ const GPasteSettingsPrivate *priv = _g_paste_settings_get_instance_private (self); \ g_settings_reset (priv->settings, G_PASTE_##key##_SETTING); \ } \ static void \ g_paste_settings_private_set_##name##_from_dconf (GPasteSettingsPrivate *priv) \ { \ priv->name = g_settings_get_##setting_type (priv->settings, G_PASTE_##key##_SETTING); \ } \ G_PASTE_VISIBLE void \ g_paste_settings_set_##name (GPasteSettings *self, \ type value) \ { \ g_return_if_fail (_G_PASTE_IS_SETTINGS (self)); \ guards \ GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (self); \ clear_func \ priv->name = dup_func (value); \ g_settings_set_##setting_type (priv->settings, G_PASTE_##key##_SETTING, value); \ } #define TRIVIAL_SETTING(name, key, type, setting_type, fail) \ SETTING (name, key, type, setting_type, fail, {}, {},) #define BOOLEAN_SETTING(name, key) TRIVIAL_SETTING (name, key, gboolean, boolean, FALSE) #define UNSIGNED_SETTING(name, key) TRIVIAL_SETTING (name, key, guint64, uint64, 0) #define STRING_SETTING(name, key) SETTING (name, key, const gchar *, string, NULL, \ g_return_if_fail (value); \ g_return_if_fail (g_utf8_validate (value, -1, NULL));, \ g_free (priv->name);, g_strdup) #define NEW_SIGNAL_FULL(name, type, MTYPE, arg_type) \ g_signal_new (name, \ G_PASTE_TYPE_SETTINGS, \ type, \ 0, /* class offset */ \ NULL, /* accumulator */ \ NULL, /* accumulator data */ \ g_cclosure_marshal_VOID__##MTYPE, \ G_TYPE_NONE, \ 1, /* number of params */ \ G_TYPE_##arg_type) #define NEW_SIGNAL(name, arg_type) NEW_SIGNAL_FULL (name, G_SIGNAL_RUN_LAST, arg_type, arg_type) #define NEW_SIGNAL_DETAILED(name, arg_type) NEW_SIGNAL_FULL (name, G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, arg_type, arg_type) #define NEW_SIGNAL_DETAILED_STATIC(name, arg_type) NEW_SIGNAL_FULL (name, G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, arg_type, arg_type | G_SIGNAL_TYPE_STATIC_SCOPE) /** * g_paste_settings_get_close_on_select: * @self: a #GPasteSettings instance * * Get the "close-on-select" setting * * Returns: the value of the "close-on-select" setting */ /** * g_paste_settings_reset_close_on_select: * @self: a #GPasteSettings instance * * Reset the "close-on-select" setting */ /** * g_paste_settings_set_close_on_select: * @self: a #GPasteSettings instance * @value: the new history name * * Change the "close-on-select" setting */ BOOLEAN_SETTING (close_on_select, CLOSE_ON_SELECT) /** * g_paste_settings_get_element_size: * @self: a #GPasteSettings instance * * Get the "element-size" setting * * Returns: the value of the "element-size" setting */ /** * g_paste_settings_reset_element_size: * @self: a #GPasteSettings instance * * Reset the "element-size" setting */ /** * g_paste_settings_set_element_size: * @self: a #GPasteSettings instance * @value: the maximum displayed size of an item * * Change the "element-size" setting */ UNSIGNED_SETTING (element_size, ELEMENT_SIZE) /** * g_paste_settings_get_empty_history_confirmation: * @self: a #GPasteSettings instance * * Get the "empty-history-confirmation" setting * * Returns: the value of the "empty-history-confirmation" setting */ /** * g_paste_settings_reset_empty_history_confirmation: * @self: a #GPasteSettings instance * * Reset the "empty-history-confirmation" setting */ /** * g_paste_settings_set_empty_history_confirmation: * @self: a #GPasteSettings instance * @value: whether to prompt for confirmation when emptying a history * * Change the "empty-history-confirmation" setting */ BOOLEAN_SETTING (empty_history_confirmation, EMPTY_HISTORY_CONFIRMATION) /** * g_paste_settings_get_growing_lines: * @self: a #GPasteSettings instance * * Get the "growing-lines" setting * * Returns: the value of the "growing-lines" setting */ /** * g_paste_settings_reset_growing_lines: * @self: a #GPasteSettings instance * * Reset the "growing-lines" setting */ /** * g_paste_settings_set_growing_lines: * @self: a #GPasteSettings instance * @value: whether to detect or not growing lines * * Change the "growing-lines" setting */ BOOLEAN_SETTING (growing_lines, GROWING_LINES) /** * g_paste_settings_get_history_name: * @self: a #GPasteSettings instance * * Get the "history-name" setting * * Returns: the value of the "history-name" setting */ /** * g_paste_settings_reset_history_name: * @self: a #GPasteSettings instance * * Reset the "history-name" setting */ /** * g_paste_settings_set_history_name: * @self: a #GPasteSettings instance * @value: the new history name * * Change the "history-name" setting */ STRING_SETTING (history_name, HISTORY_NAME) /** * g_paste_settings_get_images_support: * @self: a #GPasteSettings instance * * Get the "images-support" setting * * Returns: the value of the "images-support" setting */ /** * g_paste_settings_reset_images_support: * @self: a #GPasteSettings instance * * Reset the "images-support" setting */ /** * g_paste_settings_set_images_support: * @self: a #GPasteSettings instance * @value: the new history name * * Change the "images-support" setting */ BOOLEAN_SETTING (images_support, IMAGES_SUPPORT) /** * g_paste_settings_get_launch_ui: * @self: a #GPasteSettings instance * * Get the "launch-ui" setting * * Returns: the value of the "launch-ui" setting */ /** * g_paste_settings_reset_launch_ui: * @self: a #GPasteSettings instance * * Reset the "launch-ui" setting */ /** * g_paste_settings_set_launch_ui: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "launch-ui" setting */ STRING_SETTING (launch_ui, LAUNCH_UI) /** * g_paste_settings_get_make_password: * @self: a #GPasteSettings instance * * Get the "make-password" setting * * Returns: the value of the "make-password" setting */ /** * g_paste_settings_reset_make_password: * @self: a #GPasteSettings instance * * Reset the "make-password" setting */ /** * g_paste_settings_set_make_password: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "make-password" setting */ STRING_SETTING (make_password, MAKE_PASSWORD) /** * g_paste_settings_get_max_displayed_history_size: * @self: a #GPasteSettings instance * * Get the "max-displayed-history-size" setting * * Returns: the value of the "max-displayed-history-size" setting */ /** * g_paste_settings_reset_max_displayed_history_size: * @self: a #GPasteSettings instance * * Reset the "max-displayed-history-size" setting */ /** * g_paste_settings_set_max_displayed_history_size: * @self: a #GPasteSettings instance * @value: the maximum number of items to display * * Change the "max-displayed-history-size" setting */ UNSIGNED_SETTING (max_displayed_history_size, MAX_DISPLAYED_HISTORY_SIZE) /** * g_paste_settings_get_max_history_size: * @self: a #GPasteSettings instance * * Get the "max-history-size" setting * * Returns: the value of the "max-history-size" setting */ /** * g_paste_settings_reset_max_history_size: * @self: a #GPasteSettings instance * * Reset the "max-history-size" setting */ /** * g_paste_settings_set_max_history_size: * @self: a #GPasteSettings instance * @value: the maximum number of items the history can contain * * Change the "max-history-size" setting */ UNSIGNED_SETTING (max_history_size, MAX_HISTORY_SIZE) /** * g_paste_settings_get_max_memory_usage: * @self: a #GPasteSettings instance * * Get the "max-memory-usage" setting * * Returns: the value of the "max-memory-usage" setting */ /** * g_paste_settings_reset_max_memory_usage: * @self: a #GPasteSettings instance * * Reset the "max-memory-usage" setting */ /** * g_paste_settings_set_max_memory_usage: * @self: a #GPasteSettings instance * @value: the maximum amount of memory we can use * * Change the "max-memory-usage" setting */ UNSIGNED_SETTING (max_memory_usage, MAX_MEMORY_USAGE) /** * g_paste_settings_get_max_text_item_size: * @self: a #GPasteSettings instance * * Get the "max-text-item-size" setting * * Returns: the value of the "max-text-item-size" setting */ /** * g_paste_settings_reset_max_text_item_size: * @self: a #GPasteSettings instance * * Reset the "max-text-item-size" setting */ /** * g_paste_settings_set_max_text_item_size: * @self: a #GPasteSettings instance * @value: the maximum size for a textual item to be handled * * Change the "max-text-item-size" setting */ UNSIGNED_SETTING (max_text_item_size, MAX_TEXT_ITEM_SIZE) /** * g_paste_settings_get_min_text_item_size: * @self: a #GPasteSettings instance * * Get the "min-text-item-size" setting * * Returns: the value of the "min-text-item-size" setting */ /** * g_paste_settings_reset_min_text_item_size: * @self: a #GPasteSettings instance * * Reset the "min-text-item-size" setting */ /** * g_paste_settings_set_min_text_item_size: * @self: a #GPasteSettings instance * @value: the minimum size for a textual item to be handled * * Change the "min-text-item-size" setting */ UNSIGNED_SETTING (min_text_item_size, MIN_TEXT_ITEM_SIZE) /** * g_paste_settings_get_pop: * @self: a #GPasteSettings instance * * Get the "pop" setting * * Returns: the value of the "pop" setting */ /** * g_paste_settings_reset_pop: * @self: a #GPasteSettings instance * * Reset the "pop" setting */ /** * g_paste_settings_set_pop: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "pop" setting */ STRING_SETTING (pop, POP) /** * g_paste_settings_get_primary_to_history: * @self: a #GPasteSettings instance * * Get the "primary-to-history" setting * * Returns: the value of the "primary-to-history" setting */ /** * g_paste_settings_reset_primary_to_history: * @self: a #GPasteSettings instance * * Reset the "primary-to-history" setting */ /** * g_paste_settings_set_primary_to_history: * @self: a #GPasteSettings instance * @value: whether to track or not the primary selection changes as clipboard ones * * Change the "primary-to-history" setting */ BOOLEAN_SETTING (primary_to_history, PRIMARY_TO_HISTORY) /** * g_paste_settings_get_rich_text_support: * @self: a #GPasteSettings instance * * Get the "rich-text-support" setting * * Returns: the value of the "rich-text-support" setting */ /** * g_paste_settings_reset_rich_text_support: * @self: a #GPasteSettings instance * * Reset the "rich-text-support" setting */ /** * g_paste_settings_set_rich_text_support: * @self: a #GPasteSettings instance * @value: the new history name * * Change the "rich-text-support" setting */ BOOLEAN_SETTING (rich_text_support, RICH_TEXT_SUPPORT) /** * g_paste_settings_get_save_history: * @self: a #GPasteSettings instance * * Get the "save-history" setting * * Returns: the value of the "save-history" setting */ /** * g_paste_settings_reset_save_history: * @self: a #GPasteSettings instance * * Reset the "save-history" setting */ /** * g_paste_settings_set_save_history: * @self: a #GPasteSettings instance * @value: whether to save or not the history * * Change the "save-history" setting */ BOOLEAN_SETTING (save_history, SAVE_HISTORY) /** * g_paste_settings_get_show_history: * @self: a #GPasteSettings instance * * Get the "show-history" setting * * Returns: the value of the "show-history" setting */ /** * g_paste_settings_reset_show_history: * @self: a #GPasteSettings instance * * Reset the "show-history" setting */ /** * g_paste_settings_set_show_history: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "show-history" setting */ STRING_SETTING (show_history, SHOW_HISTORY) /** * g_paste_settings_get_sync_clipboard_to_primary: * @self: a #GPasteSettings instance * * Get the "sync-clipboard-to-primary" setting * * Returns: the value of the "sync-clipboard-to-primary" setting */ /** * g_paste_settings_reset_sync_clipboard_to_primary: * @self: a #GPasteSettings instance * * Reset the "sync-clipboard-to-primary" setting */ /** * g_paste_settings_set_sync_clipboard_to_primary: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "sync-clipboard-to-primary" setting */ STRING_SETTING (sync_clipboard_to_primary, SYNC_CLIPBOARD_TO_PRIMARY) /** * g_paste_settings_get_sync_primary_to_clipboard: * @self: a #GPasteSettings instance * * Get the "sync-primary-to-clipboard" setting * * Returns: the value of the "sync-primary-to-clipboard" setting */ /** * g_paste_settings_reset_sync_primary_to_clipboard: * @self: a #GPasteSettings instance * * Reset the "sync-primary-to-clipboard" setting */ /** * g_paste_settings_set_sync_primary_to_clipboard: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "sync-primary-to-clipboard" setting */ STRING_SETTING (sync_primary_to_clipboard, SYNC_PRIMARY_TO_CLIPBOARD) /** * g_paste_settings_get_synchronize_clipboards: * @self: a #GPasteSettings instance * * Get the "synchronize-clipboards" setting * * Returns: the value of the "synchronize-clipboards" setting */ /** * g_paste_settings_reset_synchronize_clipboards: * @self: a #GPasteSettings instance * * Reset the "synchronize-clipboards" setting */ /** * g_paste_settings_set_synchronize_clipboards: * @self: a #GPasteSettings instance * @value: whether to synchronize the clipboard and the primary selection or not * * Change the "synchronize-clipboards" setting */ BOOLEAN_SETTING (synchronize_clipboards, SYNCHRONIZE_CLIPBOARDS) /** * g_paste_settings_get_track_changes: * @self: a #GPasteSettings instance * * Get the "track-changes" setting * * Returns: the value of the "track-changes" setting */ /** * g_paste_settings_reset_track_changes: * @self: a #GPasteSettings instance * * Reset the "track-changes" setting */ /** * g_paste_settings_set_track_changes: * @self: a #GPasteSettings instance * @value: whether to track or not the clipboard changes * * Change the "track-changes" setting */ BOOLEAN_SETTING (track_changes, TRACK_CHANGES) /** * g_paste_settings_get_track_extension_state: * @self: a #GPasteSettings instance * * Get the "track-extension-state" setting * * Returns: the value of the "track-extension-state" setting */ /** * g_paste_settings_reset_track_extension_state: * @self: a #GPasteSettings instance * * Reset the "track-extension-state" setting */ /** * g_paste_settings_set_track_extension_state: * @self: a #GPasteSettings instance * @value: whether to stop tracking or not the clipboard changes when an applet exits * * Change the "track-extension-state" setting */ BOOLEAN_SETTING (track_extension_state, TRACK_EXTENSION_STATE) /** * g_paste_settings_get_trim_items: * @self: a #GPasteSettings instance * * Get the "trim-items" setting * * Returns: the value of the "trim-items" setting */ /** * g_paste_settings_reset_trim_items: * @self: a #GPasteSettings instance * * Reset the "trim-items" setting */ /** * g_paste_settings_set_trim_items: * @self: a #GPasteSettings instance * @value: whether to trim or not textual items * * Change the "trim-items" setting */ BOOLEAN_SETTING (trim_items, TRIM_ITEMS) /** * g_paste_settings_get_upload: * @self: a #GPasteSettings instance * * Get the "upload" setting * * Returns: the value of the "upload" setting */ /** * g_paste_settings_reset_upload: * @self: a #GPasteSettings instance * * Reset the "upload" setting */ /** * g_paste_settings_set_upload: * @self: a #GPasteSettings instance * @value: the new keyboard shortcut * * Change the "upload" setting */ STRING_SETTING (upload, UPLOAD) /** * g_paste_settings_get_extension_enabled: * @self: a #GPasteSettings instance * * Get the "extension-enabled" special setting * * Returns: Whether the gnome-shell extension is enabled or not */ G_PASTE_VISIBLE gboolean g_paste_settings_get_extension_enabled (const GPasteSettings *self) { g_return_val_if_fail (_G_PASTE_IS_SETTINGS ((gpointer) self), FALSE); const GPasteSettingsPrivate *priv = _g_paste_settings_get_instance_private (self); return priv->extension_enabled; } static inline gchar ** g_paste_settings_private_get_enabled_extensions (GPasteSettingsPrivate *priv) { return (priv->shell_settings) ? g_settings_get_strv (priv->shell_settings, G_PASTE_SHELL_ENABLED_EXTENSIONS_SETTING) : NULL; } static void g_paste_settings_private_set_extension_enabled_from_dconf (GPasteSettingsPrivate *priv) { g_auto (GStrv) extensions = g_paste_settings_private_get_enabled_extensions (priv); for (GStrv e = extensions; *e; ++e) { if (g_paste_str_equal (*e, G_PASTE_EXTENSION_NAME)) { priv->extension_enabled = TRUE; return; } } priv->extension_enabled = FALSE; } /** * g_paste_settings_set_extension_enabled: * @self: a #GPasteSettings instance * @value: whether to enable or not the gnome-shell extension * * Change the "extension-enabled" special setting */ G_PASTE_VISIBLE void g_paste_settings_set_extension_enabled (GPasteSettings *self, gboolean value) { g_return_if_fail (_G_PASTE_IS_SETTINGS (self)); GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (self); g_auto (GStrv) extensions = NULL; if (!priv->shell_settings || (value == priv->extension_enabled)) return; extensions = g_paste_settings_private_get_enabled_extensions (priv); guint64 nb = g_strv_length (extensions); if (value) { extensions = g_realloc (extensions, (nb + 2) * sizeof (gchar *)); extensions[nb] = g_strdup (G_PASTE_EXTENSION_NAME); extensions[nb+1] = NULL; } else { gboolean found = FALSE; for (guint64 i = 0; i < nb; ++i) { if (!found && g_paste_str_equal (extensions[i], G_PASTE_EXTENSION_NAME)) { found = TRUE; g_free (extensions[i]); } if (found) extensions[i] = extensions[i+1]; } } priv->extension_enabled = value; g_settings_set_strv (priv->shell_settings, G_PASTE_SHELL_ENABLED_EXTENSIONS_SETTING, (const gchar * const *) extensions); } static void g_paste_settings_shell_settings_changed (GSettings *settings G_GNUC_UNUSED, const gchar *key G_GNUC_UNUSED, gpointer user_data) { GPasteSettings *self = G_PASTE_SETTINGS (user_data); GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (self); g_paste_settings_private_set_extension_enabled_from_dconf (priv); /* Forward the signal */ g_signal_emit (self, signals[CHANGED], g_quark_from_string (G_PASTE_EXTENSION_ENABLED_SETTING), G_PASTE_EXTENSION_ENABLED_SETTING, NULL); } static void g_paste_settings_rebind (GPasteSettings *self, const gchar *key) { g_signal_emit (self, signals[REBIND], g_quark_from_string (key), NULL); } static void g_paste_settings_settings_changed (GSettings *settings G_GNUC_UNUSED, const gchar *key, gpointer user_data) { GPasteSettings *self = G_PASTE_SETTINGS (user_data); GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (self); if (g_paste_str_equal (key, G_PASTE_CLOSE_ON_SELECT_SETTING)) g_paste_settings_private_set_close_on_select_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_ELEMENT_SIZE_SETTING)) g_paste_settings_private_set_element_size_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_EMPTY_HISTORY_CONFIRMATION_SETTING)) g_paste_settings_private_set_empty_history_confirmation_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_GROWING_LINES_SETTING)) g_paste_settings_private_set_growing_lines_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_HISTORY_NAME_SETTING)) g_paste_settings_private_set_history_name_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_IMAGES_SUPPORT_SETTING)) g_paste_settings_private_set_images_support_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_LAUNCH_UI_SETTING)) { g_paste_settings_private_set_launch_ui_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_LAUNCH_UI_SETTING); } else if (g_paste_str_equal (key, G_PASTE_MAKE_PASSWORD_SETTING)) { g_paste_settings_private_set_make_password_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_MAKE_PASSWORD_SETTING); } else if (g_paste_str_equal (key, G_PASTE_MAX_DISPLAYED_HISTORY_SIZE_SETTING)) g_paste_settings_private_set_max_displayed_history_size_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_MAX_HISTORY_SIZE_SETTING)) g_paste_settings_private_set_max_history_size_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_MAX_MEMORY_USAGE_SETTING)) g_paste_settings_private_set_max_memory_usage_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_MAX_TEXT_ITEM_SIZE_SETTING)) g_paste_settings_private_set_max_text_item_size_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_MIN_TEXT_ITEM_SIZE_SETTING)) g_paste_settings_private_set_min_text_item_size_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_POP_SETTING)) { g_paste_settings_private_set_pop_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_POP_SETTING); } else if (g_paste_str_equal (key, G_PASTE_PRIMARY_TO_HISTORY_SETTING )) g_paste_settings_private_set_primary_to_history_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_RICH_TEXT_SUPPORT_SETTING)) g_paste_settings_private_set_rich_text_support_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_SAVE_HISTORY_SETTING)) g_paste_settings_private_set_save_history_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_SHOW_HISTORY_SETTING)) { g_paste_settings_private_set_show_history_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_SHOW_HISTORY_SETTING); } else if (g_paste_str_equal (key, G_PASTE_SYNC_CLIPBOARD_TO_PRIMARY_SETTING)) { g_paste_settings_private_set_sync_clipboard_to_primary_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_SYNC_CLIPBOARD_TO_PRIMARY_SETTING); } else if (g_paste_str_equal (key, G_PASTE_SYNC_PRIMARY_TO_CLIPBOARD_SETTING)) { g_paste_settings_private_set_sync_primary_to_clipboard_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_SYNC_PRIMARY_TO_CLIPBOARD_SETTING); } else if (g_paste_str_equal (key, G_PASTE_SYNCHRONIZE_CLIPBOARDS_SETTING)) g_paste_settings_private_set_synchronize_clipboards_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_TRACK_CHANGES_SETTING)) { g_paste_settings_private_set_track_changes_from_dconf (priv); g_signal_emit (self, signals[TRACK], 0, /* detail */ priv->track_changes, NULL); } else if (g_paste_str_equal (key, G_PASTE_TRACK_EXTENSION_STATE_SETTING)) g_paste_settings_private_set_track_extension_state_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_TRIM_ITEMS_SETTING)) g_paste_settings_private_set_trim_items_from_dconf (priv); else if (g_paste_str_equal (key, G_PASTE_UPLOAD_SETTING)) { g_paste_settings_private_set_upload_from_dconf (priv); g_paste_settings_rebind (self, G_PASTE_UPLOAD_SETTING); } /* Forward the signal */ g_signal_emit (self, signals[CHANGED], g_quark_from_string (key), key, NULL); } static void g_paste_settings_dispose (GObject *object) { GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (G_PASTE_SETTINGS (object)); GSettings *settings = priv->settings; GSettings *shell_settings = priv->shell_settings; if (settings) { g_signal_handler_disconnect (settings, priv->c_signals[C_CHANGED]); g_clear_object (&priv->settings); } if (shell_settings) { g_signal_handler_disconnect (shell_settings, priv->c_signals[C_SHELL_CHANGED]); g_clear_object (&priv->shell_settings); } G_OBJECT_CLASS (g_paste_settings_parent_class)->dispose (object); } static void g_paste_settings_finalize (GObject *object) { const GPasteSettingsPrivate *priv = _g_paste_settings_get_instance_private (G_PASTE_SETTINGS (object)); g_free (priv->history_name); g_free (priv->launch_ui); g_free (priv->make_password); g_free (priv->pop); g_free (priv->show_history); g_free (priv->sync_clipboard_to_primary); g_free (priv->sync_primary_to_clipboard); g_free (priv->upload); G_OBJECT_CLASS (g_paste_settings_parent_class)->finalize (object); } static void g_paste_settings_class_init (GPasteSettingsClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = g_paste_settings_dispose; object_class->finalize = g_paste_settings_finalize; /** * GPasteSettings::changed: * @settings: the object on which the signal was emitted * @key: the name of the key that changed * * The "changed" signal is emitted when a key has potentially changed. * You should call one of the g_paste_settings_get() calls to check the new * value. * * This signal supports detailed connections. You can connect to the * detailed signal "changed::x" in order to only receive callbacks * when key "x" changes. */ signals[CHANGED] = NEW_SIGNAL_DETAILED_STATIC ("changed", STRING); /** * GPasteSettings::rebind: * @settings: the object on which the signal was emitted * @key: the name of the key that changed * * The "rebind" signal is emitted when a key has potentially changed. * You should call one of the g_paste_settings_get() calls to check the new * value. * * This signal supports detailed connections. You can connect to the * detailed signal "rebind::x" in order to only receive callbacks * when key "x" changes. */ signals[REBIND] = NEW_SIGNAL_DETAILED ("rebind" , STRING); /** * GPasteSettings::track: * @settings: the object on which the signal was emitted * @tracking_state: whether we're now tracking or not * * The "track" signal is emitted when the daemon starts or stops tracking * clipboard changes */ signals[TRACK] = NEW_SIGNAL ("track" , BOOLEAN); } static GSettings * create_g_settings (void) { g_autofree gchar *config_file_path = g_build_filename (g_get_user_config_dir (), PACKAGE, "settings", NULL); g_autoptr (GFile) config_file = g_file_new_for_path (config_file_path); if (g_file_query_exists (config_file, NULL /* cancellable */)) { g_autoptr (GSettingsBackend) backend = g_keyfile_settings_backend_new (config_file_path, G_PASTE_SETTINGS_PATH, PACKAGE_NAME); return g_settings_new_with_backend (G_PASTE_SETTINGS_NAME, backend); } else { return g_settings_new (G_PASTE_SETTINGS_NAME); } } static void g_paste_settings_init (GPasteSettings *self) { GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (self); GSettings *settings = priv->settings = create_g_settings (); priv->history_name = NULL; priv->launch_ui = NULL; priv->make_password = NULL; priv->pop = NULL; priv->show_history = NULL; priv->sync_clipboard_to_primary = NULL; priv->sync_primary_to_clipboard = NULL; priv->upload = NULL; priv->c_signals[C_CHANGED] = g_signal_connect (settings, "changed", G_CALLBACK (g_paste_settings_settings_changed), self); g_paste_settings_private_set_close_on_select_from_dconf (priv); g_paste_settings_private_set_element_size_from_dconf (priv); g_paste_settings_private_set_empty_history_confirmation_from_dconf (priv); g_paste_settings_private_set_growing_lines_from_dconf (priv); g_paste_settings_private_set_history_name_from_dconf (priv); g_paste_settings_private_set_images_support_from_dconf (priv); g_paste_settings_private_set_launch_ui_from_dconf (priv); g_paste_settings_private_set_make_password_from_dconf (priv); g_paste_settings_private_set_max_displayed_history_size_from_dconf (priv); g_paste_settings_private_set_max_history_size_from_dconf (priv); g_paste_settings_private_set_max_memory_usage_from_dconf (priv); g_paste_settings_private_set_max_text_item_size_from_dconf (priv); g_paste_settings_private_set_min_text_item_size_from_dconf (priv); g_paste_settings_private_set_pop_from_dconf (priv); g_paste_settings_private_set_primary_to_history_from_dconf (priv); g_paste_settings_private_set_rich_text_support_from_dconf (priv); g_paste_settings_private_set_save_history_from_dconf (priv); g_paste_settings_private_set_show_history_from_dconf (priv); g_paste_settings_private_set_sync_clipboard_to_primary_from_dconf (priv); g_paste_settings_private_set_sync_primary_to_clipboard_from_dconf (priv); g_paste_settings_private_set_synchronize_clipboards_from_dconf (priv); g_paste_settings_private_set_track_changes_from_dconf (priv); g_paste_settings_private_set_track_extension_state_from_dconf (priv); g_paste_settings_private_set_trim_items_from_dconf (priv); g_paste_settings_private_set_upload_from_dconf (priv); priv->shell_settings = NULL; priv->extension_enabled = FALSE; if (g_paste_util_has_gnome_shell ()) { priv->shell_settings = g_settings_new (G_PASTE_SHELL_SETTINGS_NAME); priv->c_signals[C_SHELL_CHANGED] = g_signal_connect (priv->shell_settings, "changed::" G_PASTE_SHELL_ENABLED_EXTENSIONS_SETTING, G_CALLBACK (g_paste_settings_shell_settings_changed), self); g_paste_settings_private_set_extension_enabled_from_dconf (priv); } } /** * g_paste_settings_new: * * Create a new instance of #GPasteSettings * * Returns: a newly allocated #GPasteSettings * free it with g_object_unref */ G_PASTE_VISIBLE GPasteSettings * g_paste_settings_new (void) { return g_object_new (G_PASTE_TYPE_SETTINGS, NULL); } gpaste-3.42.6/src/ui/tmp/gpaste-settings.h000066400000000000000000000213011421222064600203630ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_SETTINGS_H__ #define __G_PASTE_SETTINGS_H__ #include G_BEGIN_DECLS #define G_PASTE_TYPE_SETTINGS (g_paste_settings_get_type ()) G_PASTE_FINAL_TYPE (Settings, settings, SETTINGS, GObject) gboolean g_paste_settings_get_close_on_select (const GPasteSettings *self); guint64 g_paste_settings_get_element_size (const GPasteSettings *self); gboolean g_paste_settings_get_empty_history_confirmation (const GPasteSettings *self); gboolean g_paste_settings_get_growing_lines (const GPasteSettings *self); const gchar *g_paste_settings_get_history_name (const GPasteSettings *self); gboolean g_paste_settings_get_images_support (const GPasteSettings *self); const gchar *g_paste_settings_get_launch_ui (const GPasteSettings *self); const gchar *g_paste_settings_get_make_password (const GPasteSettings *self); guint64 g_paste_settings_get_max_displayed_history_size (const GPasteSettings *self); guint64 g_paste_settings_get_max_history_size (const GPasteSettings *self); guint64 g_paste_settings_get_max_memory_usage (const GPasteSettings *self); guint64 g_paste_settings_get_max_text_item_size (const GPasteSettings *self); guint64 g_paste_settings_get_min_text_item_size (const GPasteSettings *self); const gchar *g_paste_settings_get_pop (const GPasteSettings *self); gboolean g_paste_settings_get_primary_to_history (const GPasteSettings *self); gboolean g_paste_settings_get_rich_text_support (const GPasteSettings *self); gboolean g_paste_settings_get_save_history (const GPasteSettings *self); const gchar *g_paste_settings_get_show_history (const GPasteSettings *self); const gchar *g_paste_settings_get_sync_clipboard_to_primary (const GPasteSettings *self); const gchar *g_paste_settings_get_sync_primary_to_clipboard (const GPasteSettings *self); gboolean g_paste_settings_get_synchronize_clipboards (const GPasteSettings *self); gboolean g_paste_settings_get_track_changes (const GPasteSettings *self); gboolean g_paste_settings_get_track_extension_state (const GPasteSettings *self); gboolean g_paste_settings_get_trim_items (const GPasteSettings *self); const gchar *g_paste_settings_get_upload (const GPasteSettings *self); void g_paste_settings_reset_close_on_select (GPasteSettings *self); void g_paste_settings_reset_element_size (GPasteSettings *self); void g_paste_settings_reset_empty_history_confirmation (GPasteSettings *self); void g_paste_settings_reset_growing_lines (GPasteSettings *self); void g_paste_settings_reset_history_name (GPasteSettings *self); void g_paste_settings_reset_images_support (GPasteSettings *self); void g_paste_settings_reset_launch_ui (GPasteSettings *self); void g_paste_settings_reset_make_password (GPasteSettings *self); void g_paste_settings_reset_max_displayed_history_size (GPasteSettings *self); void g_paste_settings_reset_max_history_size (GPasteSettings *self); void g_paste_settings_reset_max_memory_usage (GPasteSettings *self); void g_paste_settings_reset_max_text_item_size (GPasteSettings *self); void g_paste_settings_reset_min_text_item_size (GPasteSettings *self); void g_paste_settings_reset_pop (GPasteSettings *self); void g_paste_settings_reset_primary_to_history (GPasteSettings *self); void g_paste_settings_reset_rich_text_support (GPasteSettings *self); void g_paste_settings_reset_save_history (GPasteSettings *self); void g_paste_settings_reset_show_history (GPasteSettings *self); void g_paste_settings_reset_sync_clipboard_to_primary (GPasteSettings *self); void g_paste_settings_reset_sync_primary_to_clipboard (GPasteSettings *self); void g_paste_settings_reset_synchronize_clipboards (GPasteSettings *self); void g_paste_settings_reset_track_changes (GPasteSettings *self); void g_paste_settings_reset_track_extension_state (GPasteSettings *self); void g_paste_settings_reset_trim_items (GPasteSettings *self); void g_paste_settings_reset_upload (GPasteSettings *self); void g_paste_settings_set_close_on_select (GPasteSettings *self, gboolean value); void g_paste_settings_set_element_size (GPasteSettings *self, guint64 value); void g_paste_settings_set_empty_history_confirmation (GPasteSettings *self, gboolean value); void g_paste_settings_set_growing_lines (GPasteSettings *self, gboolean value); void g_paste_settings_set_history_name (GPasteSettings *self, const gchar *value); void g_paste_settings_set_images_support (GPasteSettings *self, gboolean value); void g_paste_settings_set_launch_ui (GPasteSettings *self, const gchar *value); void g_paste_settings_set_make_password (GPasteSettings *self, const gchar *value); void g_paste_settings_set_max_displayed_history_size (GPasteSettings *self, guint64 value); void g_paste_settings_set_max_history_size (GPasteSettings *self, guint64 value); void g_paste_settings_set_max_memory_usage (GPasteSettings *self, guint64 value); void g_paste_settings_set_max_text_item_size (GPasteSettings *self, guint64 value); void g_paste_settings_set_min_text_item_size (GPasteSettings *self, guint64 value); void g_paste_settings_set_pop (GPasteSettings *self, const gchar *value); void g_paste_settings_set_primary_to_history (GPasteSettings *self, gboolean value); void g_paste_settings_set_rich_text_support (GPasteSettings *self, gboolean value); void g_paste_settings_set_save_history (GPasteSettings *self, gboolean value); void g_paste_settings_set_show_history (GPasteSettings *self, const gchar *value); void g_paste_settings_set_sync_clipboard_to_primary (GPasteSettings *self, const gchar *value); void g_paste_settings_set_sync_primary_to_clipboard (GPasteSettings *self, const gchar *value); void g_paste_settings_set_synchronize_clipboards (GPasteSettings *self, gboolean value); void g_paste_settings_set_track_changes (GPasteSettings *self, gboolean value); void g_paste_settings_set_track_extension_state (GPasteSettings *self, gboolean value); void g_paste_settings_set_trim_items (GPasteSettings *self, gboolean value); void g_paste_settings_set_upload (GPasteSettings *self, const gchar *value); gboolean g_paste_settings_get_extension_enabled (const GPasteSettings *self); void g_paste_settings_set_extension_enabled (GPasteSettings *self, gboolean value); GPasteSettings *g_paste_settings_new (void); G_END_DECLS #endif /*__G_PASTE_SETTINGS_H__*/ gpaste-3.42.6/src/ui/tmp/gpaste-update-enums.c000066400000000000000000000025501421222064600211320ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include G_PASTE_VISIBLE GType g_paste_update_action_get_type (void) { static GType etype = 0; if (!etype) { static const GEnumValue values[] = { { G_PASTE_UPDATE_ACTION_REPLACE, "G_PASTE_UPDATE_ACTION_REPLACE", "REPLACE" }, { G_PASTE_UPDATE_ACTION_REMOVE, "G_PASTE_UPDATE_ACTION_REMOVE", "REMOVE" }, { G_PASTE_UPDATE_ACTION_INVALID, NULL, NULL } }; etype = g_enum_register_static (g_intern_static_string ("GPasteUpdateAction"), values); g_type_class_ref (etype); } return etype; } G_PASTE_VISIBLE GType g_paste_update_target_get_type (void) { static GType etype = 0; if (!etype) { static const GEnumValue values[] = { { G_PASTE_UPDATE_TARGET_ALL, "G_PASTE_UPDATE_TARGET_ALL", "ALL" }, { G_PASTE_UPDATE_TARGET_POSITION, "G_PASTE_UPDATE_TARGET_POSITION", "POSITION" }, { G_PASTE_UPDATE_TARGET_INVALID, NULL, NULL } }; etype = g_enum_register_static (g_intern_static_string ("GPasteUpdateTarget"), values); g_type_class_ref (etype); } return etype; } gpaste-3.42.6/src/ui/tmp/gpaste-update-enums.h000066400000000000000000000016571421222064600211460ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UPDATE_ENUMS_H__ #define __G_PASTE_UPDATE_ENUMS_H__ #include G_BEGIN_DECLS typedef enum { G_PASTE_UPDATE_ACTION_REPLACE = 1, G_PASTE_UPDATE_ACTION_REMOVE, G_PASTE_UPDATE_ACTION_INVALID = 0 } GPasteUpdateAction; #define G_PASTE_TYPE_UPDATE_ACTION (g_paste_update_action_get_type ()) GType g_paste_update_action_get_type (void); typedef enum { G_PASTE_UPDATE_TARGET_ALL = 1, G_PASTE_UPDATE_TARGET_POSITION, G_PASTE_UPDATE_TARGET_INVALID = 0 } GPasteUpdateTarget; #define G_PASTE_TYPE_UPDATE_TARGET (g_paste_update_target_get_type ()) GType g_paste_update_target_get_type (void); G_END_DECLS #endif /*__G_PASTE_UPDATE_ENUMS_H__*/ gpaste-3.42.6/src/ui/tmp/gpaste-util.c000066400000000000000000000541101421222064600174770ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #include #include "gpaste-gtk-compat.h" /** * g_paste_util_confirm_dialog: * @parent: (nullable): the parent #GtkWindow * @msg: the message to display * * Show GPaste about dialog */ G_PASTE_VISIBLE gboolean g_paste_util_confirm_dialog (GtkWindow *parent, const gchar *action, const gchar *msg) { g_return_val_if_fail (!parent || GTK_IS_WINDOW (parent), FALSE); g_return_val_if_fail (g_utf8_validate (msg, -1, NULL), FALSE); GtkWidget *dialog = gtk_dialog_new_with_buttons (PACKAGE_STRING, parent, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_USE_HEADER_BAR, action, GTK_RESPONSE_OK, _("Cancel"), GTK_RESPONSE_CANCEL, NULL); GtkWidget *label = gtk_label_new (msg); GtkDialog *d = GTK_DIALOG (dialog); gtk_widget_set_vexpand (label, TRUE); gtk_widget_set_valign (label, TRUE); gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (d)), label, TRUE, TRUE); gtk_widget_show (label); gboolean ret = gtk_dialog_run (d) == GTK_RESPONSE_OK; gtk_widget_destroy (dialog); return ret; } /* Copied from glib's gio/gapplication-tool.c */ static GVariant * app_get_platform_data (void) { g_auto (GVariantBuilder) builder; const gchar *startup_id; g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); if ((startup_id = g_getenv ("DESKTOP_STARTUP_ID"))) g_variant_builder_add (&builder, "{sv}", "desktop-startup-id", g_variant_new_string (startup_id)); return g_variant_builder_end (&builder); } static void g_paste_util_spawn_on_proxy_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data G_GNUC_UNUSED) { g_autoptr (GDBusProxy) proxy = g_dbus_proxy_new_for_bus_finish (res, NULL /* error */); if (proxy) { g_dbus_proxy_call (proxy, "Activate", g_variant_new ("(@a{sv})", app_get_platform_data ()), G_DBUS_CALL_FLAGS_NONE, -1, NULL, /* cancellable */ NULL, /* callback */ NULL); /* user_data */ } } /** * g_paste_util_spawn: * @app: the GPaste app to spawn * * spawn a GPaste app */ G_PASTE_VISIBLE void g_paste_util_spawn (const gchar *app) { g_return_if_fail (g_utf8_validate (app, -1, NULL)); g_autofree gchar *name = g_strdup_printf ("org.gnome.GPaste.%s", app); g_autofree gchar *object = g_strdup_printf ("/org/gnome/GPaste/%s", app); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, name, object, "org.freedesktop.Application", NULL, g_paste_util_spawn_on_proxy_ready, NULL); } static GDBusProxy * _bus_proxy_new_sync (const gchar *app, GError **error) { g_autofree gchar *name = g_strdup_printf ("org.gnome.GPaste.%s", app); g_autofree gchar *object = g_strdup_printf ("/org/gnome/GPaste/%s", app); return g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, name, object, "org.freedesktop.Application", NULL, error); } static gboolean _spawn_sync (GDBusProxy *proxy, GError **error) { G_GNUC_UNUSED g_autoptr (GVariant) res = g_dbus_proxy_call_sync (proxy, "Activate", g_variant_new ("(@a{sv})", app_get_platform_data ()), G_DBUS_CALL_FLAGS_NONE, -1, NULL, error); return !error || !(*error); } /** * g_paste_util_spawn_sync: * @app: the GPaste app to spawn * @error: a #GError or %NULL * * spawn a GPaste app * * Returns: whether the spawn was successful */ G_PASTE_VISIBLE gboolean g_paste_util_spawn_sync (const gchar *app, GError **error) { g_return_val_if_fail (g_utf8_validate (app, -1, NULL), FALSE); g_return_val_if_fail (!error || !(*error), FALSE); g_autoptr (GDBusProxy) proxy = _bus_proxy_new_sync (app, error); if (!proxy) return FALSE; return _spawn_sync (proxy, error); } static void g_paste_util_activate_ui_on_proxy_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) { g_autofree gpointer *data = (gpointer *) user_data; g_autofree gchar *action = data[0]; GVariant *arg = data[1]; g_autoptr (GDBusProxy) proxy = g_dbus_proxy_new_for_bus_finish (res, NULL /* error */); if (proxy) { g_auto (GVariantBuilder) params; g_variant_builder_init (¶ms, G_VARIANT_TYPE ("av")); if (arg) g_variant_builder_add (¶ms, "v", arg); g_dbus_proxy_call (proxy, "ActivateAction", g_variant_new ("(sav@a{sv})", action, ¶ms, app_get_platform_data ()), G_DBUS_CALL_FLAGS_NONE, -1, NULL, /* cancellable */ NULL, /* callback */ NULL); /* user_data */ } } /** * g_paste_util_activate_ui: * @action: the action to activate * @arg: (nullable): the action argument * * Activate an action on a GPaste app */ G_PASTE_VISIBLE void g_paste_util_activate_ui (const gchar *action, GVariant *arg) { g_return_if_fail (g_utf8_validate (action, -1, NULL)); gpointer *data = g_new (gpointer, 2); data[0] = g_strdup (action); data[1] = arg; g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.gnome.GPaste.Ui", "/org/gnome/GPaste/Ui", "org.freedesktop.Application", NULL, g_paste_util_activate_ui_on_proxy_ready, data); } /** * g_paste_util_activate_ui_sync: * @action: the action to activate * @arg: (nullable): the action argument * @error: a #GError or %NULL * * activate an action from GPaste Ui * * Returns: whether the action was successful */ G_PASTE_VISIBLE gboolean g_paste_util_activate_ui_sync (const gchar *action, GVariant *arg, GError **error) { g_return_val_if_fail (g_utf8_validate (action, -1, NULL), FALSE); g_return_val_if_fail (!error || !(*error), FALSE); g_autoptr (GDBusProxy) proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.gnome.GPaste.Ui", "/org/gnome/GPaste/Ui", "org.freedesktop.Application", NULL, error); if (!proxy) return FALSE; g_auto (GVariantBuilder) params; g_variant_builder_init (¶ms, G_VARIANT_TYPE ("av")); if (arg) g_variant_builder_add (¶ms, "v", arg); /* We only consume it */ G_GNUC_UNUSED g_autoptr (GVariant) res = g_dbus_proxy_call_sync (proxy, "ActivateAction", g_variant_new ("(sav@a{sv})", action, ¶ms, app_get_platform_data ()), G_DBUS_CALL_FLAGS_NONE, -1, NULL, /* cancellable */ error); return TRUE; } /** * g_paste_util_empty_with_confirmation: * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @history: the name of the history to empty * * Empty a history after confirmation. * Confirmation is skipped if GPaste is configured to do so. */ G_PASTE_VISIBLE void g_paste_util_empty_with_confirmation (GPasteClient *client, const GPasteSettings *settings, const gchar *history) { g_return_if_fail (_G_PASTE_IS_CLIENT (client)); g_return_if_fail (_G_PASTE_IS_SETTINGS (settings)); g_return_if_fail (g_utf8_validate (history, -1, NULL)); if (g_paste_settings_get_empty_history_confirmation (settings)) g_paste_util_activate_ui ("empty", g_variant_new_string (history)); else g_paste_client_empty_history (client, history, NULL, NULL); } /** * g_paste_util_empty_with_confirmation_sync: * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @history: the name of the history to empty * @error: a #GError or %NULL * * Empty a history after confirmation. * Confirmation is skipped if GPaste is configured to do so. * * Returns: whether the action was successful */ G_PASTE_VISIBLE gboolean g_paste_util_empty_with_confirmation_sync (GPasteClient *client, const GPasteSettings *settings, const gchar *history, GError **error) { g_return_val_if_fail (_G_PASTE_IS_CLIENT (client), FALSE); g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), FALSE); g_return_val_if_fail (g_utf8_validate (history, -1, NULL), FALSE); g_return_val_if_fail (!error || !(*error), FALSE); if (g_paste_settings_get_empty_history_confirmation (settings)) { return g_paste_util_activate_ui_sync ("empty", g_variant_new_string (history), error); } else { g_autoptr (GError) _error = NULL; g_paste_client_empty_history_sync (client, history, &_error); if (error) { *error = _error; _error = NULL; } return !_error && !(error && *error); } } /** * g_paste_util_relace: * @text: the initial text * @pattern: the pattern to replace * @substitution: the replacement text * * Replace some text * * Returns: the newly allocated string */ G_PASTE_VISIBLE gchar * g_paste_util_replace (const gchar *text, const gchar *pattern, const gchar *substitution) { g_return_val_if_fail (g_utf8_validate (text, -1, NULL), NULL); g_return_val_if_fail (g_utf8_validate (pattern, -1, NULL), NULL); g_return_val_if_fail (g_utf8_validate (substitution, -1, NULL), NULL); g_autofree gchar *regex_string = g_regex_escape_string (pattern, -1); g_autoptr (GRegex) regex = g_regex_new (regex_string, 0, /* Compile options */ 0, /* Match options */ NULL); /* Error */ return g_regex_replace_literal (regex, text, (gssize) -1, 0, /* Start position */ substitution, 0, /* Match options */ NULL); /* Error */ } /** * g_paste_util_compute_checksum: * @image: the #GdkPixbuf to checksum * * Compute the checksum of an image * * Returns: the newly allocated checksum */ G_PASTE_VISIBLE gchar * g_paste_util_compute_checksum (GdkPixbuf *image) { if (!image || !GDK_IS_PIXBUF (image)) return NULL; const guint8 *data = gdk_pixbuf_read_pixels (image); gsize length = gdk_pixbuf_get_byte_length (image); return g_compute_checksum_for_data (G_CHECKSUM_SHA256, data, length); } /** * g_paste_util_empty_history: * @parent_window: (nullable): the parent #GtkWindow * @client: a #GPasteClient instance * @settings: a #GPasteSettings instance * @history: the name of the history to empty * * Empty history after prompting user for confirmation */ G_PASTE_VISIBLE void g_paste_util_empty_history (GtkWindow *parent_window, GPasteClient *client, GPasteSettings *settings, const gchar *history) { if (!g_paste_settings_get_empty_history_confirmation (settings) || /* Translators: this is the translation for emptying the history */ g_paste_util_confirm_dialog (parent_window, _("Empty"), _("Do you really want to empty the history?"))) g_paste_client_empty_history (client, history, NULL, NULL); } /** * g_paste_util_has_gnome_shell: * * Check whether gnome-shell is installed or not * * Returns: %TRUE if gnome-shell is installed */ G_PASTE_VISIBLE gboolean g_paste_util_has_gnome_shell (void) { GSettingsSchemaSource *source = g_settings_schema_source_get_default (); if (!source) return FALSE; g_autoptr (GSettingsSchema) schema = g_settings_schema_source_lookup (source, G_PASTE_SHELL_SETTINGS_NAME, TRUE); return !!schema; } /** * g_paste_util_show_win: * @application: a #GtkApplication * * Present the application's window to user */ G_PASTE_VISIBLE void g_paste_util_show_win (GApplication *application) { g_return_if_fail (GTK_IS_APPLICATION (application)); for (GList *wins = gtk_application_get_windows (GTK_APPLICATION (application)); wins; wins = g_list_next (wins)) { if (GTK_IS_WIDGET (wins->data) && gtk_widget_get_realized (wins->data)) gtk_window_present (wins->data); } } /** * g_paste_util_get_au_result: * @variant: a #GVariant * @len: the length of the resulting array * * Get the "au" GVariant as an array of guint32 * * Returns: (array length=len): The resulting array */ G_PASTE_VISIBLE guint32 * g_paste_util_get_dbus_au_result (GVariant *variant, guint64 *len) { guint64 _len; const guint32 *r = g_variant_get_fixed_array (variant, &_len, sizeof (guint32)); guint32 *ret = g_memdup2 (r, _len * sizeof (guint32)); if (len) *len = _len; return ret; } /** * g_paste_util_get_dbus_item_result: * @variant: a #GVariant * * Get the "(ss)" GVariant as an item * * Returns: (transfer full): The item */ G_PASTE_VISIBLE GPasteClientItem * g_paste_util_get_dbus_item_result (GVariant *variant) { const gchar *uuid, *value; g_variant_get (variant, "(ss)", &uuid, &value); return g_paste_client_item_new (uuid, value); } /** * g_paste_util_get_dbus_items_result: * @variant: a #GVariant * * Get the "a(ss)" GVariant as a list of items * * Returns: (element-type GPasteClientItem) (transfer full): The items */ G_PASTE_VISIBLE GList * g_paste_util_get_dbus_items_result (GVariant *variant) { GList *items = NULL; GVariantIter iter; g_autoptr (GVariant) v = NULL; g_variant_iter_init (&iter, variant); while ((v = g_variant_iter_next_value (&iter))) { items = g_list_append (items, g_paste_util_get_dbus_item_result (v)); g_variant_unref (v); } return items; } static gchar * g_paste_util_get_runtime_dir (const gchar *component) { g_return_val_if_fail (component, NULL); return g_strdup_printf ("%s/" PACKAGE_NAME "/%s", g_get_user_runtime_dir (), component); } /** * g_paste_util_write_pid_file: * @component: The component we're handling * * Write the pid file */ G_PASTE_VISIBLE void g_paste_util_write_pid_file (const gchar *component) { g_return_if_fail (component); g_autofree gchar *dir = g_paste_util_get_runtime_dir (component); g_mkdir_with_parents (dir, 0700); g_autofree gchar *pidfile = g_strdup_printf ("%s/pid", dir); g_autofree gchar *contents = g_strdup_printf ("%" G_PID_FORMAT, getpid ()); g_file_set_contents (pidfile, contents, -1, NULL); } /** * g_paste_util_read_pid_file: * @component: The component we're handling * * Read the pid file * * Returns: the pid */ G_PASTE_VISIBLE GPid g_paste_util_read_pid_file (const gchar *component) { g_return_val_if_fail (component, (GPid) -1); #ifdef G_OS_UNIX g_autofree gchar *dir = g_paste_util_get_runtime_dir (component); g_autofree gchar *pidfile = g_strdup_printf ("%s/pid", dir); g_autofree gchar *contents = NULL; if (!g_file_get_contents (pidfile, &contents, NULL, NULL)) return (GPid) -1; return (GPid) g_ascii_strtoll (contents, NULL, 0); #else return (GPid) -1; #endif } /** * g_paste_util_xml_decode: * @text: The text to decode * * Decode the text to its original pre-xml form * * Returns: the decoded text */ G_PASTE_VISIBLE gchar * g_paste_util_xml_decode (const gchar *text) { g_return_val_if_fail (text, NULL); g_autofree gchar *_decoded_text = g_paste_util_replace (text, ">", ">"); return g_paste_util_replace (_decoded_text, "&", "&"); } /** * g_paste_util_xml_encode: * @text: The text to encode * * Encode the text into its xml form * * Returns: the encoded text */ G_PASTE_VISIBLE gchar * g_paste_util_xml_encode (const gchar *text) { g_return_val_if_fail (text, NULL); g_autofree gchar *_encoded_text = g_paste_util_replace (text, "&", "&"); return g_paste_util_replace (_encoded_text, ">", ">"); } /** * g_paste_util_get_history_dir_path: * * Get the path to the directory where we store the history * * Returns: the directory path */ G_PASTE_VISIBLE gchar * g_paste_util_get_history_dir_path (void) { const gchar *user_data_dir = g_get_user_data_dir (); gchar *meson_bug_history_path = g_build_filename (user_data_dir, PACKAGE_NAME, NULL); // meson wrongfully defined PACKAGE as PACKAGE_NAME. // use it if it exists, but otherwise use the correct path. if (g_file_test (meson_bug_history_path, G_FILE_TEST_IS_DIR)) return meson_bug_history_path; g_free (meson_bug_history_path); return g_build_filename (user_data_dir, PACKAGE, NULL); } /** * g_paste_util_get_history_dir: * * Get the directory where we store the history * * Returns: (transfer full): the directory */ G_PASTE_VISIBLE GFile * g_paste_util_get_history_dir (void) { g_autofree gchar *history_dir_path = g_paste_util_get_history_dir_path (); return g_file_new_for_path (history_dir_path); } /** * g_paste_util_get_history_file_path: * @name: the name of the history * @extension: the file extension * * Get the path to the file in which we store the history * * Returns: the file path */ G_PASTE_VISIBLE gchar * g_paste_util_get_history_file_path (const gchar *name, const gchar *extension) { g_return_val_if_fail (name, NULL); g_return_val_if_fail (extension, NULL); g_autofree gchar *history_dir_path = g_paste_util_get_history_dir_path (); g_autofree gchar *history_file_name = g_strconcat (name, ".", extension, NULL); return g_build_filename (history_dir_path, history_file_name, NULL); } /** * g_paste_util_get_history_file: * @name: the name of the history * @extension: the file extension * * Get the file in which we store the history * * Returns: (transfer full): the file */ G_PASTE_VISIBLE GFile * g_paste_util_get_history_file (const gchar *name, const gchar *extension) { g_return_val_if_fail (name, NULL); g_return_val_if_fail (extension, NULL); g_autofree gchar *history_file_path = g_paste_util_get_history_file_path (name, extension); return g_file_new_for_path (history_file_path); } /** * g_paste_util_ensure_history_dir_exists: * @settings: a #GPasteSettings instance * * Ensure the history dir exists * * Returns: where it exists or if there was an error creating it */ G_PASTE_VISIBLE gboolean g_paste_util_ensure_history_dir_exists (const GPasteSettings *settings) { g_return_val_if_fail (_G_PASTE_IS_SETTINGS (settings), FALSE); g_autoptr (GFile) history_dir = g_paste_util_get_history_dir (); if (!g_file_query_exists (history_dir, NULL)) /* cancellable */ { if (!g_paste_settings_get_save_history (settings)) return TRUE; g_autoptr (GError) error = NULL; g_file_make_directory_with_parents (history_dir, NULL, /* cancellable */ &error); if (error) { g_critical ("%s: %s", _("Could not create history dir"), error->message); return FALSE; } } return TRUE; } gpaste-3.42.6/src/ui/tmp/gpaste-util.h000066400000000000000000000062741421222064600175140ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_UTIL_H__ #define __G_PASTE_UTIL_H__ #include #include #include G_BEGIN_DECLS gboolean g_paste_util_confirm_dialog (GtkWindow *parent, const gchar *action, const gchar *msg); void g_paste_util_spawn (const gchar *app); gboolean g_paste_util_spawn_sync (const gchar *app, GError **error); void g_paste_util_activate_ui (const gchar *action, GVariant *arg); gboolean g_paste_util_activate_ui_sync (const gchar *action, GVariant *arg, GError **error); void g_paste_util_empty_with_confirmation (GPasteClient *client, const GPasteSettings *settings, const gchar *history); gboolean g_paste_util_empty_with_confirmation_sync (GPasteClient *client, const GPasteSettings *settings, const gchar *history, GError **error); gchar *g_paste_util_replace (const gchar *text, const gchar *pattern, const gchar *substitution); gchar *g_paste_util_compute_checksum (GdkPixbuf *image); void g_paste_util_empty_history (GtkWindow *parent_window, GPasteClient *client, GPasteSettings *settings, const gchar *history); gboolean g_paste_util_has_gnome_shell (void); void g_paste_util_show_win (GApplication *application); guint32 *g_paste_util_get_dbus_au_result (GVariant *variant, guint64 *len); GPasteClientItem *g_paste_util_get_dbus_item_result (GVariant *variant); GList *g_paste_util_get_dbus_items_result (GVariant *variant); void g_paste_util_write_pid_file (const gchar *component); GPid g_paste_util_read_pid_file (const gchar *component); gchar *g_paste_util_xml_decode (const gchar *text); gchar *g_paste_util_xml_encode (const gchar *text); gchar *g_paste_util_get_history_dir_path (void); GFile *g_paste_util_get_history_dir (void); gchar *g_paste_util_get_history_file_path (const gchar *name, const gchar *extension); GFile *g_paste_util_get_history_file (const gchar *name, const gchar *extension); gboolean g_paste_util_ensure_history_dir_exists (const GPasteSettings *settings); G_END_DECLS #endif /*__G_PASTE_UTIL_H__*/ gpaste-3.42.6/src/vapi.mk000066400000000000000000000021071421222064600151470ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou VAPIGEN_VAPIS = $(NULL) libgpaste_vapi_file = bindings/gpaste-1.0.vapi libgpaste_vapi_deps_file = $(libgpaste_vapi_file:.vapi=.deps) GPASTE_VAPI_DEPS = \ gdk-pixbuf-2.0 \ gio-2.0 \ glib-2.0 \ gobject-2.0 \ gtk+-3.0 \ $(NULL) $(libgpaste_vapi_deps_file): $(libgpaste_gir_file) $(AM_V_GEN) rm -f $@; \ for dep in ${GPASTE_VAPI_DEPS}; do \ echo $$dep >> $@; \ done $(libgpaste_vapi_file): $(libgpaste_gir_file) $(libgpaste_vapi_deps_file) bindings_gpaste_1_0_vapi_FILES = \ $(libgpaste_gir_file) \ $(NULL) bindings_gpaste_1_0_vapi_DEPS = \ $(GPASTE_VAPI_DEPS) \ $(NULL) vapidir = $(datadir)/vala/vapi vapi_DATA = $(NULL) if ENABLE_VAPIGEN VAPIGEN_VAPIS += \ $(libgpaste_vapi_file) \ $(NULL) vapi_DATA += \ $(VAPIGEN_VAPIS) \ $(libgpaste_vapi_deps_file) \ $(NULL) endif CLEANFILES += \ $(vapi_DATA) \ $(NULL) -include $(VAPIGEN_MAKEFILE) gpaste-3.42.6/tests/000077500000000000000000000000001421222064600142325ustar00rootroot00000000000000gpaste-3.42.6/tests/gnome-shell-client.mk000066400000000000000000000010471421222064600202530ustar00rootroot00000000000000## This file is part of GPaste. ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou TESTS+= \ bin/test-gnome-shell-client \ $(NULL) bin_test_gnome_shell_client_SOURCES = \ %D%/gnome-shell-client/test-gnome-shell-client.c \ $(NULL) bin_test_gnome_shell_client_CFLAGS = \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(NULL) bin_test_gnome_shell_client_LDADD = \ $(builddir)/$(libgpaste_la_file) \ $(GLIB_LIBS) \ $(NULL) gpaste-3.42.6/tests/gnome-shell-client/000077500000000000000000000000001421222064600177205ustar00rootroot00000000000000gpaste-3.42.6/tests/gnome-shell-client/meson.build000066400000000000000000000006161421222064600220650ustar00rootroot00000000000000# We're overlinking with libgpaste here, but we need one of it's includes # and since this isn't installed anyway it doesn't matter and is easier for us. gnome_shell_client_test_exe = executable( 'gpaste-gnome-shell-client-test', sources: 'test-gnome-shell-client.c', dependencies: [ glib_dep, gtk_dep, libgpaste_internal_dep ], ) test('test-gnome-shell-client', gnome_shell_client_test_exe)gpaste-3.42.6/tests/gnome-shell-client/test-gnome-shell-client.c000066400000000000000000000063341421222064600245350ustar00rootroot00000000000000/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou */ #include #define EXIT_TEST_SKIP 77 typedef struct { const gchar *accelerator; guint32 action; } Accelerator; static void on_accelerator_activated (GPasteGnomeShellClient *client G_GNUC_UNUSED, guint64 action, gpointer user_data) { Accelerator *accels = user_data; g_print ("Recieved action %lu, was ", action); for (guint64 i = 0; i < 3; ++i) { if (accels[i].action == action) { g_print ("%s\n", accels[i].accelerator); return; } } g_print ("not a known accelerator\n"); } static gboolean kill_loop (gpointer user_data) { g_main_loop_quit (user_data); return G_SOURCE_REMOVE; } gint main (gint argc, gchar *argv[]) { if (argc != 2 || !g_paste_str_equal (argv[1], "--dont-skip")) return EXIT_TEST_SKIP; g_setenv ("G_MESSAGES_DEBUG", "all", TRUE); g_autoptr (GError) error = NULL; g_autoptr (GPasteGnomeShellClient) client = g_paste_gnome_shell_client_new_sync (&error); if (!client) { g_error ("Couldn't connect to gnome-shell: %s", error->message); return EXIT_FAILURE; } Accelerator accels[3] = { { "D", 0 }, { "F", 0 }, { "G", 0 } }; GPasteGnomeShellAccelerator gs_accels[3]; GPasteGnomeShellAccelerator gs_accel = G_PASTE_GNOME_SHELL_ACCELERATOR (accels[2].accelerator); for (guint64 i = 0; i < 2; ++i) gs_accels[i] = G_PASTE_GNOME_SHELL_ACCELERATOR (accels[i].accelerator); gs_accels[2].accelerator = NULL; guint64 signal_id = g_signal_connect (client, "accelerator-activated", G_CALLBACK (on_accelerator_activated), accels); g_print ("Now testing KeyGrabber\n"); guint32 *actions = g_paste_gnome_shell_client_grab_accelerators_sync (client, gs_accels, &error); for (guint64 i = 0; i < 2; ++i) accels[i].action = actions[i]; g_free (actions); if (error) { g_error ("Couldn't grab accelerators: %s", error->message); return EXIT_FAILURE; } accels[2].action = g_paste_gnome_shell_client_grab_accelerator_sync (client, gs_accel, &error); if (error) { g_error ("Couldn't grab accelerator: %s", error->message); return EXIT_FAILURE; } g_print ("Now should recognize D, F and G for 10 secondes.\n"); g_autoptr (GMainLoop) loop = g_main_loop_new (NULL, FALSE); g_source_set_name_by_id (g_timeout_add_seconds (10, kill_loop, loop), "[GPaste] test loop"); g_main_loop_run (loop); for (guint64 i = 0; i < 2; ++i) { g_paste_gnome_shell_client_ungrab_accelerator_sync (client, accels[i].action, &error); accels[i].action = 0; if (error) { g_error ("Couldn't ungrab accelerator: %s", error->message); return EXIT_FAILURE; } } g_print ("Now should no longer recognize keybindings for 3 secondes.\n"); g_usleep (3000000); g_signal_handler_disconnect (client, signal_id); return EXIT_SUCCESS; } gpaste-3.42.6/tests/meson.build000066400000000000000000000000341421222064600163710ustar00rootroot00000000000000subdir('gnome-shell-client')gpaste-3.42.6/tools/000077500000000000000000000000001421222064600142305ustar00rootroot00000000000000gpaste-3.42.6/tools/check-includes.sh000077500000000000000000000027431421222064600174560ustar00rootroot00000000000000#!/usr/bin/env zsh typeset -A includes get_file_name() { local file="${1}" if [[ "${file}" == *.h ]]; then echo "$(basename ${file})" else echo "${file}" fi } parse_includes() { local file name for file in **/*.[ch]; do name=$(get_file_name "${file}") includes[${name}]="$(grep '#include' "${file}" | awk '{print $NF}' | sed -e 's///' -e 's/"//g')" done } get_includes() { local file="${1}" local name name=$(get_file_name "${file}") echo ${includes[${name}]} } has_include() { local file="${1}" local include="${2}" local output="${3}" local i for i in $(get_includes "${file}"); do [[ "${i}" == "${include}" ]] && echo "${include}: ${output} => ${include}" && return 0 has_include "${i}" "${include}" "${output} => ${i}" && return 0 done return 1 } check_include() { local file="${1}" local include="${2}" local i for i in $(get_includes "${file}"); do [[ "${include}" == "${i}" ]] && continue has_include "${i}" "${include}" "${file} => ${i}" done } check_includes() { local file i for file in **/*.[ch]; do [[ "${file}" == "src/libgpaste/gpaste.h" ]] && continue for i in $(get_includes "${file}"); do check_include "${file}" "${i}" done done } main() { pushd "$(dirname "${1}")/.." &>/dev/null parse_includes check_includes popd &>/dev/null } main "${0}"