--- a/libpurple/plugins.c Thu Mar 30 22:31:40 2023 -0500
+++ b/libpurple/plugins.c Thu Mar 30 22:55:10 2023 -0500
@@ -30,6 +30,8 @@
+#include "purplenotification.h" +#include "purplenotificationmanager.h" @@ -424,8 +426,9 @@
for (l = files; l; l = l->next)
@@ -434,10 +437,38 @@
plugin = purple_plugins_find_by_filename(file);
- purple_debug_info("plugins", "Loading saved plugin %s\n", file);
- purple_plugin_load(plugin, NULL);
+ purple_debug_info("plugins", "Loading saved plugin %s", file); + purple_plugin_load(plugin, &error); - purple_debug_error("plugins", "Unable to find saved plugin %s\n", file);
+ error = g_error_new(PURPLE_PLUGINS_DOMAIN, 0, + _("Unable to find saved plugin %s"), file); + purple_debug_error("plugins", "Unable to find saved plugin %s", file); + PurpleNotification *notification = NULL; + PurpleNotificationManager *manager = NULL; + if(error->message != NULL) { + msg = g_strdup(error->message); + msg = g_strdup(_("Unknown error")); + notification = purple_notification_new(PURPLE_NOTIFICATION_TYPE_GENERIC, + purple_notification_set_icon_name(notification, + "dialog-error-symbolic"); + title = g_strdup_printf(_("Failed to load saved plugin %s"), file); + purple_notification_set_title(notification, title); + manager = purple_notification_manager_get_default(); + purple_notification_manager_add(manager, notification); --- a/pidgin/pidginnotificationlist.c Thu Mar 30 22:31:40 2023 -0500
+++ b/pidgin/pidginnotificationlist.c Thu Mar 30 22:55:10 2023 -0500
@@ -41,6 +41,17 @@
/******************************************************************************
*****************************************************************************/
+pidgin_notification_gpointer_to_char(G_GNUC_UNUSED GBinding *binding, + const GValue *from_value, + G_GNUC_UNUSED gpointer user_data) + g_value_set_string(to_value, (char *)g_value_get_pointer(from_value)); pidgin_notification_list_unknown_notification(PurpleNotification *notification) {
GtkWidget *widget = NULL;
@@ -65,6 +76,25 @@
+pidgin_notification_generic_new(PurpleNotification *notification) { + row = adw_action_row_new(); + g_object_bind_property(notification, "title", row, "title", + G_BINDING_SYNC_CREATE); + g_object_bind_property(notification, "icon-name", row, "icon-name", + G_BINDING_SYNC_CREATE); + g_object_bind_property_full(notification, "data", row, "subtitle", + pidgin_notification_gpointer_to_char, pidgin_notification_list_create_widget_func(gpointer item,
G_GNUC_UNUSED gpointer data)
@@ -72,6 +102,9 @@
GtkWidget *widget = NULL;
switch(purple_notification_get_notification_type(notification)) {
+ case PURPLE_NOTIFICATION_TYPE_GENERIC: + widget = pidgin_notification_generic_new(notification); case PURPLE_NOTIFICATION_TYPE_CONNECTION_ERROR:
widget = pidgin_notification_connection_error_new(notification);