Tweak a few things with Pidgin.NotificationAddContact

Mon, 23 Sep 2024 20:47:18 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Mon, 23 Sep 2024 20:47:18 -0500
changeset 42963
049b6a96fd2a
parent 42962
a2c1926ce7b2
child 42964
f0edc907e018

Tweak a few things with Pidgin.NotificationAddContact

Testing Done:
Created an add contact notification with the demo protocol and called in the turtles for good measure.

Reviewed at https://reviews.imfreedom.org/r/3520/

pidgin/pidginnotificationaddcontact.c file | annotate | diff | comparison | revisions
pidgin/pidginnotificationaddcontact.h file | annotate | diff | comparison | revisions
pidgin/pidginnotificationlist.c file | annotate | diff | comparison | revisions
--- a/pidgin/pidginnotificationaddcontact.c	Mon Sep 23 20:39:32 2024 -0500
+++ b/pidgin/pidginnotificationaddcontact.c	Mon Sep 23 20:47:18 2024 -0500
@@ -128,7 +128,8 @@
  * API
  *****************************************************************************/
 GtkWidget *
-pidgin_notification_add_contact_new(PurpleNotification *notification) {
+pidgin_notification_add_contact_new(PurpleNotificationAddContact *notification)
+{
 	g_return_val_if_fail(PURPLE_IS_NOTIFICATION_ADD_CONTACT(notification),
 	                     NULL);
 
--- a/pidgin/pidginnotificationaddcontact.h	Mon Sep 23 20:39:32 2024 -0500
+++ b/pidgin/pidginnotificationaddcontact.h	Mon Sep 23 20:47:18 2024 -0500
@@ -58,7 +58,7 @@
 
 /**
  * pidgin_notification_add_contact_new:
- * @notification: A [class@Purple.Notification] to display.
+ * @notification: The [class@Purple.NotificationAddContact] instance.
  *
  * Creates a new #PidginNotificationAddContact instance that will display
  * @notification.
@@ -69,7 +69,7 @@
  * Since: 3.0
  */
 PIDGIN_AVAILABLE_IN_3_0
-GtkWidget *pidgin_notification_add_contact_new(PurpleNotification *notification);
+GtkWidget *pidgin_notification_add_contact_new(PurpleNotificationAddContact *notification);
 
 G_END_DECLS
 
--- a/pidgin/pidginnotificationlist.c	Mon Sep 23 20:39:32 2024 -0500
+++ b/pidgin/pidginnotificationlist.c	Mon Sep 23 20:47:18 2024 -0500
@@ -106,7 +106,10 @@
 	notification = gtk_list_item_get_item(item);
 
 	if(PURPLE_IS_NOTIFICATION_ADD_CONTACT(notification)) {
-		widget = pidgin_notification_add_contact_new(notification);
+		PurpleNotificationAddContact *notification_add_contact = NULL;
+
+		notification_add_contact = PURPLE_NOTIFICATION_ADD_CONTACT(notification);
+		widget = pidgin_notification_add_contact_new(notification_add_contact);
 	} else if(PURPLE_IS_NOTIFICATION_AUTHORIZATION_REQUEST(notification)) {
 		PurpleNotificationAuthorizationRequest *request = NULL;
 

mercurial