diff -Nru gpaste-3.30.1/configure.ac gpaste-3.30.2/configure.ac --- gpaste-3.30.1/configure.ac 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/configure.ac 2018-11-14 22:12:20.000000000 +0000 @@ -2,14 +2,14 @@ ## ## Copyright (c) 2010-2018, Marc-Antoine Perennou -m4_define([gpaste_version], [3.30.1]) +m4_define([gpaste_version], [3.30.2]) # 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], [11:2:0]) +m4_define([gpaste_lt_version], [12:1:1]) # Build system requirements m4_define([autoconf_required], [2.69]) diff -Nru gpaste-3.30.1/debian/changelog gpaste-3.30.2/debian/changelog --- gpaste-3.30.1/debian/changelog 2018-11-03 21:33:41.000000000 +0000 +++ gpaste-3.30.2/debian/changelog 2018-12-12 17:17:20.000000000 +0000 @@ -1,3 +1,11 @@ +gpaste (3.30.2-1) unstable; urgency=medium + + * New upstream version 3.30.2 + * Update symbols + * Expose Build-Depends-Package in symbols file + + -- Jérémy Lal Wed, 12 Dec 2018 18:17:20 +0100 + gpaste (3.30.1-2) unstable; urgency=medium * Release to unstable diff -Nru gpaste-3.30.1/debian/libgpaste11.symbols gpaste-3.30.2/debian/libgpaste11.symbols --- gpaste-3.30.1/debian/libgpaste11.symbols 2018-09-06 13:30:50.000000000 +0000 +++ gpaste-3.30.2/debian/libgpaste11.symbols 2018-12-12 17:17:16.000000000 +0000 @@ -1,4 +1,5 @@ libgpaste.so.11 libgpaste11 #MINVER# +* Build-Depends-Package: libgpaste-dev LIBGPASTE_3_16_0@LIBGPASTE_3_16_0 3.16.2.1 LIBGPASTE_3_18_0@LIBGPASTE_3_18_0 3.18.1.1 LIBGPASTE_3_20_0@LIBGPASTE_3_20_0 3.20 @@ -6,6 +7,7 @@ LIBGPASTE_3_24_0@LIBGPASTE_3_24_0 3.24.2 LIBGPASTE_3_28_0@LIBGPASTE_3_28_0 3.28.2 LIBGPASTE_3_28_1@LIBGPASTE_3_28_1 3.28.2 + LIBGPASTE_3_28_3@LIBGPASTE_3_28_3 3.30.2 g_paste_bus_get_connection@LIBGPASTE_3_18_0 3.18.1.1 g_paste_bus_get_type@LIBGPASTE_3_18_0 3.18.1.1 g_paste_bus_new@LIBGPASTE_3_18_0 3.18.1.1 @@ -414,6 +416,8 @@ g_paste_util_compute_checksum@LIBGPASTE_3_16_0 3.16.2.1 g_paste_util_confirm_dialog@LIBGPASTE_3_16_0 3.16.2.1 g_paste_util_empty_history@LIBGPASTE_3_28_1 3.28.2 + g_paste_util_empty_with_confirmation@LIBGPASTE_3_28_3 3.30.2 + g_paste_util_empty_with_confirmation_sync@LIBGPASTE_3_28_3 3.30.2 g_paste_util_ensure_history_dir_exists@LIBGPASTE_3_24_0 3.24.2 g_paste_util_get_dbus_at_result@LIBGPASTE_3_18_0 3.18.1.1 g_paste_util_get_dbus_au_result@LIBGPASTE_3_18_0 3.18.1.1 diff -Nru gpaste-3.30.1/NEWS gpaste-3.30.2/NEWS --- gpaste-3.30.1/NEWS 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/NEWS 2018-11-14 22:12:20.000000000 +0000 @@ -1,3 +1,10 @@ +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) ============= @@ -9,6 +16,13 @@ - 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) ============= diff -Nru gpaste-3.30.1/po/de.po gpaste-3.30.2/po/de.po --- gpaste-3.30.1/po/de.po 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/po/de.po 2018-11-14 22:12:20.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-09-09 13:52+0200\n" +"POT-Creation-Date: 2018-11-14 23:11+0100\n" "PO-Revision-Date: 2014-03-27 21:03+0100\n" "Last-Translator: Christian Kluge \n" "Language-Team: \n" @@ -229,7 +229,7 @@ #. Translators: this is the translation for emptying the history #: src/libgpaste/ui/gpaste-ui-empty-history.c:65 -#: src/libgpaste/util/gpaste-util.c:341 +#: src/libgpaste/util/gpaste-util.c:410 #, fuzzy msgid "Empty" msgstr "(Leer)" @@ -290,11 +290,11 @@ msgid "Upload" msgstr "" -#: src/libgpaste/util/gpaste-util.c:341 +#: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "" -#: src/libgpaste/util/gpaste-util.c:620 +#: src/libgpaste/util/gpaste-util.c:689 msgid "Could not create history dir" msgstr "Ordner für die Chronik konnte nicht angelegt werden" diff -Nru gpaste-3.30.1/po/es.po gpaste-3.30.2/po/es.po --- gpaste-3.30.1/po/es.po 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/po/es.po 2018-11-14 22:12:20.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-09-09 13:52+0200\n" +"POT-Creation-Date: 2018-11-14 23:11+0100\n" "PO-Revision-Date: 2011-11-20 16:30+0100\n" "Last-Translator: Antonio Trujillo \n" "Language-Team: Spanish\n" @@ -228,7 +228,7 @@ #. Translators: this is the translation for emptying the history #: src/libgpaste/ui/gpaste-ui-empty-history.c:65 -#: src/libgpaste/util/gpaste-util.c:341 +#: src/libgpaste/util/gpaste-util.c:410 #, fuzzy msgid "Empty" msgstr "(Vacío)" @@ -290,11 +290,11 @@ msgid "Upload" msgstr "" -#: src/libgpaste/util/gpaste-util.c:341 +#: src/libgpaste/util/gpaste-util.c:410 msgid "Do you really want to empty the history?" msgstr "" -#: src/libgpaste/util/gpaste-util.c:620 +#: src/libgpaste/util/gpaste-util.c:689 msgid "Could not create history dir" msgstr "No se pudo crear directorio de historial" diff -Nru gpaste-3.30.1/po/fr.po gpaste-3.30.2/po/fr.po --- gpaste-3.30.1/po/fr.po 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/po/fr.po 2018-11-14 22:12:20.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-09-09 13:52+0200\n" +"POT-Creation-Date: 2018-11-14 23:11+0100\n" "PO-Revision-Date: 2011-01-25 16:05+0100\n" "Last-Translator: Marc-Antoine Perennou \n" "Language-Team: French\n" @@ -217,7 +217,7 @@ #. Translators: this is the translation for emptying the history #: src/libgpaste/ui/gpaste-ui-empty-history.c:65 -#: src/libgpaste/util/gpaste-util.c:341 +#: src/libgpaste/util/gpaste-util.c:410 msgid "Empty" msgstr "Vider" @@ -275,11 +275,11 @@ msgid "Upload" msgstr "Publier" -#: src/libgpaste/util/gpaste-util.c:341 +#: 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:620 +#: src/libgpaste/util/gpaste-util.c:689 msgid "Could not create history dir" msgstr "Impossible de créer le dossier d'historique" diff -Nru gpaste-3.30.1/po/nl_NL.po gpaste-3.30.2/po/nl_NL.po --- gpaste-3.30.1/po/nl_NL.po 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/po/nl_NL.po 2018-11-14 22:12:20.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-09-09 13:52+0200\n" +"POT-Creation-Date: 2018-11-14 23:11+0100\n" "PO-Revision-Date: 2017-03-17 17:38+0100\n" "Last-Translator: Heimen Stoffels \n" "Language-Team: Vistaus \n" @@ -218,7 +218,7 @@ #. Translators: this is the translation for emptying the history #: src/libgpaste/ui/gpaste-ui-empty-history.c:65 -#: src/libgpaste/util/gpaste-util.c:341 +#: src/libgpaste/util/gpaste-util.c:410 msgid "Empty" msgstr "Legen" @@ -275,11 +275,11 @@ msgid "Upload" msgstr "Uploaden" -#: src/libgpaste/util/gpaste-util.c:341 +#: 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:620 +#: src/libgpaste/util/gpaste-util.c:689 msgid "Could not create history dir" msgstr "Het creëren van de geschiedenismap is mislukt" diff -Nru gpaste-3.30.1/po/pt_BR.po gpaste-3.30.2/po/pt_BR.po --- gpaste-3.30.1/po/pt_BR.po 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/po/pt_BR.po 2018-11-14 22:12:20.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-09-09 13:52+0200\n" +"POT-Creation-Date: 2018-11-14 23:11+0100\n" "PO-Revision-Date: 2015-10-10 20:03-0300\n" "Last-Translator: Elder Marco \n" "Language-Team: \n" @@ -227,7 +227,7 @@ #. Translators: this is the translation for emptying the history #: src/libgpaste/ui/gpaste-ui-empty-history.c:65 -#: src/libgpaste/util/gpaste-util.c:341 +#: src/libgpaste/util/gpaste-util.c:410 msgid "Empty" msgstr "Vazio" @@ -286,11 +286,11 @@ msgid "Upload" msgstr "Carregar" -#: src/libgpaste/util/gpaste-util.c:341 +#: 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:620 +#: src/libgpaste/util/gpaste-util.c:689 msgid "Could not create history dir" msgstr "Não foi possível criar o diretório do histórico" diff -Nru gpaste-3.30.1/po/sv.po gpaste-3.30.2/po/sv.po --- gpaste-3.30.1/po/sv.po 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/po/sv.po 2018-11-14 22:12:20.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-09-09 13:52+0200\n" +"POT-Creation-Date: 2018-11-14 23:11+0100\n" "PO-Revision-Date: 2018-01-06 08:14+0100\n" "Last-Translator: Åke Engelbrektson \n" "Language-Team: Svenska Språkfiler \n" @@ -219,7 +219,7 @@ #. Translators: this is the translation for emptying the history #: src/libgpaste/ui/gpaste-ui-empty-history.c:65 -#: src/libgpaste/util/gpaste-util.c:341 +#: src/libgpaste/util/gpaste-util.c:410 msgid "Empty" msgstr "Töm" @@ -276,11 +276,11 @@ msgid "Upload" msgstr "Ladda upp" -#: src/libgpaste/util/gpaste-util.c:341 +#: 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:620 +#: src/libgpaste/util/gpaste-util.c:689 msgid "Could not create history dir" msgstr "Kunde inte skapa historikmapp" diff -Nru gpaste-3.30.1/README.md gpaste-3.30.2/README.md --- gpaste-3.30.1/README.md 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/README.md 2018-11-14 22:12:20.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.1](https://www.imagination-land.org/posts/2018-09-09-gpaste-3.30.1-released.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). -Direct link to download: +Direct link to download: diff -Nru gpaste-3.30.1/src/gnome-shell/emptyHistoryItem.js gpaste-3.30.2/src/gnome-shell/emptyHistoryItem.js --- gpaste-3.30.1/src/gnome-shell/emptyHistoryItem.js 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/src/gnome-shell/emptyHistoryItem.js 2018-11-14 22:12:20.000000000 +0000 @@ -15,7 +15,7 @@ var GPasteEmptyHistoryItem = new Lang.Class({ Name: 'GPasteEmptyHistoryItem', - _init: function(client, settings) { + _init: function(client, settings, menu) { this.actor = new St.Button({ reactive: true, can_focus: true, @@ -26,13 +26,11 @@ this.actor.child = new St.Icon({ icon_name: 'edit-clear-all-symbolic' }); this.actor.connect('clicked', function() { + menu.itemActivated(); client.get_history_name((client, result) => { const name = client.get_history_name_finish(result); - if (settings.get_empty_history_confirmation()) - GPaste.util_activate_ui("empty", GLib.Variant.new_string(name)); - else - client.empty_history(name, null); + GPaste.util_empty_with_confirmation (client, settings, name); }); }); } diff -Nru gpaste-3.30.1/src/gnome-shell/indicator.js gpaste-3.30.2/src/gnome-shell/indicator.js --- gpaste-3.30.1/src/gnome-shell/indicator.js 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/src/gnome-shell/indicator.js 2018-11-14 22:12:20.000000000 +0000 @@ -79,7 +79,7 @@ this._client = GPaste.Client.new_finish(result); this._uiItem = new UiItem.GPasteUiItem(this.menu); - this._emptyHistoryItem = new EmptyHistoryItem.GPasteEmptyHistoryItem(this._client, this._settings); + 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); diff -Nru gpaste-3.30.1/src/libgpaste/daemon/gpaste-daemon.c gpaste-3.30.2/src/libgpaste/daemon/gpaste-daemon.c --- gpaste-3.30.1/src/libgpaste/daemon/gpaste-daemon.c 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/src/libgpaste/daemon/gpaste-daemon.c 2018-11-14 22:12:20.000000000 +0000 @@ -683,10 +683,11 @@ { const GPasteDaemonPrivate *priv = _g_paste_daemon_get_instance_private (self); guint64 position = g_paste_daemon_get_dbus_uint64_parameter (parameters); + GVariant *variant = g_variant_new_uint64 (position); g_paste_history_select (priv->history, position); - G_PASTE_SEND_DBUS_SIGNAL_FULL (ITEM_SELECTED, g_variant_new_uint64 (position), NULL); + G_PASTE_SEND_DBUS_SIGNAL_WITH_DATA (ITEM_SELECTED, variant); } static void diff -Nru gpaste-3.30.1/src/libgpaste/libgpaste.sym gpaste-3.30.2/src/libgpaste/libgpaste.sym --- gpaste-3.30.1/src/libgpaste/libgpaste.sym 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/src/libgpaste/libgpaste.sym 2018-11-14 22:12:20.000000000 +0000 @@ -499,3 +499,9 @@ g_paste_settings_reset_empty_history_confirmation; g_paste_settings_set_empty_history_confirmation; } LIBGPASTE_3_28_0; + +LIBGPASTE_3_28_3 { +global: + g_paste_util_empty_with_confirmation; + g_paste_util_empty_with_confirmation_sync; +} LIBGPASTE_3_28_1; diff -Nru gpaste-3.30.1/src/libgpaste/util/gpaste-util.c gpaste-3.30.2/src/libgpaste/util/gpaste-util.c --- gpaste-3.30.1/src/libgpaste/util/gpaste-util.c 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/src/libgpaste/util/gpaste-util.c 2018-11-14 22:12:20.000000000 +0000 @@ -201,6 +201,8 @@ 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; @@ -269,6 +271,73 @@ } /** + * g_paste_util_empty_with_confirmation: + * @client: a #GPasteClient instance + * @settings: a #GPasteSettings instance + * @history: the name of the history to empty + * + * Empty an 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 an 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 diff -Nru gpaste-3.30.1/src/libgpaste/util/gpaste-util.h gpaste-3.30.2/src/libgpaste/util/gpaste-util.h --- gpaste-3.30.1/src/libgpaste/util/gpaste-util.h 2018-09-09 11:53:18.000000000 +0000 +++ gpaste-3.30.2/src/libgpaste/util/gpaste-util.h 2018-11-14 22:12:20.000000000 +0000 @@ -29,6 +29,13 @@ 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);