diff -Nru gpaste-3.30.2/configure.ac gpaste-3.32.0/configure.ac --- gpaste-3.30.2/configure.ac 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/configure.ac 2019-03-12 08:48:24.000000000 +0000 @@ -2,14 +2,14 @@ ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou -m4_define([gpaste_version], [3.30.2]) +m4_define([gpaste_version], [3.32.0]) # 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], [12:1:1]) +m4_define([gpaste_lt_version], [12:2:1]) # Build system requirements m4_define([autoconf_required], [2.69]) @@ -157,7 +157,7 @@ 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-3 gjs-1.0 >= gjs_required]) + PKG_CHECK_MODULES(JS_EXTENSION, [mutter-clutter-4 gjs-1.0 >= gjs_required]) ]) AS_IF([test x${enable_x_keybinder} = xyes], [ diff -Nru gpaste-3.30.2/data/appstream/meson.build gpaste-3.32.0/data/appstream/meson.build --- gpaste-3.30.2/data/appstream/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/data/appstream/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,8 @@ +i18n.merge_file( + 'gpaste-appdata', + 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'), +) \ No newline at end of file diff -Nru gpaste-3.30.2/data/completions/meson.build gpaste-3.32.0/data/completions/meson.build --- gpaste-3.30.2/data/completions/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/data/completions/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,13 @@ +if 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 diff -Nru gpaste-3.30.2/data/control-center/meson.build gpaste-3.32.0/data/control-center/meson.build --- gpaste-3.30.2/data/control-center/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/data/control-center/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,7 @@ +configure_file( + input: '42-gpaste.control-center.xml.in', + configuration: conf, + output: '42-gpaste.xml', + install: true, + install_dir: keybindings_dir, +) diff -Nru gpaste-3.30.2/data/dbus/meson.build gpaste-3.32.0/data/dbus/meson.build --- gpaste-3.30.2/data/dbus/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/data/dbus/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,15 @@ +configure_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, +) diff -Nru gpaste-3.30.2/data/desktop/meson.build gpaste-3.32.0/data/desktop/meson.build --- gpaste-3.30.2/data/desktop/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/data/desktop/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,15 @@ +untranslated_desktop_file = configure_file( + input: 'org.gnome.GPaste.Ui.desktop.in.in', + configuration: conf, + output: 'org.gnome.GPaste.Ui.desktop.in', +) + +i18n.merge_file( + 'gpaste-desktop-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'), +) \ No newline at end of file diff -Nru gpaste-3.30.2/data/gsettings/meson.build gpaste-3.32.0/data/gsettings/meson.build --- gpaste-3.30.2/data/gsettings/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/data/gsettings/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,7 @@ +configure_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'), +) diff -Nru gpaste-3.30.2/data/meson.build gpaste-3.32.0/data/meson.build --- gpaste-3.30.2/data/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/data/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,25 @@ +subdir('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 ], +) diff -Nru gpaste-3.30.2/data/search-provider/meson.build gpaste-3.32.0/data/search-provider/meson.build --- gpaste-3.30.2/data/search-provider/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/data/search-provider/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,4 @@ +install_data( + 'org.gnome.GPaste.search-provider.ini', + install_dir: join_paths(get_option('datadir'), 'gnome-shell', 'search-providers'), +) \ No newline at end of file diff -Nru gpaste-3.30.2/data/systemd/meson.build gpaste-3.32.0/data/systemd/meson.build --- gpaste-3.30.2/data/systemd/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/data/systemd/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,11 @@ +configure_file( + input: 'org.gnome.GPaste.Ui.systemd.in', + configuration: conf, + output: 'org.gnome.GPaste.Ui.service', +) + +configure_file( + input: 'org.gnome.GPaste.systemd.in', + configuration: conf, + output: 'org.gnome.GPaste.service', +) \ No newline at end of file diff -Nru gpaste-3.30.2/debian/changelog gpaste-3.32.0/debian/changelog --- gpaste-3.30.2/debian/changelog 2019-04-12 17:58:45.000000000 +0000 +++ gpaste-3.32.0/debian/changelog 2019-04-23 21:26:18.000000000 +0000 @@ -1,3 +1,10 @@ +gpaste (3.32.0-0ppa1) disco; urgency=medium + + * New upstream version 3.32.0 + * Remove upstream patches + + -- Danilo Piazzalunga Tue, 23 Apr 2019 23:26:18 +0200 + gpaste (3.30.2-1ubuntu1) disco; urgency=medium * debian/patches/version-reqs.patch: Pull upstream commit to diff -Nru gpaste-3.30.2/debian/control gpaste-3.32.0/debian/control --- gpaste-3.30.2/debian/control 2019-04-12 17:58:45.000000000 +0000 +++ gpaste-3.32.0/debian/control 2019-04-23 21:26:18.000000000 +0000 @@ -15,6 +15,7 @@ gobject-introspection (>= 1.48.0~), libgirepository1.0-dev (>= 1.48.0~), libglib2.0-dev (>= 2.58.0~), + libgdk-pixbuf2.0-dev (>= 2.38.0~), libgtk-3-dev (>= 3.24), libxml2-dev, libxcb-keysyms1-dev, @@ -22,7 +23,7 @@ libdbus-1-dev, libxtst-dev, libclutter-1.0-dev, - libmutter-4-dev, + libmutter-4-dev (>= 3.30.0~), valac (>= 0.32) Build-Depends-Indep: libgjs-dev (>= 1.54.0) @@ -76,7 +77,7 @@ libgpaste11 (= ${binary:Version}), gir1.2-gpaste-1.0 (= ${binary:Version}), pkg-config, - libglib2.0-dev (>= 2.56.0~) + libglib2.0-dev (>= 2.58.0~) Provides: libgpaste2-dev, libgpaste3-dev, libgpaste4-dev, libgpaste6-dev Conflicts: libgpaste2-dev, libgpaste3-dev, libgpaste4-dev, libgpaste6-dev Replaces: libgpaste6-dev @@ -109,7 +110,7 @@ Package: gnome-shell-extensions-gpaste Depends: ${misc:Depends}, - gnome-shell (>= 3.24), + gnome-shell (>= 3.32), gpaste (>= ${source:Version}), gir1.2-gpaste-1.0 (>= ${source:Version}) Architecture: all diff -Nru gpaste-3.30.2/debian/patches/series gpaste-3.32.0/debian/patches/series --- gpaste-3.30.2/debian/patches/series 2019-04-12 17:58:45.000000000 +0000 +++ gpaste-3.32.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -version-reqs.patch diff -Nru gpaste-3.30.2/debian/patches/version-reqs.patch gpaste-3.32.0/debian/patches/version-reqs.patch --- gpaste-3.30.2/debian/patches/version-reqs.patch 2019-04-12 17:58:45.000000000 +0000 +++ gpaste-3.32.0/debian/patches/version-reqs.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -From eacd9ecbcf6db260a2bdc22275c7a855cad66424 Mon Sep 17 00:00:00 2001 -From: Marc-Antoine Perennou -Date: Mon, 4 Mar 2019 15:02:42 +0100 -Subject: [PATCH] update required mutter/gnome-shell versions - -Fixes #263 - -Signed-off-by: Marc-Antoine Perennou ---- - configure.ac | 2 +- - src/gnome-shell/metadata.json.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 279529bc..36b2a750 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -157,7 +157,7 @@ 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-3 gjs-1.0 >= gjs_required]) -+ PKG_CHECK_MODULES(JS_EXTENSION, [mutter-clutter-4 gjs-1.0 >= gjs_required]) - ]) - - AS_IF([test x${enable_x_keybinder} = xyes], [ -diff --git a/src/gnome-shell/metadata.json.in b/src/gnome-shell/metadata.json.in -index 5a3b4284..5e4c1caa 100644 ---- a/src/gnome-shell/metadata.json.in -+++ b/src/gnome-shell/metadata.json.in -@@ -1,6 +1,6 @@ - { - "shell-version": [ -- "3.30" -+ "3.31.90", "3.31.91", "3.31.92", "3.32" - ], - "uuid": "GPaste@gnome-shell-extensions.gnome.org", - "name": "GPaste", diff -Nru gpaste-3.30.2/m4/gpaste.m4 gpaste-3.32.0/m4/gpaste.m4 --- gpaste-3.30.2/m4/gpaste.m4 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/m4/gpaste.m4 2019-03-12 08:48:24.000000000 +0000 @@ -40,7 +40,6 @@ AC_DEFUN([G_PASTE_APPEND_CFLAGS], [ _G_PASTE_APPEND_CFLAGS([ \ -pipe \ - -pedantic \ -DANOTHER_BRICK_IN_THE \ -Wall \ -W \ diff -Nru gpaste-3.30.2/man/1/meson.build gpaste-3.32.0/man/1/meson.build --- gpaste-3.30.2/man/1/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/man/1/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1 @@ +install_man('gpaste-client.1') \ No newline at end of file diff -Nru gpaste-3.30.2/man/meson.build gpaste-3.32.0/man/meson.build --- gpaste-3.30.2/man/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/man/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1 @@ +subdir('1') \ No newline at end of file diff -Nru gpaste-3.30.2/meson.build gpaste-3.32.0/meson.build --- gpaste-3.30.2/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,106 @@ +project('GPaste', + 'c', + version: '3.32.0', + meson_version: '>=0.46.0', +) + +apiversion = '1.0' +gpaste_soversion = '11.0.3' + +glib_req='>=2.58.0' +gdk_pixbuf_req='>=2.38.0' +gjs_req='>=1.54.0' +gtk3_req='>=3.24.0' +mutter_clutter_req='>=3.30.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) +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-4', 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_package', 'GPaste') +conf.set('localedir', join_paths(get_option('prefix'), get_option('datadir'), 'locale')) + +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') diff -Nru gpaste-3.30.2/meson_options.txt gpaste-3.32.0/meson_options.txt --- gpaste-3.30.2/meson_options.txt 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/meson_options.txt 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,10 @@ +option('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') diff -Nru gpaste-3.30.2/NEWS gpaste-3.32.0/NEWS --- gpaste-3.30.2/NEWS 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/NEWS 2019-03-12 08:48:24.000000000 +0000 @@ -1,3 +1,9 @@ +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) ============= diff -Nru gpaste-3.30.2/po/de.po gpaste-3.32.0/po/de.po --- gpaste-3.30.2/po/de.po 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/po/de.po 2019-03-12 08:48:24.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" -"POT-Creation-Date: 2018-11-14 23:11+0100\n" +"POT-Creation-Date: 2019-03-12 09:47+0100\n" "PO-Revision-Date: 2014-03-27 21:03+0100\n" "Last-Translator: Christian Kluge \n" "Language-Team: \n" diff -Nru gpaste-3.30.2/po/es.po gpaste-3.32.0/po/es.po --- gpaste-3.30.2/po/es.po 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/po/es.po 2019-03-12 08:48:24.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" -"POT-Creation-Date: 2018-11-14 23:11+0100\n" +"POT-Creation-Date: 2019-03-12 09:47+0100\n" "PO-Revision-Date: 2011-11-20 16:30+0100\n" "Last-Translator: Antonio Trujillo \n" "Language-Team: Spanish\n" diff -Nru gpaste-3.30.2/po/fr.po gpaste-3.32.0/po/fr.po --- gpaste-3.30.2/po/fr.po 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/po/fr.po 2019-03-12 08:48:24.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" -"POT-Creation-Date: 2018-11-14 23:11+0100\n" +"POT-Creation-Date: 2019-03-12 09:47+0100\n" "PO-Revision-Date: 2011-01-25 16:05+0100\n" "Last-Translator: Marc-Antoine Perennou \n" "Language-Team: French\n" diff -Nru gpaste-3.30.2/po/meson.build gpaste-3.32.0/po/meson.build --- gpaste-3.30.2/po/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/po/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,4 @@ +i18n.gettext( + 'GPaste', + preset: 'glib', +) \ No newline at end of file diff -Nru gpaste-3.30.2/po/nl_NL.po gpaste-3.32.0/po/nl_NL.po --- gpaste-3.30.2/po/nl_NL.po 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/po/nl_NL.po 2019-03-12 08:48:24.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" -"POT-Creation-Date: 2018-11-14 23:11+0100\n" +"POT-Creation-Date: 2019-03-12 09:47+0100\n" "PO-Revision-Date: 2017-03-17 17:38+0100\n" "Last-Translator: Heimen Stoffels \n" "Language-Team: Vistaus \n" diff -Nru gpaste-3.30.2/po/pt_BR.po gpaste-3.32.0/po/pt_BR.po --- gpaste-3.30.2/po/pt_BR.po 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/po/pt_BR.po 2019-03-12 08:48:24.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" -"POT-Creation-Date: 2018-11-14 23:11+0100\n" +"POT-Creation-Date: 2019-03-12 09:47+0100\n" "PO-Revision-Date: 2015-10-10 20:03-0300\n" "Last-Translator: Elder Marco \n" "Language-Team: \n" diff -Nru gpaste-3.30.2/po/sv.po gpaste-3.32.0/po/sv.po --- gpaste-3.30.2/po/sv.po 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/po/sv.po 2019-03-12 08:48:24.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: GPaste\n" "Report-Msgid-Bugs-To: Marc-Antoine@Perennou.com\n" -"POT-Creation-Date: 2018-11-14 23:11+0100\n" +"POT-Creation-Date: 2019-03-12 09:47+0100\n" "PO-Revision-Date: 2018-01-06 08:14+0100\n" "Last-Translator: Åke Engelbrektson \n" "Language-Team: Svenska Språkfiler \n" diff -Nru gpaste-3.30.2/README.md gpaste-3.32.0/README.md --- gpaste-3.30.2/README.md 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/README.md 2019-03-12 08:48:24.000000000 +0000 @@ -39,6 +39,6 @@ You can see everything I'll post about GPaste [there](https://www.imagination-land.org/tags/GPaste.html). -Latest release for GNOME 3.30 is: [GPaste 3.30.2](https://www.imagination-land.org/posts/2018-11-14-gpaste-3.30.2-released.html). +Latest release for GNOME 3.30 is: [GPaste 3.32.0](https://www.imagination-land.org/posts/2019-03-12-gpaste-3.32.0-released.html). -Direct link to download: +Direct link to download: diff -Nru gpaste-3.30.2/src/client/meson.build gpaste-3.32.0/src/client/meson.build --- gpaste-3.30.2/src/client/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/src/client/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,11 @@ +gpaste_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'), +) \ No newline at end of file diff -Nru gpaste-3.30.2/src/daemon/meson.build gpaste-3.32.0/src/daemon/meson.build --- gpaste-3.30.2/src/daemon/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/src/daemon/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,11 @@ +gpaste_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'), +) \ No newline at end of file diff -Nru gpaste-3.30.2/src/gnome-shell/aboutItem.js gpaste-3.32.0/src/gnome-shell/aboutItem.js --- gpaste-3.30.2/src/gnome-shell/aboutItem.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/aboutItem.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,18 +1,13 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ -const Lang = imports.lang; +const { St } = imports.gi; -const St = imports.gi.St; - -var GPasteAboutItem = new Lang.Class({ - Name: 'GPasteAboutItem', - - _init: function(client, menu) { +class GPasteAboutItem { + constructor(client, menu) { this.actor = new St.Button({ reactive: true, can_focus: true, @@ -27,4 +22,4 @@ client.about(null); }); } -}); +}; diff -Nru gpaste-3.30.2/src/gnome-shell/deleteButton.js gpaste-3.32.0/src/gnome-shell/deleteButton.js --- gpaste-3.30.2/src/gnome-shell/deleteButton.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/deleteButton.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,19 +1,13 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ -const Lang = imports.lang; +const { Clutter, St } = imports.gi; -const Clutter = imports.gi.Clutter; -const St = imports.gi.St; - -var GPasteDeleteButton = new Lang.Class({ - Name: 'GPasteDeleteButton', - - _init: function(client, index) { +class GPasteDeleteButton { + constructor(client, index) { this.actor = new St.Button(); this.actor.child = new St.Icon({ @@ -25,14 +19,14 @@ this.setIndex(index); this.actor.connect('clicked', this._onClick.bind(this)); - }, + } - setIndex: function(index) { + setIndex(index) { this._index = index; - }, + } - _onClick: function() { + _onClick() { this._client.delete(this._index, null); return Clutter.EVENT_STOP; } -}); +}; diff -Nru gpaste-3.30.2/src/gnome-shell/deleteItemPart.js gpaste-3.32.0/src/gnome-shell/deleteItemPart.js --- gpaste-3.30.2/src/gnome-shell/deleteItemPart.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/deleteItemPart.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,29 +1,24 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ -const Lang = imports.lang; - -const St = imports.gi.St; +const { St } = imports.gi; const ExtensionUtils = imports.misc.extensionUtils; const Me = ExtensionUtils.getCurrentExtension(); const DeleteButton = Me.imports.deleteButton; -var GPasteDeleteItemPart = new Lang.Class({ - Name: 'GPasteDeleteItemPart', - - _init: function(client, index) { +class GPasteDeleteItemPart { + constructor(client, index) { this.actor = new St.Bin({ x_align: St.Align.END }); this._deleteButton = new DeleteButton.GPasteDeleteButton(client, index); this.actor.child = this._deleteButton.actor; - }, + } - setIndex: function(index) { + setIndex(index) { this._deleteButton.setIndex(index); } -}); +}; diff -Nru gpaste-3.30.2/src/gnome-shell/dummyHistoryItem.js gpaste-3.32.0/src/gnome-shell/dummyHistoryItem.js --- gpaste-3.30.2/src/gnome-shell/dummyHistoryItem.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/dummyHistoryItem.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,33 +1,28 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ const Gettext = imports.gettext; -const Lang = imports.lang; const PopupMenu = imports.ui.popupMenu; const _ = Gettext.domain('GPaste').gettext; -var GPasteDummyHistoryItem = new Lang.Class({ - Name: 'GPasteDummyHistoryItem', - Extends: PopupMenu.PopupMenuItem, - - _init: function() { - this.parent(_("(Couldn't connect to GPaste daemon)")); +class GPasteDummyHistoryItem extends PopupMenu.PopupMenuItem { + constructor() { + super(_("(Couldn't connect to GPaste daemon)")); this.setSensitive(false); - }, + } - showEmpty: function() { + showEmpty() { this.label.text = _("(Empty)"); this.actor.show(); - }, + } - showNoResult: function() { + showNoResult() { this.label.text = _("(No result)"); this.actor.show(); } -}); +}; diff -Nru gpaste-3.30.2/src/gnome-shell/emptyHistoryItem.js gpaste-3.32.0/src/gnome-shell/emptyHistoryItem.js --- gpaste-3.30.2/src/gnome-shell/emptyHistoryItem.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/emptyHistoryItem.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,21 +1,13 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ -const Lang = imports.lang; +const { GLib, GPaste, St } = imports.gi; -const GLib = imports.gi.GLib; -const St = imports.gi.St; - -const GPaste = imports.gi.GPaste; - -var GPasteEmptyHistoryItem = new Lang.Class({ - Name: 'GPasteEmptyHistoryItem', - - _init: function(client, settings, menu) { +class GPasteEmptyHistoryItem { + constructor(client, settings, menu) { this.actor = new St.Button({ reactive: true, can_focus: true, @@ -34,4 +26,4 @@ }); }); } -}); +}; diff -Nru gpaste-3.30.2/src/gnome-shell/extension.js gpaste-3.32.0/src/gnome-shell/extension.js --- gpaste-3.30.2/src/gnome-shell/extension.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/extension.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,9 +1,8 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ const Config = imports.misc.config; diff -Nru gpaste-3.30.2/src/gnome-shell/indicator.js gpaste-3.32.0/src/gnome-shell/indicator.js --- gpaste-3.30.2/src/gnome-shell/indicator.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/indicator.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,20 +1,15 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ const Gettext = imports.gettext; -const Lang = imports.lang; const PanelMenu = imports.ui.panelMenu; const PopupMenu = imports.ui.popupMenu; -const Clutter = imports.gi.Clutter; -const GLib = imports.gi.GLib; - -const GPaste = imports.gi.GPaste; +const { Clutter, GObject, GLib, GPaste } = imports.gi; const _ = Gettext.domain('GPaste').gettext; @@ -31,12 +26,10 @@ const StatusIcon = Me.imports.statusIcon; const UiItem = Me.imports.uiItem; -var GPasteIndicator = new Lang.Class({ - Name: 'GPasteIndicator', - Extends: PanelMenu.Button, - - _init: function() { - this.parent(0.0, "GPaste"); +var GPasteIndicator = GObject.registerClass( +class GPasteIndicator extends PanelMenu.Button { + _init() { + super._init(0.0, "GPaste"); this._statusIcon = new StatusIcon.GPasteStatusIcon(); this.actor.add_child(this._statusIcon.actor); @@ -58,6 +51,7 @@ 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)); @@ -105,15 +99,15 @@ this.actor.connect('destroy', this._onDestroy.bind(this)); }); - }, + } - shutdown: function() { + shutdown() { this._onStateChanged (false); this._onDestroy(); this.destroy(); - }, + } - _onKeyPressEvent: function(actor, event) { + _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) { @@ -122,34 +116,34 @@ } else { this._maybeUpdateIndexVisibility(event, true); } - }, + } - _onKeyReleaseEvent: function(actor, event) { + _onKeyReleaseEvent(actor, event) { this._updateIndexVisibility(!this._eventIsControlKey(event) && event.has_control_modifier()); - }, + } - _maybeUpdateIndexVisibility: function(event, state) { + _maybeUpdateIndexVisibility(event, state) { if (this._eventIsControlKey(event)) { this._updateIndexVisibility(state); } - }, + } - _updateIndexVisibility: function(state) { + _updateIndexVisibility(state) { this._history.slice(0, 10).forEach(function(i) { i.showIndex(state); }); - }, + } - _eventIsControlKey: function(event) { + _eventIsControlKey(event) { const key = event.get_key_symbol(); return (key == Clutter.KEY_Control_L || key == Clutter.KEY_Control_R); - }, + } - _hasSearch: function() { + _hasSearch() { return this._searchItem.text.length > 0; - }, + } - _onSearch: function(page) { + _onSearch(page) { if (this._hasSearch()) { const search = this._searchItem.text.toLowerCase(); @@ -184,26 +178,26 @@ this._searchResults = []; this._refresh(0); } - }, + } - _onNewSearch: function() { + _onNewSearch() { this._onSearch(1); - }, + } - _resetElementSize: function() { + _resetElementSize() { const size = this._settings.get_element_size(); this._searchItem.resetSize(size/2 + 3); this._history.forEach(function(i) { i.setTextSize(size); }); - }, + } - _updatePage: function(page) { + _updatePage(page) { this._pageSwitcher.setActive(page); this._refresh(0); - }, + } - _resetMaxDisplayedSize: function() { + _resetMaxDisplayedSize() { const oldSize = this._history.length; const newSize = this._settings.get_max_displayed_history_size(); const elementSize = this._settings.get_element_size(); @@ -229,9 +223,9 @@ } else { this._updatePage((offset / oldSize) + 1); } - }, + } - _update: function(client, action, target, position) { + _update(client, action, target, position) { switch (target) { case GPaste.UpdateTarget.ALL: this._refresh(0); @@ -249,9 +243,9 @@ } break; } - }, + } - _refresh: function(resetTextFrom) { + _refresh(resetTextFrom) { if (this._searchResults.length > 0) { this._onSearch(this._pageSwitcher.getPage()); } else if (this._hasSearch()) { @@ -285,9 +279,9 @@ }); }); } - }, + } - _updateVisibility: function(empty, search) { + _updateVisibility(empty, search) { if (!empty) { this._dummyHistoryItem.actor.hide(); this._emptyHistoryItem.actor.show(); @@ -301,45 +295,45 @@ this._emptyHistoryItem.actor.hide(); this._searchItem.actor.hide(); } - }, + } - _popup: function() { + _popup() { this.menu.open(true); - }, + } - _toggle: function(c, state) { + _toggle(c, state) { this._switch.toggle(state); - }, + } - _selectSearch: function() { + _selectSearch() { if (this._history.length > 0) { this._searchItem.grabFocus(); } - }, + } - _addToHeader: function(item) { + _addToHeader(item) { this.menu.addMenuItem(item, this._headerSize++); - }, + } - _addToPostHeader: function(item) { + _addToPostHeader(item) { this.menu.addMenuItem(item, this._headerSize + this._postHeaderSize++); - }, + } - _addToPreFooter: function(item) { + _addToPreFooter(item) { this.menu.addMenuItem(item, this._headerSize + this._postHeaderSize + this._history.length + this._preFooterSize++); - }, + } - _addToFooter: function(item) { + _addToFooter(item) { this.menu.addMenuItem(item, this._headerSize + this._postHeaderSize + this._history.length + this._preFooterSize + this._footerSize++); - }, + } - _onStateChanged: function(state) { + _onStateChanged(state) { if (this._client) { this._client.on_extension_state_changed(state, null); } - }, + } - _onOpenStateChanged: function(menu, state) { + _onOpenStateChanged(menu, state) { if (state) { this._searchItem.reset(); this._updatePage(1); @@ -348,9 +342,9 @@ } else { this._updateIndexVisibility(false); } - }, + } - _onMenuKeyPress: function(actor, event) { + _onMenuKeyPress(actor, event) { const symbol = event.get_key_symbol(); if (symbol == Clutter.KEY_Left) { return this._pageSwitcher.previous(); @@ -359,9 +353,9 @@ return this._pageSwitcher.next(); } return Clutter.EVENT_PROPAGATE; - }, + } - _onDestroy: function() { + _onDestroy() { if (!this._client) { return; } diff -Nru gpaste-3.30.2/src/gnome-shell/item.js gpaste-3.32.0/src/gnome-shell/item.js --- gpaste-3.30.2/src/gnome-shell/item.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/item.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,31 +1,21 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ - -const Lang = imports.lang; const PopupMenu = imports.ui.popupMenu; -const Clutter = imports.gi.Clutter; -const Pango = imports.gi.Pango; -const St = imports.gi.St; - -const GPaste = imports.gi.GPaste; +const { Clutter, GPaste, Pango, St } = imports.gi; const ExtensionUtils = imports.misc.extensionUtils; const Me = ExtensionUtils.getCurrentExtension(); const DeleteItemPart = Me.imports.deleteItemPart; -var GPasteItem = new Lang.Class({ - Name: 'GPasteItem', - Extends: PopupMenu.PopupMenuItem, - - _init: function(client, size, index) { - this.parent(""); +class GPasteItem extends PopupMenu.PopupMenuItem { + constructor(client, size, index) { + super(""); this._client = client; @@ -46,9 +36,9 @@ this.setTextSize(size); this.setIndex(index); - }, + } - showIndex: function(state) { + showIndex(state) { if (state) { if (!this._indexLabelVisible) { this.actor.insert_child_at_index(this._indexLabel, 1); @@ -57,13 +47,13 @@ this.actor.remove_child(this._indexLabel); } this._indexLabelVisible = state; - }, + } - refresh: function() { + refresh() { this.setIndex(this._index); - }, + } - setIndex: function(index) { + setIndex(index) { const oldIndex = this._index || -1; this._index = index; @@ -90,17 +80,17 @@ this.label.clutter_text.set_text(null); this.actor.hide(); } - }, + } - setTextSize: function(size) { + setTextSize(size) { this.label.clutter_text.max_length = size; - }, + } - _onActivate: function(actor, event) { + _onActivate(actor, event) { this._client.select(this._index, null); - }, + } - _onKeyPressed: function(actor, event) { + _onKeyPressed(actor, event) { const symbol = event.get_key_symbol(); if (symbol == Clutter.KEY_space || symbol == Clutter.KEY_Return) { this.activate(event); @@ -112,4 +102,4 @@ } return Clutter.EVENT_PROPAGATE; } -}); +}; diff -Nru gpaste-3.30.2/src/gnome-shell/meson.build gpaste-3.32.0/src/gnome-shell/meson.build --- gpaste-3.30.2/src/gnome-shell/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,29 @@ +shell_extension_files = [ + 'aboutItem.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'), +) \ No newline at end of file diff -Nru gpaste-3.30.2/src/gnome-shell/metadata.json.in gpaste-3.32.0/src/gnome-shell/metadata.json.in --- gpaste-3.30.2/src/gnome-shell/metadata.json.in 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/metadata.json.in 2019-03-12 08:48:24.000000000 +0000 @@ -1,6 +1,6 @@ { "shell-version": [ - "3.30" + "3.32" ], "uuid": "GPaste@gnome-shell-extensions.gnome.org", "name": "GPaste", diff -Nru gpaste-3.30.2/src/gnome-shell/pageItem.js gpaste-3.32.0/src/gnome-shell/pageItem.js --- gpaste-3.30.2/src/gnome-shell/pageItem.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/pageItem.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,20 +1,15 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ -const Lang = imports.lang; -const Signals = imports.signals; - -const St = imports.gi.St; +const { St } = imports.gi; -var GPastePageItem = new Lang.Class({ - Name: 'GPastePageItem', - Implements: [Signals.WithSignals], +const Signals = imports.signals; - _init: function(page) { +class GPastePageItem { + constructor(page) { this.actor = new St.Button({ reactive: true, can_focus: false, @@ -29,9 +24,9 @@ this.actor.connect('clicked', () => { this.emit('switch', this._page); }); - }, + } - setActive: function(active) { + setActive(active) { if (active) { this.actor.add_style_pseudo_class('active'); this.actor.set_style("font-weight: bold;"); @@ -39,9 +34,10 @@ this.actor.remove_style_pseudo_class('active'); this.actor.set_style(null); } - }, + } - destroy: function() { + destroy() { this.actor.destroy(); } -}); +}; +Signals.addSignalMethods(GPastePageItem.prototype); diff -Nru gpaste-3.30.2/src/gnome-shell/pageSwitcher.js gpaste-3.32.0/src/gnome-shell/pageSwitcher.js --- gpaste-3.30.2/src/gnome-shell/pageSwitcher.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/pageSwitcher.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,16 +1,12 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ - -const Lang = imports.lang; const PopupMenu = imports.ui.popupMenu; -const Clutter = imports.gi.Clutter; -const St = imports.gi.St; +const { Clutter, St } = imports.gi; const ExtensionUtils = imports.misc.extensionUtils; const Me = ExtensionUtils.getCurrentExtension(); @@ -19,12 +15,9 @@ const MAX_PAGES = 20; -var GPastePageSwitcher = new Lang.Class({ - Name: 'GPastePageSwitcher', - Extends: PopupMenu.PopupBaseMenuItem, - - _init: function() { - this.parent({ +class GPastePageSwitcher extends PopupMenu.PopupBaseMenuItem { + constructor() { + super({ reactive: false, can_focus: false }); @@ -35,13 +28,13 @@ this._active = -1; this._maxDisplayedSize = -1; this._pages = []; - }, + } - setMaxDisplayedSize: function(size) { + setMaxDisplayedSize(size) { this._maxDisplayedSize = size; - }, + } - updateForSize: function(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) { @@ -61,9 +54,9 @@ this._switch(pages); return false; } - }, + } - _addPage: function() { + _addPage() { let sw = new PageItem.GPastePageItem(this._pages.length + 1); this._pages.push(sw); this._box.add(sw.actor, { expand: true, x_fill: false, x_align: St.Align.MIDDLE }); @@ -71,17 +64,17 @@ sw.connect('switch', (sw, page) => { this._switch(page); }); - }, + } - getPageOffset: function() { + getPageOffset() { return (this._active < 0) ? 0 : (this._active * this._maxDisplayedSize); - }, + } - getPage: function() { + getPage() { return this._active + 1; - }, + } - setActive: function(page) { + setActive(page) { if (page !== 0 && page !== (this._active + 1) && page <= this._pages.length) { if (this._active !== -1) { this._pages[this._active].setActive(false); @@ -89,9 +82,9 @@ this._active = page - 1; this._pages[this._active].setActive(true); } - }, + } - previous: function() { + previous() { const page = this.getPage(); if (page > 1) { @@ -99,9 +92,9 @@ return Clutter.EVENT_STOP; } return Clutter.EVENT_PROPAGATE; - }, + } - next: function() { + next() { const page = this.getPage(); if (page < this._pages.length) { @@ -109,11 +102,11 @@ return Clutter.EVENT_STOP; } return Clutter.EVENT_PROPAGATE; - }, + } - _switch: function(page) { + _switch(page) { if (!isNaN(page)) { this.emit('switch', page); } } -}); +}; diff -Nru gpaste-3.30.2/src/gnome-shell/prefs.js gpaste-3.32.0/src/gnome-shell/prefs.js --- gpaste-3.30.2/src/gnome-shell/prefs.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/prefs.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,13 +1,12 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ const Gettext = imports.gettext; -const GPaste = imports.gi.GPaste; +const { GPaste } = imports.gi; const ExtensionUtils = imports.misc.extensionUtils; const Me = ExtensionUtils.getCurrentExtension(); diff -Nru gpaste-3.30.2/src/gnome-shell/searchItem.js gpaste-3.32.0/src/gnome-shell/searchItem.js --- gpaste-3.30.2/src/gnome-shell/searchItem.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/searchItem.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,22 +1,16 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ - -const Lang = imports.lang; const PopupMenu = imports.ui.popupMenu; -const St = imports.gi.St; - -var GPasteSearchItem = new Lang.Class({ - Name: 'GPasteSearchItem', - Extends: PopupMenu.PopupBaseMenuItem, +const { St } = imports.gi; - _init: function () { - this.parent({ +class GPasteSearchItem extends PopupMenu.PopupBaseMenuItem { + constructor() { + super({ activate: false, reactive: true, hover: false, @@ -43,28 +37,28 @@ icon_name: 'edit-clear-symbolic' }); this._iconClickedId = 0; - }, + } get text() { return this._entry.get_text(); - }, + } - resetSize: function(size) { + resetSize(size) { this._entry.style = 'width: ' + size + 'em'; - }, + } - reset: function() { + reset() { this._entry.text = ''; let text = this._entry.clutter_text; text.set_cursor_visible(true); text.set_selection(0, 0); - }, + } - grabFocus: function() { + grabFocus() { this._entry.grab_key_focus(); - }, + } - _onTextChanged: function(se, prop) { + _onTextChanged(se, prop) { const dummy = (this.text.length == 0); this._entry.set_secondary_icon((dummy) ? null : this._clearIcon); if (!dummy && this._iconClickedId == 0) { @@ -72,4 +66,4 @@ } this.emit('text-changed'); } -}); +}; diff -Nru gpaste-3.30.2/src/gnome-shell/stateSwitch.js gpaste-3.32.0/src/gnome-shell/stateSwitch.js --- gpaste-3.30.2/src/gnome-shell/stateSwitch.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/stateSwitch.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,35 +1,30 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ const Gettext = imports.gettext; -const Lang = imports.lang; const PopupMenu = imports.ui.popupMenu; const _ = Gettext.domain('GPaste').gettext; -var GPasteStateSwitch = new Lang.Class({ - Name: 'GPasteStateSwitch', - Extends: PopupMenu.PopupSwitchMenuItem, - - _init: function(client) { - this.parent(_("Track changes"), client.is_active()); +class GPasteStateSwitch extends PopupMenu.PopupSwitchMenuItem { + constructor(client) { + super(_("Track changes"), client.is_active()); this._client = client; this.connect('toggled', this._onToggle.bind(this)); - }, + } - toggle: function(state) { + toggle(state) { if (state !== this.state) - this.parent(); - }, + super.toggle(state); + } - _onToggle: function(state) { + _onToggle(state) { this._client.track(this.state, null); } -}); +}; diff -Nru gpaste-3.30.2/src/gnome-shell/statusIcon.js gpaste-3.32.0/src/gnome-shell/statusIcon.js --- gpaste-3.30.2/src/gnome-shell/statusIcon.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/statusIcon.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,20 +1,15 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ - -const Lang = imports.lang; const PopupMenu = imports.ui.popupMenu; -const St = imports.gi.St; - -var GPasteStatusIcon = new Lang.Class({ - Name: 'GPasteStatusIcon', +const { St } = imports.gi; - _init: function() { +class GPasteStatusIcon { + constructor() { this.actor = new St.BoxLayout({ style_class: 'panel-status-menu-box' }); this.actor.add_child(new St.Icon({ @@ -24,4 +19,4 @@ this.actor.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM)); } -}); +}; diff -Nru gpaste-3.30.2/src/gnome-shell/uiItem.js gpaste-3.32.0/src/gnome-shell/uiItem.js --- gpaste-3.30.2/src/gnome-shell/uiItem.js 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/gnome-shell/uiItem.js 2019-03-12 08:48:24.000000000 +0000 @@ -1,20 +1,13 @@ /* * This file is part of GPaste. * - * Copyright (c) 2010-2018, Marc-Antoine Perennou + * Copyright (c) 2010-2019, Marc-Antoine Perennou */ -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ -const Lang = imports.lang; +const { GPaste, St } = imports.gi; -const GPaste = imports.gi.GPaste; - -const St = imports.gi.St; - -var GPasteUiItem = new Lang.Class({ - Name: 'GPasteUiItem', - - _init: function(menu) { +class GPasteUiItem { + constructor(menu) { this.actor = new St.Button({ reactive: true, can_focus: true, @@ -29,4 +22,4 @@ GPaste.util_spawn('Ui'); }); } -}); +}; diff -Nru gpaste-3.30.2/src/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.c gpaste-3.32.0/src/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.c --- gpaste-3.30.2/src/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.c 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.c 2019-03-12 08:48:24.000000000 +0000 @@ -22,12 +22,13 @@ "" \ "" \ "" \ - "" \ + "" \ + "" \ "" \ "" \ "" \ - "" \ - "" \ + "" \ + "" \ "" \ "" \ "" \ @@ -116,7 +117,8 @@ { GVariant *accel[] = { g_variant_new_string (accelerator.accelerator), - g_variant_new_uint32 (accelerator.flags) + g_variant_new_uint32 (accelerator.grab_flags), + g_variant_new_uint32 (accelerator.mode_flags) }; DBUS_CALL_TWO_PARAMS_RET_UINT32 (GRAB_ACCELERATOR, accel); } @@ -145,7 +147,8 @@ { 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->flags)); + 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); } @@ -194,7 +197,8 @@ { GVariant *accel[] = { g_variant_new_string (accelerator.accelerator), - g_variant_new_uint32 (accelerator.flags) + g_variant_new_uint32 (accelerator.grab_flags), + g_variant_new_uint32 (accelerator.mode_flags) }; DBUS_CALL_TWO_PARAMS_ASYNC (GRAB_ACCELERATOR, accel); } @@ -224,7 +228,8 @@ { 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->flags)); + 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); } diff -Nru gpaste-3.30.2/src/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.h gpaste-3.32.0/src/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.h --- gpaste-3.30.2/src/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.h 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/libgpaste/gnome-shell-client/gpaste-gnome-shell-client.h 2019-03-12 08:48:24.000000000 +0000 @@ -38,7 +38,7 @@ * * 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, @@ -53,15 +53,35 @@ 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; - GPasteGnomeShellActionMode flags; + GPasteMetaKeyBindingFlags mode_flags; + GPasteGnomeShellActionMode grab_flags; } GPasteGnomeShellAccelerator; -#define G_PASTE_GNOME_SHELL_ACCELERATOR(accelerator) ((GPasteGnomeShellAccelerator) {accelerator, G_PASTE_GNOME_SHELL_ACTION_MODE_ALL}) +#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) diff -Nru gpaste-3.30.2/src/libgpaste/gpaste-gsettings-keys.h gpaste-3.32.0/src/libgpaste/gpaste-gsettings-keys.h --- gpaste-3.30.2/src/libgpaste/gpaste-gsettings-keys.h 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/libgpaste/gpaste-gsettings-keys.h 2019-03-12 08:48:24.000000000 +0000 @@ -16,6 +16,7 @@ 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" diff -Nru gpaste-3.30.2/src/libgpaste/keybinder/gpaste-keybinder.c gpaste-3.32.0/src/libgpaste/keybinder/gpaste-keybinder.c --- gpaste-3.30.2/src/libgpaste/keybinder/gpaste-keybinder.c 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/libgpaste/keybinder/gpaste-keybinder.c 2019-03-12 08:48:24.000000000 +0000 @@ -199,10 +199,7 @@ if (k->action || !k->shell_client) return; - GPasteGnomeShellAccelerator accel = { - g_paste_keybinding_get_accelerator (k->binding, k->settings), - G_PASTE_GNOME_SHELL_ACTION_MODE_ALL - }; + 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); } diff -Nru gpaste-3.30.2/src/libgpaste/meson.build gpaste-3.32.0/src/libgpaste/meson.build --- gpaste-3.30.2/src/libgpaste/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/src/libgpaste/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,185 @@ +libgpaste_sources = [ + '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', + 'ui/gpaste-ui-about.c', + 'ui/gpaste-ui-backup-history.c', + 'ui/gpaste-ui-delete-history.c', + 'ui/gpaste-ui-delete-item.c', + 'ui/gpaste-ui-edit-item.c', + 'ui/gpaste-ui-empty-history.c', + 'ui/gpaste-ui-empty-item.c', + 'ui/gpaste-ui-header.c', + 'ui/gpaste-ui-history-action.c', + 'ui/gpaste-ui-history-actions.c', + 'ui/gpaste-ui-history.c', + 'ui/gpaste-ui-item-action.c', + 'ui/gpaste-ui-item-skeleton.c', + 'ui/gpaste-ui-item.c', + 'ui/gpaste-ui-new-item.c', + 'ui/gpaste-ui-panel-history.c', + 'ui/gpaste-ui-panel.c', + 'ui/gpaste-ui-reexec.c', + 'ui/gpaste-ui-search-bar.c', + 'ui/gpaste-ui-search.c', + 'ui/gpaste-ui-settings.c', + 'ui/gpaste-ui-shortcuts-window.c', + 'ui/gpaste-ui-switch.c', + 'ui/gpaste-ui-upload-item.c', + 'ui/gpaste-ui-window.c', + 'util/gpaste-util.c', +] + +libgpaste_headers = [ + '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', + 'ui/gpaste-ui-about.h', + 'ui/gpaste-ui-backup-history.h', + 'ui/gpaste-ui-delete-history.h', + 'ui/gpaste-ui-delete-item.h', + 'ui/gpaste-ui-edit-item.h', + 'ui/gpaste-ui-empty-history.h', + 'ui/gpaste-ui-empty-item.h', + 'ui/gpaste-ui-header.h', + 'ui/gpaste-ui-history-action.h', + 'ui/gpaste-ui-history-actions.h', + 'ui/gpaste-ui-history.h', + 'ui/gpaste-ui-item-action.h', + 'ui/gpaste-ui-item-skeleton.h', + 'ui/gpaste-ui-item.h', + 'ui/gpaste-ui-new-item.h', + 'ui/gpaste-ui-panel-history.h', + 'ui/gpaste-ui-panel.h', + 'ui/gpaste-ui-reexec.h', + 'ui/gpaste-ui-search-bar.h', + 'ui/gpaste-ui-search.h', + 'ui/gpaste-ui-settings.h', + 'ui/gpaste-ui-shortcuts-window.h', + 'ui/gpaste-ui-switch.h', + 'ui/gpaste-ui-upload-item.h', + 'ui/gpaste-ui-window.h', + 'util/gpaste-util.h', +] + +libgpaste_inc = include_directories( + '.', + 'client', + 'core', + 'daemon', + 'gnome-shell-client', + 'io', + 'keybinder', + 'screensaver-client', + 'settings', + 'settings-ui', + 'ui', + 'util', +) + +libgpaste = library( + 'gpaste', + sources: libgpaste_sources, + version: gpaste_soversion, + dependencies: libgpaste_deps, + install: true, + install_dir: get_option('libdir'), + include_directories : libgpaste_inc, +) + +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 diff -Nru gpaste-3.30.2/src/libgpaste/settings/gpaste-settings.c gpaste-3.32.0/src/libgpaste/settings/gpaste-settings.c --- gpaste-3.30.2/src/libgpaste/settings/gpaste-settings.c 2018-11-14 22:12:20.000000000 +0000 +++ gpaste-3.32.0/src/libgpaste/settings/gpaste-settings.c 2019-03-12 08:48:24.000000000 +0000 @@ -7,6 +7,9 @@ #include #include +#define G_SETTINGS_ENABLE_BACKEND 1 +#include + struct _GPasteSettings { GObject parent_instance; @@ -996,11 +999,29 @@ 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 = g_settings_new (G_PASTE_SETTINGS_NAME); + GSettings *settings = priv->settings = create_g_settings (); priv->history_name = NULL; priv->launch_ui = NULL; diff -Nru gpaste-3.30.2/src/meson.build gpaste-3.32.0/src/meson.build --- gpaste-3.30.2/src/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/src/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,8 @@ +subdir('libgpaste') +subdir('client') +subdir('daemon') +subdir('ui') + +if get_option('gnome-shell') + subdir('gnome-shell') +endif \ No newline at end of file diff -Nru gpaste-3.30.2/src/ui/meson.build gpaste-3.32.0/src/ui/meson.build --- gpaste-3.30.2/src/ui/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/src/ui/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,11 @@ +gpaste_ui_sources = [ + 'gpaste-ui.c', +] + +executable( + 'gpaste-ui', + sources: gpaste_ui_sources, + install: true, + dependencies: [ glib_dep, gtk_dep, libgpaste_internal_dep ], + install_dir: join_paths(get_option('libexecdir'), 'gpaste'), +) \ No newline at end of file diff -Nru gpaste-3.30.2/tests/gnome-shell-client/meson.build gpaste-3.32.0/tests/gnome-shell-client/meson.build --- gpaste-3.30.2/tests/gnome-shell-client/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/tests/gnome-shell-client/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1,9 @@ +# 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) \ No newline at end of file diff -Nru gpaste-3.30.2/tests/meson.build gpaste-3.32.0/tests/meson.build --- gpaste-3.30.2/tests/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gpaste-3.32.0/tests/meson.build 2019-03-12 08:48:24.000000000 +0000 @@ -0,0 +1 @@ +subdir('gnome-shell-client') \ No newline at end of file