[Pkg-xfce-commits] [Git][xfce-team/goodies/xfce4-notifyd][upstream/latest] New upstream version 0.9.3.
Unit 193 (@unit193)
gitlab at salsa.debian.org
Fri Nov 10 01:28:56 GMT 2023
Unit 193 pushed to branch upstream/latest at xfce / goodies / xfce4-notifyd
Commits:
52bd6f0f by Unit 193 at 2023-11-09T20:22:04-05:00
New upstream version 0.9.3.
- - - - -
16 changed files:
- NEWS
- autogen.sh
- common/xfce-notify-common.c
- common/xfce-notify-common.h
- common/xfce-notify-log-util.c
- common/xfce-notify-log-util.h
- configure
- configure.ac
- panel-plugin/notification-plugin-log.c
- po/ca.gmo
- po/ca.po
- po/pt_BR.gmo
- po/pt_BR.po
- xfce4-notifyd-config/xfce-notify-log-viewer.c
- xfce4-notifyd/xfce-notify-log.c
- xfce4-notifyd/xfce-notify-window.c
Changes:
=====================================
NEWS
=====================================
@@ -1,3 +1,16 @@
+0.9.3 (2023-10-21)
+=====
+- Make the DELETE with LIMIT/OFFSET query work
+- Make the text in the 'Clear log' dialog less crowded
+- Set a transient parent on the 'Clear log' dialog if possible
+- 'Clear log' dialog's initial focus should be on the 'Cancel' button
+- Drop required xdt-autogen version to 4.18.1
+- Simplify markup sanitizing code a little
+- Re-escape text in GMarkupParser text handler
+- Sanitize instead of validating body text markup
+- Translation Updates:
+ Catalan, Portuguese (Brazil)
+
0.9.2 (2023-09-24)
=====
- (Hopefully) actually fix settings migration code
=====================================
autogen.sh
=====================================
@@ -17,6 +17,6 @@ EOF
exit 1
}
-XDT_AUTOGEN_REQUIRED_VERSION="4.19.0" xdt-autogen "$@"
+XDT_AUTOGEN_REQUIRED_VERSION="4.18.1" xdt-autogen "$@"
# vi:set ts=2 sw=2 et ai:
=====================================
common/xfce-notify-common.c
=====================================
@@ -24,16 +24,91 @@
#include "xfce-notify-common.h"
#include "xfce-notify-enum-types.h"
-// We can't use pango_parse_markup(), as that does not support hyperlinks.
-gboolean
-xfce_notify_is_markup_valid(const gchar *markup) {
- gboolean valid = FALSE;
+typedef struct {
+ GString *sanitized;
+ gboolean a_has_href;
+} MarkupState;
+
+static void
+markup_start_elem(GMarkupParseContext *context,
+ const gchar *element_name,
+ const gchar **attribute_names,
+ const gchar **attribute_values,
+ gpointer user_data,
+ GError **error)
+{
+ MarkupState *state = user_data;
+
+ if (strcmp(element_name, "b") == 0 ||
+ strcmp(element_name, "i") == 0 ||
+ strcmp(element_name, "u") == 0)
+ {
+ g_string_append_c(state->sanitized, '<');
+ g_string_append(state->sanitized, element_name);
+ g_string_append_c(state->sanitized, '>');
+ } else if (strcmp(element_name, "a") == 0) {
+ // XXX: this method of tracking that the <a> tag has a href= attr
+ // doesn't work if the client nests another <a> inside this one.
+ state->a_has_href = FALSE;
+ for (gint i = 0; attribute_names[i] != NULL; ++i) {
+ if (strcmp(attribute_names[i], "href") == 0) {
+ g_string_append_printf(state->sanitized, "<a href=\"%s\">", attribute_values[i]);
+ state->a_has_href = TRUE;
+ break;
+ }
+ }
+ } else if (strcmp(element_name, "img") == 0) {
+ // We don't support <img>, but if there's an alt= attr, use it.
+ for (gint i = 0; attribute_names[i] != NULL; ++i) {
+ if (strcmp(attribute_names[i], "alt") == 0) {
+ g_string_append_printf(state->sanitized, " [%s] ", attribute_values[i]);
+ }
+ }
+ }
+}
+
+static void
+markup_end_elem(GMarkupParseContext *context,
+ const gchar *element_name,
+ gpointer user_data,
+ GError **error)
+{
+ MarkupState *state = user_data;
+ if (strcmp(element_name, "b") == 0 ||
+ strcmp(element_name, "i") == 0 ||
+ strcmp(element_name, "u") == 0 ||
+ (strcmp(element_name, "a") == 0 && state->a_has_href))
+ {
+ g_string_append(state->sanitized, "</");
+ g_string_append(state->sanitized, element_name);
+ g_string_append_c(state->sanitized, '>');
+ }
+}
+
+static void
+markup_text(GMarkupParseContext *context,
+ const gchar *text,
+ gsize text_len,
+ gpointer user_data,
+ GError **error)
+{
+ MarkupState *state = user_data;
+ gchar *escaped = g_markup_escape_text(text, text_len);
+ g_string_append(state->sanitized, escaped);
+ g_free(escaped);
+}
+
+// We can't use pango_parse_markup(), as that does not support hyperlinks.
+gchar *
+xfce_notify_sanitize_markup(const gchar *markup) {
if (G_LIKELY(markup != NULL)) {
- const GMarkupParser parser = { NULL, };
+ const GMarkupParser parser = { markup_start_elem, markup_end_elem, markup_text, NULL, };
GMarkupParseContext *ctx;
+ MarkupState state = { NULL, FALSE };
gchar *p;
gboolean needs_root;
+ gboolean valid;
p = (gchar *)markup;
while (*p != '\0' && (*p == ' ' || *p == '\t' || *p == '\n' || *p == '\r')) {
@@ -41,7 +116,8 @@ xfce_notify_is_markup_valid(const gchar *markup) {
}
needs_root = strncmp(p, "<markup>", 8) != 0;
- ctx = g_markup_parse_context_new(&parser, 0, NULL, NULL);
+ state.sanitized = g_string_sized_new(strlen(markup));
+ ctx = g_markup_parse_context_new(&parser, 0, &state, NULL);
valid = (!needs_root || g_markup_parse_context_parse(ctx, "<markup>", -1, NULL))
&& g_markup_parse_context_parse(ctx, markup, -1, NULL)
@@ -49,9 +125,16 @@ xfce_notify_is_markup_valid(const gchar *markup) {
&& g_markup_parse_context_end_parse(ctx, NULL);
g_markup_parse_context_free(ctx);
- }
- return valid;
+ if (valid) {
+ return g_string_free(state.sanitized, FALSE);
+ } else {
+ g_string_free(state.sanitized, TRUE);
+ return g_markup_escape_text(p, -1);
+ }
+ } else {
+ return NULL;
+ }
}
GtkWidget *
=====================================
common/xfce-notify-common.h
=====================================
@@ -132,7 +132,7 @@ typedef enum {
} XfceNotifyCloseReason;
-gboolean xfce_notify_is_markup_valid(const gchar *markup);
+gchar *xfce_notify_sanitize_markup(const gchar *markup);
GtkWidget *xfce_notify_create_placeholder_label(const gchar *markup);
=====================================
common/xfce-notify-log-util.c
=====================================
@@ -376,7 +376,7 @@ notify_closure_free(gpointer data,
}
GtkWidget *
-xfce_notify_clear_log_dialog(XfceNotifyLogGBus *log) {
+xfce_notify_clear_log_dialog(XfceNotifyLogGBus *log, GtkWindow *parent) {
GtkWidget *dialog, *grid, *icon, *label, *content_area, *checkbutton;
GtkDialogFlags flags = GTK_DIALOG_MODAL;
gchar *icon_cache_size;
@@ -386,7 +386,7 @@ xfce_notify_clear_log_dialog(XfceNotifyLogGBus *log) {
ClearLogResponseData *rdata;
dialog = gtk_dialog_new_with_buttons (_("Clear notification log"),
- NULL,
+ parent,
flags,
_("Cancel"),
GTK_RESPONSE_CANCEL,
@@ -395,6 +395,7 @@ xfce_notify_clear_log_dialog(XfceNotifyLogGBus *log) {
NULL);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
grid = gtk_grid_new ();
+ gtk_grid_set_row_spacing(GTK_GRID(grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
gtk_widget_set_margin_start (grid, 12);
gtk_widget_set_margin_end (grid, 12);
@@ -428,6 +429,9 @@ xfce_notify_clear_log_dialog(XfceNotifyLogGBus *log) {
gtk_container_add (GTK_CONTAINER (content_area), grid);
gtk_widget_show_all (dialog);
+ GtkWidget *cancel = gtk_dialog_get_widget_for_response(GTK_DIALOG(dialog), GTK_RESPONSE_CANCEL);
+ gtk_widget_grab_focus(cancel);
+
rdata = g_new0(ClearLogResponseData, 1);
rdata->log = log;
rdata->include_log = checkbutton;
@@ -517,10 +521,8 @@ gchar *
notify_log_format_body(const gchar *body) {
if (body == NULL || body[0] == '\0') {
return NULL;
- } else if (xfce_notify_is_markup_valid(body)) {
- return g_strdup(body);
} else {
- return g_markup_escape_text(body, -1);
+ return xfce_notify_sanitize_markup(body);
}
}
=====================================
common/xfce-notify-log-util.h
=====================================
@@ -41,7 +41,8 @@ gchar *xfce_notify_log_cache_icon(GVariant *v_image_data,
gchar *notify_get_from_desktop_file (const gchar *desktop_file,
const gchar *key);
-GtkWidget *xfce_notify_clear_log_dialog(XfceNotifyLogGBus *log);
+GtkWidget *xfce_notify_clear_log_dialog(XfceNotifyLogGBus *log,
+ GtkWindow *parent);
cairo_surface_t *notify_log_load_icon(const gchar *notify_log_icon_folder,
const gchar *icon_id,
=====================================
configure
=====================================
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for xfce4-notifyd 0.9.2.
+# Generated by GNU Autoconf 2.71 for xfce4-notifyd 0.9.3.
#
# Report bugs to <https://gitlab.xfce.org/apps/xfce4-notifyd>.
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xfce4-notifyd'
PACKAGE_TARNAME='xfce4-notifyd'
-PACKAGE_VERSION='0.9.2'
-PACKAGE_STRING='xfce4-notifyd 0.9.2'
+PACKAGE_VERSION='0.9.3'
+PACKAGE_STRING='xfce4-notifyd 0.9.3'
PACKAGE_BUGREPORT='https://gitlab.xfce.org/apps/xfce4-notifyd'
PACKAGE_URL=''
@@ -1488,7 +1488,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xfce4-notifyd 0.9.2 to adapt to many kinds of systems.
+\`configure' configures xfce4-notifyd 0.9.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1559,7 +1559,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xfce4-notifyd 0.9.2:";;
+ short | recursive ) echo "Configuration of xfce4-notifyd 0.9.3:";;
esac
cat <<\_ACEOF
@@ -1726,7 +1726,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xfce4-notifyd configure 0.9.2
+xfce4-notifyd configure 0.9.3
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2025,7 +2025,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xfce4-notifyd $as_me 0.9.2, which was
+It was created by xfce4-notifyd $as_me 0.9.3, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -3303,7 +3303,7 @@ fi
# Define the identity of the package.
PACKAGE='xfce4-notifyd'
- VERSION='0.9.2'
+ VERSION='0.9.3'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -22683,7 +22683,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xfce4-notifyd $as_me 0.9.2, which was
+This file was extended by xfce4-notifyd $as_me 0.9.3, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22751,7 +22751,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-xfce4-notifyd config.status 0.9.2
+xfce4-notifyd config.status 0.9.3
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
=====================================
configure.ac
=====================================
@@ -16,7 +16,7 @@ m4_define([dbus_minimum_version], [1.0])
m4_define([systemd_minimum_version], [245])
dnl version info
-XDT_VERSION_INIT([0.9.2])
+XDT_VERSION_INIT([0.9.3])
dnl init autoconf
AC_INIT([xfce4-notifyd], [xdt_version],
=====================================
panel-plugin/notification-plugin-log.c
=====================================
@@ -95,7 +95,7 @@ notification_plugin_clear_log_dialog (GtkWidget *widget, gpointer user_data)
if (xfconf_channel_get_bool (notification_plugin->channel, SETTING_HIDE_CLEAR_PROMPT, FALSE)) {
xfce_notify_log_gbus_call_clear(notification_plugin->log, NULL, NULL, NULL);
} else {
- dialog = xfce_notify_clear_log_dialog(notification_plugin->log);
+ dialog = xfce_notify_clear_log_dialog(notification_plugin->log, NULL);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
=====================================
po/ca.gmo
=====================================
Binary files a/po/ca.gmo and b/po/ca.gmo differ
=====================================
po/ca.po
=====================================
@@ -5,16 +5,17 @@
# Translators:
# Carles Muñoz Gorriz <carlesmu at internautas.org>, 2008
# Davidmp <medipas at gmail.com>, 2016,2019
+# Oscar Perez <oscarpc at gmail.com>, 2023
# Robert Antoni Buj i Gelonch <rbuj at fedoraproject.org>, 2016-2020
# Robert Antoni Buj i Gelonch <rbuj at fedoraproject.org>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Xfce Apps\n"
"Report-Msgid-Bugs-To: https://gitlab.xfce.org/\n"
-"POT-Creation-Date: 2023-03-02 00:48+0100\n"
+"POT-Creation-Date: 2023-05-30 00:51+0200\n"
"PO-Revision-Date: 2013-07-03 18:39+0000\n"
-"Last-Translator: Robert Antoni Buj i Gelonch <rbuj at fedoraproject.org>, 2016-2020\n"
-"Language-Team: Catalan (http://www.transifex.com/xfce/xfce-apps/language/ca/)\n"
+"Last-Translator: Oscar Perez <oscarpc at gmail.com>, 2023\n"
+"Language-Team: Catalan (http://app.transifex.com/xfce/xfce-apps/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -34,7 +35,7 @@ msgid "Cancel"
msgstr "Cancel·la"
#: common/xfce-notify-log-util.c:390
-#: xfce4-notifyd-config/xfce-notify-log-viewer.c:191
+#: xfce4-notifyd-config/xfce-notify-log-viewer.c:192
msgid "Clear"
msgstr "Neteja"
@@ -44,10 +45,10 @@ msgstr "inclou la memòria cau d'icones"
#: common/xfce-notify-log-util.c:448
msgid "Now"
-msgstr ""
+msgstr "Ara"
-#: panel-plugin/notification-plugin.c:379
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:113
+#: panel-plugin/notification-plugin.c:380
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:39
#: xfce4-notifyd-config/xfce4-notifyd-config.desktop.in:4
msgid "Notifications"
msgstr "Notificacions"
@@ -65,32 +66,32 @@ msgstr "Aquest és un connector de notificació"
msgid "Copyright © 2017 Simon Steinbeiß\n"
msgstr "Drets d'autor © 2017 Simon Steinbeiß\n"
-#: panel-plugin/notification-plugin-log.c:159
+#: panel-plugin/notification-plugin-log.c:163
msgid "<b>_Do not disturb</b>"
msgstr "<b>_No molestar</b>"
-#: panel-plugin/notification-plugin-log.c:362
-#: xfce4-notifyd-config/xfce-notify-log-viewer.c:165
+#: panel-plugin/notification-plugin-log.c:366
+#: xfce4-notifyd-config/xfce-notify-log-viewer.c:166
msgid "Unable to open notification log"
-msgstr ""
+msgstr "No es pot obrir el registre de notificacions"
-#: panel-plugin/notification-plugin-log.c:364
+#: panel-plugin/notification-plugin-log.c:368
msgid "No unread notifications"
-msgstr ""
+msgstr "Sense notificacions per llegir"
-#: panel-plugin/notification-plugin-log.c:366
+#: panel-plugin/notification-plugin-log.c:370
msgid "No notifications"
msgstr "Sense notificacions"
-#: panel-plugin/notification-plugin-log.c:388
+#: panel-plugin/notification-plugin-log.c:392
msgid "_Clear log"
msgstr "_Neteja el registre"
-#: panel-plugin/notification-plugin-log.c:399
+#: panel-plugin/notification-plugin-log.c:403
msgid "_Mark all read"
-msgstr ""
+msgstr "_Marca-les totes com a llegides"
-#: panel-plugin/notification-plugin-log.c:408
+#: panel-plugin/notification-plugin-log.c:412
msgid "_Notification settings…"
msgstr "Ajusts de les _notificacions..."
@@ -99,18 +100,18 @@ msgid "Notification Plugin Settings"
msgstr "Ajusts del connector de notificacions"
#: panel-plugin/notification-plugin-settings.glade:46
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:133
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:59
msgid "_Help"
msgstr "_Ajuda"
#: panel-plugin/notification-plugin-settings.glade:61
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:149
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:75
msgid "_Close"
msgstr "Tan_ca"
#: panel-plugin/notification-plugin-settings.glade:98
msgid "Notification icon size"
-msgstr ""
+msgstr "Mida de la icona de notificació"
#: panel-plugin/notification-plugin-settings.glade:125
msgid "Number of notifications to show"
@@ -126,24 +127,24 @@ msgstr "Oculta el diàleg de confirmació de «Neteja el registre»"
#: panel-plugin/notification-plugin-settings.glade:201
msgid "Hide panel button when no unread notifications"
-msgstr ""
+msgstr "Oculta el panell de botons quan no hi hagi notificacions per llegir"
#: panel-plugin/notification-plugin-settings.glade:224
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:878
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:806
msgid "Appearance"
msgstr "Aparença"
#: panel-plugin/notification-plugin-settings.glade:241
msgid "Show in menu"
-msgstr ""
+msgstr "Mostra al menú"
#: panel-plugin/notification-plugin-settings.glade:255
msgid "All notifications"
-msgstr ""
+msgstr "Totes les notificacions"
#: panel-plugin/notification-plugin-settings.glade:256
msgid "Unread notifications"
-msgstr ""
+msgstr "Notificacions per llegir"
#: panel-plugin/notification-plugin-settings.glade:268
msgid "Behavior"
@@ -151,15 +152,15 @@ msgstr "Comportament"
#: panel-plugin/notification-plugin-settings.glade:285
msgid "After showing the menu"
-msgstr ""
+msgstr "Després de mostrar el menú"
#: panel-plugin/notification-plugin-settings.glade:299
msgid "Mark all log entries read"
-msgstr ""
+msgstr "Marca totes les entrades de registre com a llegides"
#: panel-plugin/notification-plugin-settings.glade:300
msgid "Mark shown log entries read"
-msgstr ""
+msgstr "Marca les entrades de registres mostrades com a llegides"
#: panel-plugin/notification-plugin-settings.glade:301
msgid "Do nothing"
@@ -173,14 +174,8 @@ msgstr "Connector de notificacions"
msgid "Notification plugin for the Xfce panel"
msgstr "Connector de notificacions per al tauler de Xfce"
-#: panel-plugin/notification-plugin.desktop.in:7
-#: xfce4-notifyd/xfce4-notifyd.desktop.in:6
-#: xfce4-notifyd-config/xfce4-notifyd-config.desktop.in:7
-msgid "org.xfce.notification"
-msgstr ""
-
#: xfce4-notifyd/main.c:58 xfce4-notifyd/main.c:77
-#: xfce4-notifyd-config/main.c:1206
+#: xfce4-notifyd-config/main.c:1207
msgid "Xfce Notify Daemon"
msgstr "Dimoni de notificacions de Xfce"
@@ -193,7 +188,7 @@ msgstr "Opció desconeguda: «%s»\n"
msgid "Unable to start notification daemon"
msgstr "No es pot iniciar el dimoni de notificacions"
-#: xfce4-notifyd/xfce-notify-daemon.c:593
+#: xfce4-notifyd/xfce-notify-daemon.c:550
msgid "Another notification daemon is running, exiting\n"
msgstr "Ja hi ha un altre dimoni de notificacions executant-se, se surt\n"
@@ -207,410 +202,418 @@ msgstr "Ja hi ha un altre dimoni de notificacions executant-se, se surt\n"
#: xfce4-notifyd/xfce-notify-daemon-log.c:331
#: xfce4-notifyd/xfce-notify-daemon-log.c:343
msgid "Log is unavailable"
-msgstr ""
+msgstr "El registre no està disponible"
#: xfce4-notifyd/xfce-notify-daemon-log.c:184
msgid "Log entry not found"
-msgstr ""
+msgstr "No s'ha trobat l'entrada de registre "
#: xfce4-notifyd/xfce-notify-log.c:236
#, c-format
msgid "The notification log directory (%s) is not a directory"
-msgstr ""
+msgstr "El directori de registre de notificacions (%s) no és un directori"
#: xfce4-notifyd/xfce-notify-log.c:248
#, c-format
msgid "Failed to open notification log: %s"
-msgstr ""
+msgstr "No s'ha pogut obrir el registre de notificacions: %s"
#: xfce4-notifyd/xfce-notify-log.c:335
#, c-format
msgid "Failed to prepare SQL statement: %%s (%s)"
-msgstr ""
+msgstr "Error en preparar la sentència SQL: %%s (%s)"
#: xfce4-notifyd/xfce-notify-log.c:364
msgid "trailing characters at end of statement"
-msgstr ""
+msgstr "caràcters posteriors al final de la sentència"
#: xfce4-notifyd/xfce-notify-log.c:468
#, c-format
msgid "Failed to create 'notifications' table: %s"
-msgstr ""
+msgstr "Error en crear la taula «notificacions»: %s"
#: xfce4-notifyd/xfce-notify-log.c:469
#, c-format
msgid "Failed to create DB timestamp index: %s"
-msgstr ""
+msgstr "Error en crear l'índex de marques de temps de la base de dades: %s"
#: xfce4-notifyd/xfce-notify-log.c:470
#, c-format
msgid "Failed to create DB is_read index: %s"
-msgstr ""
+msgstr "Error en crear l'índex is_read a la base de dades: %s"
-#: xfce4-notifyd/xfce-notify-window.c:1393
+#: xfce4-notifyd/xfce-notify-window.c:1400
msgid "Default Action"
-msgstr ""
+msgstr "Acció predeterminada"
#: xfce4-notifyd/xfce4-notifyd.desktop.in:4
msgid "Xfce Notification Daemon"
-msgstr ""
+msgstr "Dimoni de notificacions de l'Xfce"
-#: xfce4-notifyd-config/main.c:105
+#: xfce4-notifyd-config/main.c:106
msgid "Notification Preview"
msgstr "Vista prèvia de la notificació"
-#: xfce4-notifyd-config/main.c:106
+#: xfce4-notifyd-config/main.c:107
msgid "This is what notifications will look like"
msgstr "Així és com es veuran les notificacions"
-#: xfce4-notifyd-config/main.c:111
+#: xfce4-notifyd-config/main.c:112
msgid "Button"
msgstr "Botó"
-#: xfce4-notifyd-config/main.c:118
+#: xfce4-notifyd-config/main.c:119
msgid "Notification preview failed"
msgstr "Ha fallat la vista prèvia de la notificació"
-#: xfce4-notifyd-config/main.c:565
+#: xfce4-notifyd-config/main.c:566
#, c-format
msgid ""
"Are you sure you want to delete notification settings for application "
"\"%s\"?"
-msgstr ""
+msgstr "Esteu segurs que voleu eliminar els paràmetres de notificacions per a l'aplicació «%s»?"
-#: xfce4-notifyd-config/main.c:569
+#: xfce4-notifyd-config/main.c:570
msgid "Delete"
msgstr "Suprimeix"
-#: xfce4-notifyd-config/main.c:571
+#: xfce4-notifyd-config/main.c:572
#: xfce4-notifyd-config/xfce4-notifyd-config-known-app.glade:133
msgid "Forget Application"
-msgstr ""
+msgstr "Oblida l'aplicació"
-#: xfce4-notifyd-config/main.c:669
+#: xfce4-notifyd-config/main.c:670
msgid "Unspecified applications"
-msgstr ""
+msgstr "Aplicacions no especificades"
-#: xfce4-notifyd-config/main.c:900
+#: xfce4-notifyd-config/main.c:901
#, c-format
msgid ""
"<b>Currently only urgent notifications are shown.</b>\n"
"Notification logging is %s."
msgstr "<b>Actualment només es mostren notificacions urgents.</b>\nEl registre de notificacions està %s."
-#: xfce4-notifyd-config/main.c:907
+#: xfce4-notifyd-config/main.c:908
msgid "enabled"
msgstr "habilitat"
-#: xfce4-notifyd-config/main.c:907
+#: xfce4-notifyd-config/main.c:908
msgid "disabled"
msgstr "inhabilitat"
-#: xfce4-notifyd-config/main.c:1108
+#: xfce4-notifyd-config/main.c:1112
msgid ""
"<big><b>Currently there are no known applications.</b></big>\n"
"As soon as an application sends a notification\n"
"it will appear in this list."
msgstr "<big><b>Actualment no hi ha aplicacions conegudes.</b></big>\nTan aviat com una aplicació enviï una notificació\napareixerà en aquesta llista."
-#: xfce4-notifyd-config/main.c:1173
+#: xfce4-notifyd-config/main.c:1174
msgid "Display version information"
msgstr "Mostra la informació de la versió"
-#: xfce4-notifyd-config/main.c:1174
+#: xfce4-notifyd-config/main.c:1175
msgid "Settings manager socket"
msgstr "Sòcol del gestor d'ajusts"
-#: xfce4-notifyd-config/main.c:1174
+#: xfce4-notifyd-config/main.c:1175
msgid "SOCKET_ID"
msgstr "SOCKET_ID"
-#: xfce4-notifyd-config/main.c:1184
+#: xfce4-notifyd-config/main.c:1185
#, c-format
msgid "Type '%s --help' for usage."
msgstr "Teclegeu «%s --help» per a l'ús."
-#: xfce4-notifyd-config/main.c:1199
+#: xfce4-notifyd-config/main.c:1200
msgid "Released under the terms of the GNU General Public License, version 2\n"
msgstr "Publicat sota els termes de la «GNU General Public License», versió 2\n"
-#: xfce4-notifyd-config/main.c:1200
+#: xfce4-notifyd-config/main.c:1201
#, c-format
msgid "Please report bugs to %s.\n"
msgstr "Informeu els errors a %s.\n"
-#: xfce4-notifyd-config/main.c:1208
+#: xfce4-notifyd-config/main.c:1209
msgid "Settings daemon is unavailable"
msgstr "El dimoni d'ajusts no està disponible"
-#: xfce4-notifyd-config/xfce-notify-log-viewer.c:167
+#: xfce4-notifyd-config/xfce-notify-log-viewer.c:168
msgid ""
"<big><b>Empty log</b></big>\n"
"No notifications have been logged yet."
msgstr "<big><b>Registre buit</b></big>\nEncara no s'ha registrat cap notificació."
-#: xfce4-notifyd-config/xfce-notify-log-viewer.c:183
+#: xfce4-notifyd-config/xfce-notify-log-viewer.c:184
msgid "Refresh"
msgstr "Refresca"
-#: xfce4-notifyd-config/xfce-notify-log-viewer.c:184
+#: xfce4-notifyd-config/xfce-notify-log-viewer.c:185
msgid "Refresh the notification log"
msgstr "Refresca el registre de notificacions"
-#: xfce4-notifyd-config/xfce-notify-log-viewer.c:192
+#: xfce4-notifyd-config/xfce-notify-log-viewer.c:193
msgid "Clear the notification log"
msgstr "Neteja el registre de notificacions"
-#: xfce4-notifyd-config/xfce-notify-log-viewer.c:201
+#: xfce4-notifyd-config/xfce-notify-log-viewer.c:202
msgid "Mark All Read"
-msgstr ""
+msgstr "Marca-les totes com a llegides"
-#: xfce4-notifyd-config/xfce-notify-log-viewer.c:202
+#: xfce4-notifyd-config/xfce-notify-log-viewer.c:203
msgid "Mark all unread notifications as read"
-msgstr ""
+msgstr "Marca totes les notificacions no llegides com llegides"
-#: xfce4-notifyd-config/xfce-notify-log-viewer.c:515
+#: xfce4-notifyd-config/xfce-notify-log-viewer.c:516
msgid "Mark log entry _read"
-msgstr ""
+msgstr "Marca l'entrada de _registre com llegida"
-#: xfce4-notifyd-config/xfce-notify-log-viewer.c:711
+#: xfce4-notifyd-config/xfce-notify-log-viewer.c:715
msgid "Yesterday and before"
msgstr "Ahir i abans"
-#: xfce4-notifyd-config/xfce-notify-log-viewer.c:995
+#: xfce4-notifyd-config/xfce-notify-log-viewer.c:999
msgid "Loading more log entries..."
-msgstr ""
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:47
-msgid "only during \"Do not disturb\", or when notification bodies are not shown"
-msgstr ""
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:50
-msgid "always"
-msgstr "sempre"
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:61
-msgid "all"
-msgstr "totes"
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:64
-msgid "all except blocked"
-msgstr "totes excepte les bloquejades"
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:67
-msgid "only blocked"
-msgstr "només les bloquejades"
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:78
-msgid "Locale default"
-msgstr ""
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:81
-msgid "Relative times"
-msgstr ""
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:84
-msgid "ISO8601"
-msgstr ""
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:87
-msgid "Custom"
-msgstr "Personalitza"
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:98
-msgid "Top left"
-msgstr "Part superior esquerra"
+msgstr "Carregant més entrades de registre..."
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:101
-msgid "Bottom left"
-msgstr "Part inferior esquerra"
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:104
-msgid "Top right"
-msgstr "Part superior dreta"
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:107
-msgid "Bottom right"
-msgstr "Part inferior dreta"
-
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:211
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:137
msgid ""
"The notification service is not running. No notifications will be shown."
msgstr "No s'està executant el servei de les notificacions. No es mostraran les notificacions."
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:290
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:216
msgid "<b>Currently only urgent notifications are shown.</b>"
msgstr "<b>Actualment només es mostren les notificacions urgents.</b>"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:376
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:302
msgid "Fade out"
msgstr "Esvaïment"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:389
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:315
msgid "_Slide out"
msgstr "Lli_sca cap a fora"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:415
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:341
msgid "Do not disturb"
msgstr "No molestar"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:439
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:365
msgid "<b>Behavior</b>"
msgstr "<b>Comportament</b>"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:453
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:379
msgid "<b>Animations</b>"
msgstr "<b>Animacions</b>"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:466
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:392
msgid ""
"By default the notification bubbles will be shown on the display on which "
"the mouse pointer is located."
msgstr "Per defecte, les bombolles de notificació es mostraran a la pantalla que es troba el punter del ratolí."
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:468
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:394
msgid "Show notifications on"
msgstr "Mostra les notificacions a la"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:481
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:407
msgid ""
"The \"Enable event sounds\" setting in the Appearance Settings dialog must "
"be checked to hear notification sounds"
-msgstr ""
+msgstr "El paràmetre «Habilita els sons d'esdeveniments» del diàleg de Preferències d'aparença ha d'estar marcat per a sentir els sons de les notificacions"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:483
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:409
msgid "_Mute sounds"
-msgstr ""
+msgstr "_Apaga els sons"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:510
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:436
msgid "Always show percent-value notifications"
-msgstr ""
+msgstr "Mostra sempre les notificacions de valors percentuals"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:535
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:461
msgid "When displaying notifications, show"
-msgstr ""
+msgstr "En mostrar les notificacions, ensenya"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:549
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:475
msgid "icon, summary, and body"
-msgstr ""
+msgstr "icona, resum i cos"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:550
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:476
msgid "icon and summary"
-msgstr ""
+msgstr "icona i resum"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:551
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:477
msgid "icon and application name"
-msgstr ""
+msgstr "icona i nom de l'aplicació"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:565
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:491
msgid "monitor with mouse pointer"
-msgstr ""
+msgstr "monitor amb el punter del ratolí"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:566
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:492
msgid "primary monitor"
-msgstr ""
+msgstr "monitor primari"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:567
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:493
msgid "all monitors"
-msgstr ""
+msgstr "tots els monitors"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:584
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:510
msgid "General"
msgstr "General"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:622
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:548
msgid "seconds"
msgstr "segons"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:637
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:563
msgid "10"
-msgstr ""
+msgstr "10"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:662
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:588
msgid "_Opacity"
msgstr "_Opacitat"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:676
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:602
msgid "Default _position"
msgstr "_Posició predeterminada"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:724
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:617
+msgid "Top left"
+msgstr "Part superior esquerra"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:618
+msgid "Bottom left"
+msgstr "Part inferior esquerra"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:619
+msgid "Top right"
+msgstr "Part superior dreta"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:620
+msgid "Bottom right"
+msgstr "Part inferior dreta"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:621
+msgid "Top center"
+msgstr "Part superior centre"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:622
+msgid "Bottom center"
+msgstr "Part inferior centre"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:652
msgid "_Theme"
msgstr "_Tema"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:737
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:665
msgid ""
"Show the notification summary and body when the notification is a percent "
"value, such as audio volume or screen brightness"
-msgstr ""
+msgstr "Mostra el resum i el cos de la notificació quan sigui un valor en percentual, com el volum del so o la lluentor de la pantalla."
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:739
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:667
msgid "Show text with percent _values"
-msgstr ""
+msgstr "Mostra el text amb els _valors percentuals"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:753
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:681
msgid "Date/time _format"
-msgstr ""
+msgstr "_Format de data i hora"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:702
+msgid "Locale default"
+msgstr "Configuració local predeterminada"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:703
+msgid "Relative times"
+msgstr "Hores relatives"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:704
+msgid "ISO8601"
+msgstr "ISO8601"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:805
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:705
+msgid "Custom"
+msgstr "Personalitza"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:733
msgid "Show _Preview"
msgstr "Mostra la vista _prèvia"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:831
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:759
msgid "_Disappear after"
msgstr "_Desapareix després de"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:849
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:777
msgid ""
"When creating a notification, applications can request how long they'd like "
"the notification remain on screen. This setting controls whether or not that"
" request is honored."
-msgstr ""
+msgstr "Les aplicacions poden demanar durant quan de temps s'ha de mantenir la notificació a la pantalla en crear-la. Aquest paràmetre controla si es tindrà en compte o no la petició."
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:851
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:779
msgid "Honor app-requested \"Disappear after\" time"
-msgstr ""
+msgstr "Tingues en compte la petició de «Desapareix després de» per part de l'aplicació"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:896
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:824
msgid "<b>Per-application notification settings</b>"
-msgstr ""
+msgstr "<b>Paràmetres de notificacions per aplicació</b>"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:923
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:851
msgid "Applications"
msgstr "Aplicacions"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:942
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:870
msgid "Log notifications"
msgstr "Enregistrament de les notificacions"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:985
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:896
+msgid "only during \"Do not disturb\", or when notification bodies are not shown"
+msgstr "només durant «No molestar», o quan no es mostri el cos de les notificacions"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:897
+msgid "always"
+msgstr "sempre"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:909
msgid "Log applications"
msgstr "Enregistrament de les aplicacions"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:1033
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:1049
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:940
+msgid "all"
+msgstr "totes"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:941
+msgid "all except blocked"
+msgstr "totes excepte les bloquejades"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:942
+msgid "only blocked"
+msgstr "només les bloquejades"
+
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:954
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:970
msgid "The maximum number of entries to be retained in the log."
-msgstr ""
+msgstr "Nombre màxim d'entrades a mantenir al registre."
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:1045
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:966
msgid "Log size limit"
msgstr "Mida màxima del registre"
-#: xfce4-notifyd-config/xfce4-notifyd-config.glade:1066
+#: xfce4-notifyd-config/xfce4-notifyd-config.glade:987
msgid "Log"
msgstr "Registre"
#: xfce4-notifyd-config/xfce4-notifyd-config-known-app.glade:27
msgid "Mute application"
-msgstr ""
+msgstr "Silencia l'aplicació"
#: xfce4-notifyd-config/xfce4-notifyd-config-known-app.glade:62
msgid "Allow urgent notifications"
-msgstr ""
+msgstr "Permet notificacions urgents"
#: xfce4-notifyd-config/xfce4-notifyd-config-known-app.glade:98
msgid "Include in log"
-msgstr ""
+msgstr "Inclou al registre"
#: xfce4-notifyd-config/xfce4-notifyd-config.desktop.in:5
msgid "Customize how notifications appear on your screen"
=====================================
po/pt_BR.gmo
=====================================
Binary files a/po/pt_BR.gmo and b/po/pt_BR.gmo differ
=====================================
po/pt_BR.po
=====================================
@@ -20,7 +20,7 @@ msgstr ""
"Report-Msgid-Bugs-To: https://gitlab.xfce.org/\n"
"POT-Creation-Date: 2023-05-30 00:51+0200\n"
"PO-Revision-Date: 2013-07-03 18:39+0000\n"
-"Last-Translator: The Cat, 2023\n"
+"Last-Translator: Michael Martins <michaelfm21 at gmail.com>, 2017,2019,2023\n"
"Language-Team: Portuguese (Brazil) (http://app.transifex.com/xfce/xfce-apps/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -419,7 +419,7 @@ msgstr "Por padrão as bolhas de notificação serão exibidas na tela onde enco
#: xfce4-notifyd-config/xfce4-notifyd-config.glade:394
msgid "Show notifications on"
-msgstr "Mostrar notificações na"
+msgstr "Mostrar notificações em"
#: xfce4-notifyd-config/xfce4-notifyd-config.glade:407
msgid ""
=====================================
xfce4-notifyd-config/xfce-notify-log-viewer.c
=====================================
@@ -828,7 +828,9 @@ xfce_notify_log_viewer_refresh(XfceNotifyLogViewer *viewer) {
static void
xfce_notify_log_viewer_clear(XfceNotifyLogViewer *viewer) {
- GtkWidget *dialog = xfce_notify_clear_log_dialog(viewer->log);
+ GtkWidget *toplevel = gtk_widget_get_toplevel(GTK_WIDGET(viewer));
+ GtkWidget *dialog = xfce_notify_clear_log_dialog(viewer->log,
+ GTK_IS_WINDOW(toplevel) ? GTK_WINDOW(toplevel) : NULL);
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
}
=====================================
xfce4-notifyd/xfce-notify-log.c
=====================================
@@ -102,9 +102,10 @@ typedef struct _XfceNotifyLog {
sqlite3_stmt *stmt_mark_all_read;
sqlite3_stmt *stmt_delete;
sqlite3_stmt *stmt_delete_before;
- sqlite3_stmt *stmt_truncate;
sqlite3_stmt *stmt_delete_all;
+ gboolean sqlite_delete_supports_limit_offset;
+
GFileMonitor *monitor;
guint write_queue_id;
@@ -216,6 +217,7 @@ xfce_notify_log_initable_init(GInitableIface *iface) {
static void
xfce_notify_log_init(XfceNotifyLog *log) {
+ log->sqlite_delete_supports_limit_offset = TRUE;
log->write_queue = g_queue_new();
}
@@ -308,7 +310,6 @@ xfce_notify_log_finalize(GObject *object) {
xn_sqlite3_finalize(log->stmt_mark_all_read);
xn_sqlite3_finalize(log->stmt_delete);
xn_sqlite3_finalize(log->stmt_delete_before);
- xn_sqlite3_finalize(log->stmt_truncate);
xn_sqlite3_finalize(log->stmt_delete_all);
if (log->db != NULL) {
@@ -430,12 +431,6 @@ prepare_statements(XfceNotifyLog *log, GError **error) {
PREPARE_CHECKED(log->stmt_delete_all, "DELETE FROM " TABLE);
- log->stmt_truncate = prepare_statement(log->db, "DELETE FROM " TABLE " ORDER BY " COL_TIMESTAMP " DESC LIMIT -1 OFFSET ?", error);
- if (log->stmt_truncate == NULL) {
- g_message("Your sqlite library does not support OFFSET/LIMIT with DELETE; falling back to less-efficient deletion method");
- g_clear_error(error);
- }
-
return TRUE;
#undef COLUMN_NAMES
#undef PREPARE_CHECKED
@@ -978,36 +973,42 @@ xfce_notify_log_real_truncate(XfceNotifyLog *log, guint n_entries_to_keep) {
if (n_entries_to_keep == 0) {
rc = xfce_notify_log_real_clear(log);
- } else if (log->stmt_truncate != NULL) {
- rc = sqlite3_bind_int(log->stmt_truncate, 0, n_entries_to_keep);
- if (rc == SQLITE_OK) {
- rc = sqlite3_step(log->stmt_truncate);
+ } else {
+ if (log->sqlite_delete_supports_limit_offset) {
+ gchar *sql = g_strdup_printf("DELETE FROM " TABLE " ORDER BY " COL_TIMESTAMP " DESC LIMIT -1 OFFSET %u", n_entries_to_keep);
+ struct sqlite3_stmt *stmt = prepare_statement(log->db, sql, NULL);
+ if (stmt != NULL) {
+ rc = sqlite3_step(stmt);
+ sqlite3_finalize(stmt);
+ } else {
+ g_message("Your sqlite library does not support OFFSET/LIMIT with DELETE; falling back to less-efficient deletion method");
+ log->sqlite_delete_supports_limit_offset = FALSE;
+ }
}
- sqlite3_reset(log->stmt_truncate);
- sqlite3_clear_bindings(log->stmt_truncate);
- } else {
- GList *entries = xfce_notify_log_read(log, NULL, n_entries_to_keep + 1);
- guint n_entries;
- GList *last = xfce_notify_g_list_last_length(entries, &n_entries);
-
- if (n_entries > n_entries_to_keep) {
- // n_entries guaranteed to be >= 2 here, thus entries != NULL and last != NULL and last->prev != NULL
- XfceNotifyLogEntry *last_entry_to_keep = last->prev->data;
- rc = sqlite3_bind_int64(log->stmt_delete_before,
- BIND_INDEX(log->stmt_delete_before, COL_TIMESTAMP),
- g_date_time_to_unix(last_entry_to_keep->timestamp) * 1000000 + g_date_time_get_microsecond(last_entry_to_keep->timestamp));
- if (rc == SQLITE_OK) {
- rc = sqlite3_step(log->stmt_delete_before);
+ if (!log->sqlite_delete_supports_limit_offset) {
+ GList *entries = xfce_notify_log_read(log, NULL, n_entries_to_keep + 1);
+ guint n_entries;
+ GList *last = xfce_notify_g_list_last_length(entries, &n_entries);
+
+ if (n_entries > n_entries_to_keep) {
+ // n_entries guaranteed to be >= 2 here, thus entries != NULL and last != NULL and last->prev != NULL
+ XfceNotifyLogEntry *last_entry_to_keep = last->prev->data;
+ rc = sqlite3_bind_int64(log->stmt_delete_before,
+ BIND_INDEX(log->stmt_delete_before, COL_TIMESTAMP),
+ g_date_time_to_unix(last_entry_to_keep->timestamp) * 1000000 + g_date_time_get_microsecond(last_entry_to_keep->timestamp));
+ if (rc == SQLITE_OK) {
+ rc = sqlite3_step(log->stmt_delete_before);
+ }
+
+ sqlite3_reset(log->stmt_delete_before);
+ sqlite3_clear_bindings(log->stmt_delete_before);
+ } else {
+ rc = SQLITE_OK;
}
- sqlite3_reset(log->stmt_delete_before);
- sqlite3_clear_bindings(log->stmt_delete_before);
- } else {
- rc = SQLITE_OK;
+ g_list_free_full(entries, (GDestroyNotify)xfce_notify_log_entry_unref);
}
-
- g_list_free_full(entries, (GDestroyNotify)xfce_notify_log_entry_unref);
}
return rc;
=====================================
xfce4-notifyd/xfce-notify-window.c
=====================================
@@ -1176,11 +1176,9 @@ xfce_notify_window_set_body(XfceNotifyWindow *window,
g_return_if_fail(XFCE_IS_NOTIFY_WINDOW(window));
if(body && *body) {
- if (xfce_notify_is_markup_valid(body)) {
- gtk_label_set_markup (GTK_LABEL (window->body), body);
- } else {
- gtk_label_set_text(GTK_LABEL(window->body), body);
- }
+ gchar *sanitized_body = xfce_notify_sanitize_markup(body);
+ gtk_label_set_markup (GTK_LABEL (window->body), sanitized_body);
+ g_free(sanitized_body);
gtk_widget_show(window->body);
window->has_body_text = TRUE;
} else {
View it on GitLab: https://salsa.debian.org/xfce-team/goodies/xfce4-notifyd/-/commit/52bd6f0feb0df4a267b0e1522d65b7906f60f247
--
View it on GitLab: https://salsa.debian.org/xfce-team/goodies/xfce4-notifyd/-/commit/52bd6f0feb0df4a267b0e1522d65b7906f60f247
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-xfce-commits/attachments/20231110/35854838/attachment-0001.htm>
More information about the Pkg-xfce-commits
mailing list