Create and add notifications for account errors.

Review Request #1509 — Created June 27, 2022 and submitted

Information

pidgin/pidgin
default

Reviewers

Adjust the NotificationManager API a bit to be easier to use and map better to
GListStore which the manager is now using internally.

Ran the unit tests and forced a connection error and verified no issues (used gdb to verify that item was added).

Summary ID
Create and add notifications for account errors.
Adjust the NotificationManager API a bit to be easier to use and map better to GListStore which the manager is now using internally.
8b0ac966fb82fbedee41b00033a49c1578f627c0
Description From Last Updated

This causes a warning during compilation: ../libpurple/purplenotification.c: In function 'purple_notification_compare': ../libpurple/purplenotification.c:562:46: warning: passing argument 1 of 'PURPLE_NOTIFICATION' discards 'const' qualifier …

ivanhoeivanhoe
ivanhoe
  1. 
      
  2. libpurple/purplenotification.c (Diff revision 1)
     
     
    Show all issues

    This causes a warning during compilation:

    ../libpurple/purplenotification.c: In function 'purple_notification_compare':
    ../libpurple/purplenotification.c:562:46: warning: passing argument 1 of 'PURPLE_NOTIFICATION' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      562 |         notification_a = PURPLE_NOTIFICATION(a);
          |                                              ^
    In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
                     from /usr/include/glib-2.0/gobject/gbinding.h:29,
                     from /usr/include/glib-2.0/glib-object.h:22,
                     from ../libpurple/purplenotification.h:27,
                     from ../libpurple/purplenotification.c:19:
    /usr/include/glib-2.0/gobject/gtype.h:1460:77: note: expected 'gpointer' {aka 'void *'} but argument is of type 'gconstpointer' {aka 'const void *'}
     1460 |   G_GNUC_UNUSED static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) {                       \
          |                                                                    ~~~~~~~~~^~~
    ../libpurple/purplenotification.h:58:1: note: in expansion of macro 'G_DECLARE_FINAL_TYPE'
       58 | G_DECLARE_FINAL_TYPE(PurpleNotification, purple_notification, PURPLE,
          | ^~~~~~~~~~~~~~~~~~~~
    

    Same on line 563 also.

    1. hmm not sure how I missed that but good catch!

  3. 
      
grim
ivanhoe
  1. Ship It!
  2. 
      
grim
Review request changed
Status:
Completed