After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 648947 - [patch] Add notify_notification_set_app_name()
[patch] Add notify_notification_set_app_name()
Status: RESOLVED FIXED
Product: libnotify
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: William Jon McCann
Depends on:
Blocks:
 
 
Reported: 2011-04-29 14:52 UTC by Richard Hughes
Modified: 2011-05-03 03:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for review (10.00 KB, patch)
2011-04-29 14:52 UTC, Richard Hughes
reviewed Details | Review

Description Richard Hughes 2011-04-29 14:52:06 UTC
Created attachment 186890 [details] [review]
patch for review

See https://bugzilla.redhat.com/show_bug.cgi?id=696121#c3

Patch attached for review. Thanks.
Comment 1 Matthias Clasen 2011-04-29 15:52:45 UTC
Review of attachment 186890 [details] [review]:

::: libnotify/notification.c
@@ +598,3 @@
+                notify_notification_set_app_name (notification,
+                                                  notify_get_app_name ());
+        }

If you set the app name here, it has the effect of freezing the app name for the notification. I guess thats ok. Doing something like

set_app_name ("a")
notification_show (n)
set_app_name ("b")
notification_show (n)

and expecting the already-shown notification to pick up then new app name

is just crazy.

@@ +835,3 @@
+        g_free (notification->priv->app_name);
+        notification->priv->app_name = g_strdup (app_name);
+}

I'll notice that so far, none of the properties had a separate setter. app name is the first thing that gets both a property and a dedicated setter.

And the setter promptly forgets the change notification...
Comment 2 Matthias Clasen 2011-04-29 16:00:00 UTC
Also, I should let you know that I put a patch for g-s-d into bug 648911

That should probably be updated to use this api when it lands in a libnotify release.
Comment 3 Matthias Clasen 2011-05-03 03:38:19 UTC
I've committed this with the added notification, and without freezing the appname on the first 'show'.