~showard314/gnome-power/karmic1-notify-osd-support

« back to all changes in this revision

Viewing changes to debian/patches/26-notifications.patch

  • Committer: Martin Pitt
  • Date: 2009-07-22 16:52:58 UTC
  • Revision ID: martin.pitt@canonical.com-20090722165258-8yeo17a67y2hup6f
Drop 26-notifications.patch. It was disabled before (due to not applying
any more), and upstream recently fixed it in a better way in trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Description: Show alert boxes for important situations (“Battery may
2
 
#   be recalled”, “Battery may be broken”, etc., and do not use
3
 
#   actions in notifications if the notification-daemon does not
4
 
#   support them
5
 
# Ubuntu: https://bugs.launchpad.net/bugs/329296
6
 
=== modified file 'src/gpm-notify.c'
7
 
--- a/src/gpm-notify.c  2008-11-06 07:20:46 +0000
8
 
+++ b/src/gpm-notify.c  2009-02-14 06:29:39 +0000
9
 
@@ -53,6 +53,14 @@
10
 
 #define GPM_NOTIFY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_NOTIFY, GpmNotifyPrivate))
11
 
 #define QUIRK_WEBSITE  "http://people.freedesktop.org/~hughsient/quirk/"
12
 
 
13
 
+typedef struct
14
 
+{
15
 
+       NotifyActionCallback cb;
16
 
+       GFreeFunc free_func;
17
 
+       gpointer user_data;
18
 
+       gchar *label;
19
 
+} NotifyAlert;
20
 
+
21
 
 struct GpmNotifyPrivate
22
 
 {
23
 
        GpmAcAdapter            *ac_adapter;
24
 
@@ -63,6 +71,8 @@
25
 
 #ifdef HAVE_LIBNOTIFY
26
 
        NotifyNotification      *libnotify;
27
 
 #endif
28
 
+       GtkWidget               *dialog;
29
 
+       GHashTable              *alerts;
30
 
 };
31
 
 
32
 
 enum {
33
 
@@ -75,6 +85,96 @@
34
 
 
35
 
 G_DEFINE_TYPE (GpmNotify, gpm_notify, G_TYPE_OBJECT)
36
 
 
37
 
+static void
38
 
+destroy_alert (NotifyAlert *alert)
39
 
+{
40
 
+       if (alert->user_data != NULL && alert->free_func != NULL)
41
 
+               alert->free_func (alert->user_data);
42
 
+
43
 
+       g_free (alert->label);
44
 
+
45
 
+       g_free (alert);
46
 
+}
47
 
+
48
 
+static void
49
 
+add_alert_action (GpmNotify *notify,
50
 
+                 const char *action,
51
 
+                 const char *label,
52
 
+                 NotifyActionCallback callback,
53
 
+                 gpointer user_data,
54
 
+                 GFreeFunc free_func)
55
 
+{
56
 
+       NotifyAlert *alert = g_new0 (NotifyAlert, 1);
57
 
+       alert->cb = callback;
58
 
+       alert->user_data = user_data;
59
 
+       alert->free_func = free_func;
60
 
+       alert->label = g_strdup (label);
61
 
+
62
 
+       if (notify->priv->alerts == NULL) {
63
 
+               notify->priv->alerts = g_hash_table_new_full (g_str_hash,
64
 
+                                                             g_str_equal,
65
 
+                                                             g_free,
66
 
+                                                             (GFreeFunc)destroy_alert);
67
 
+       }
68
 
+
69
 
+       g_hash_table_insert (notify->priv->alerts,
70
 
+                            g_strdup (action),
71
 
+                            alert);
72
 
+}
73
 
+
74
 
+static void
75
 
+alert_action_button_clicked (GtkWidget *widget, gpointer data)
76
 
+{
77
 
+       GpmNotify *notify = (GpmNotify*)g_object_get_data (G_OBJECT (widget), "notify");
78
 
+       gchar *action = (gchar*)data;
79
 
+       NotifyAlert* alert;
80
 
+
81
 
+       if (notify->priv->alerts != NULL) {
82
 
+               alert = (NotifyAlert*)g_hash_table_lookup (notify->priv->alerts,
83
 
+                                                          action);
84
 
+               if (alert != NULL && alert->cb != NULL) {
85
 
+                       alert->cb (notify->priv->libnotify,
86
 
+                                  action,
87
 
+                                  alert->user_data);
88
 
+               }
89
 
+       }
90
 
+
91
 
+       g_hash_table_remove (notify->priv->alerts, action);
92
 
+}
93
 
+
94
 
+static gboolean
95
 
+gpm_notify_display_alert (GpmNotify        *notify,
96
 
+                         const gchar      *title,
97
 
+                         const gchar      *content,
98
 
+                         GpmNotifyTimeout  timeout,
99
 
+                         const gchar      *msgicon,
100
 
+                         GpmNotifyUrgency  urgency)
101
 
+{
102
 
+       GtkMessageType msg_type;
103
 
+
104
 
+       if (urgency == GPM_NOTIFY_URGENCY_CRITICAL) {
105
 
+               msg_type = GTK_MESSAGE_WARNING;
106
 
+       } else {
107
 
+               msg_type = GTK_MESSAGE_INFO;
108
 
+       }
109
 
+
110
 
+       notify->priv->dialog = gtk_message_dialog_new_with_markup (NULL,
111
 
+                                                                  GTK_DIALOG_DESTROY_WITH_PARENT,
112
 
+                                                                  msg_type,
113
 
+                                                                  GTK_BUTTONS_CLOSE,
114
 
+                                                                  "<span size='larger'><b>%s</b></span>",
115
 
+                                                                  GPM_NAME);
116
 
+
117
 
+       gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (notify->priv->dialog), "%s", content);
118
 
+
119
 
+       g_signal_connect_swapped (notify->priv->dialog,
120
 
+                                 "response",
121
 
+                                 G_CALLBACK (gtk_widget_destroy),
122
 
+                                 notify->priv->dialog);
123
 
+
124
 
+       return TRUE;
125
 
+}
126
 
+
127
 
 #ifdef HAVE_LIBNOTIFY
128
 
 /**
129
 
  * notify_closed_cb:
130
 
@@ -91,13 +191,21 @@
131
 
 }
132
 
 
133
 
 static gboolean
134
 
-gpm_notify_create (GpmNotify    *notify,
135
 
-                  const gchar   *title,
136
 
-                  const gchar   *content,
137
 
-                  GpmNotifyTimeout timeout,
138
 
-                  const gchar   *msgicon,
139
 
-                  GpmNotifyUrgency urgency)
140
 
+gpm_notify_create (GpmNotify        *notify,
141
 
+                  const gchar      *title,
142
 
+                  const gchar      *content,
143
 
+                  GpmNotifyTimeout  timeout,
144
 
+                  const gchar      *msgicon,
145
 
+                  GpmNotifyUrgency  urgency,
146
 
+                  gboolean          alert)
147
 
 {
148
 
+       if (alert) {
149
 
+               gpm_notify_display_alert (notify, title,
150
 
+                                         content, timeout,
151
 
+                                         msgicon, urgency);
152
 
+               return TRUE;
153
 
+       }
154
 
+
155
 
        if (notify->priv->libnotify != NULL) {
156
 
 //             notify_notification_close (notify->priv->libnotify, NULL);
157
 
 //             notify->priv->libnotify = NULL;
158
 
@@ -130,15 +238,50 @@
159
 
        return TRUE;
160
 
 }
161
 
 
162
 
+static void
163
 
+add_action_buttons (gpointer key,
164
 
+                   gpointer value,
165
 
+                   gpointer user_data)
166
 
+{
167
 
+       GpmNotify *notify;
168
 
+       gchar *action;
169
 
+       NotifyAlert *alert;
170
 
+       GtkWidget *hbox;
171
 
+       GtkWidget *button;
172
 
+
173
 
+       action = (gchar*)key;
174
 
+       alert = (NotifyAlert*)value;
175
 
+       notify = (GpmNotify*)user_data;
176
 
+
177
 
+       button = gtk_button_new_with_label (alert->label);
178
 
+       g_signal_connect (G_OBJECT (button), "clicked",
179
 
+                         G_CALLBACK (alert_action_button_clicked), action);
180
 
+       g_object_set_data (G_OBJECT (button), "notify", notify);
181
 
+
182
 
+       hbox = gtk_hbox_new (FALSE, 12);
183
 
+       gtk_box_pack_end (GTK_BOX (hbox), button, TRUE, FALSE, 0);
184
 
+
185
 
+       gtk_box_pack_start (GTK_BOX (GTK_DIALOG (notify->priv->dialog)->vbox),
186
 
+                           hbox, FALSE, FALSE, 0);
187
 
+       gtk_widget_show_all (hbox);
188
 
+}
189
 
+
190
 
 static gboolean
191
 
 gpm_notify_show (GpmNotify *notify)
192
 
 {
193
 
        gboolean ret;
194
 
-       ret = notify_notification_show (notify->priv->libnotify, NULL);
195
 
-       if (!ret) {
196
 
-               egg_warning ("failed to send notification");
197
 
+
198
 
+       if (notify->priv->dialog != NULL) {
199
 
+               g_hash_table_foreach (notify->priv->alerts, add_action_buttons, notify);
200
 
+               gtk_window_present (GTK_WINDOW (notify->priv->dialog));
201
 
+               return TRUE;
202
 
+       } else {
203
 
+               ret = notify_notification_show (notify->priv->libnotify, NULL);
204
 
+               if (!ret) {
205
 
+                       egg_warning ("failed to send notification");
206
 
+               }
207
 
+               return ret;
208
 
        }
209
 
-       return ret;
210
 
 }
211
 
 
212
 
 /**
213
 
@@ -161,13 +304,74 @@
214
 
                    const gchar  *msgicon,
215
 
                    GpmNotifyUrgency urgency)
216
 
 {
217
 
-       gpm_notify_create (notify, title, content, timeout, msgicon, urgency);
218
 
+       gpm_notify_create (notify, title, content, timeout, msgicon, urgency, FALSE);
219
 
        gpm_notify_show (notify);
220
 
        return TRUE;
221
 
 }
222
 
 
223
 
+static void
224
 
+gpm_notify_add_action (GpmNotify            *notify,
225
 
+                      const char           *action,
226
 
+                      const char           *label,
227
 
+                      NotifyActionCallback  callback,
228
 
+                      gpointer              user_data,
229
 
+                      GFreeFunc             free_func)
230
 
+{
231
 
+       if (notify->priv->dialog != NULL) {
232
 
+               add_alert_action (notify,
233
 
+                                 action,
234
 
+                                 label,
235
 
+                                 callback,
236
 
+                                 user_data,
237
 
+                                 free_func);
238
 
+       } else {
239
 
+               gboolean supports_actions = FALSE;
240
 
+               GList *caps = NULL;
241
 
+               GList *c = NULL;
242
 
+
243
 
+               caps = notify_get_server_caps ();
244
 
+               if (caps != NULL) {
245
 
+                       for (c = caps; c != NULL; c = c->next) {
246
 
+                               if (strcmp ((char*)c->data, "actions") == 0) {
247
 
+                                       supports_actions = TRUE;
248
 
+                                       break;
249
 
+                               }
250
 
+                       }
251
 
+
252
 
+                       g_list_foreach (caps, (GFunc)g_free, NULL);
253
 
+                       g_list_free (caps);
254
 
+               }
255
 
+
256
 
+               if (supports_actions) {
257
 
+                       notify_notification_add_action (notify->priv->libnotify,
258
 
+                                                       action,
259
 
+                                                       label,
260
 
+                                                       callback,
261
 
+                                                       user_data,
262
 
+                                                       free_func);
263
 
+               }
264
 
+       }
265
 
+}
266
 
+
267
 
+
268
 
 #else
269
 
 
270
 
+static void
271
 
+gpm_notify_add_action (GpmNotify            *notify,
272
 
+                      const char           *action,
273
 
+                      const char           *label,
274
 
+                      NotifyActionCallback  callback,
275
 
+                      gpointer              user_data,
276
 
+                      GFreeFunc             free_func)
277
 
+{
278
 
+       add_alert_action (notify,
279
 
+                         action,
280
 
+                         label,
281
 
+                         callback,
282
 
+                         user_data,
283
 
+                         free_func);
284
 
+}
285
 
+
286
 
 /**
287
 
  * gpm_notify_show:
288
 
  *
289
 
@@ -176,6 +380,9 @@
290
 
 static gboolean
291
 
 gpm_notify_show (GpmNotify *notify)
292
 
 {
293
 
+       g_hash_table_foreach (notify->priv->alerts, add_action_buttons, notify);
294
 
+       gtk_window_present (GTK_WINDOW (notify->priv->dialog));
295
 
+
296
 
        return TRUE;
297
 
 }
298
 
 
299
 
@@ -190,7 +397,8 @@
300
 
                   const gchar   *content,
301
 
                   GpmNotifyTimeout timeout,
302
 
                   const gchar   *msgicon,
303
 
-                  GpmNotifyUrgency urgency)
304
 
+                  GpmNotifyUrgency urgency,
305
 
+                  gboolean         alert)
306
 
 {
307
 
        gpm_notify_display (notify, title, content, timeout, msgicon, urgency);
308
 
        return TRUE;
309
 
@@ -216,32 +424,12 @@
310
 
                    const gchar  *msgicon,
311
 
                    GpmNotifyUrgency urgency)
312
 
 {
313
 
-       GtkWidget     *dialog;
314
 
-       GtkMessageType msg_type;
315
 
-
316
 
-       if (urgency == GPM_NOTIFY_URGENCY_CRITICAL) {
317
 
-               msg_type = GTK_MESSAGE_WARNING;
318
 
-       } else {
319
 
-               msg_type = GTK_MESSAGE_INFO;
320
 
-       }
321
 
-
322
 
-       dialog = gtk_message_dialog_new_with_markup (NULL,
323
 
-                                                    GTK_DIALOG_DESTROY_WITH_PARENT,
324
 
-                                                    msg_type,
325
 
-                                                    GTK_BUTTONS_CLOSE,
326
 
-                                                    "<span size='larger'><b>%s</b></span>",
327
 
-                                                    GPM_NAME);
328
 
-
329
 
-       gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), "%s", content);
330
 
-
331
 
-       g_signal_connect_swapped (dialog,
332
 
-                                 "response",
333
 
-                                 G_CALLBACK (gtk_widget_destroy),
334
 
-                                 dialog);
335
 
-
336
 
-       gtk_window_present (GTK_WINDOW (dialog));
337
 
-
338
 
-       return TRUE;
339
 
+       return gpm_notify_display_alert (notify,
340
 
+                                        title,
341
 
+                                        content,
342
 
+                                        timeout,
343
 
+                                        msgicon,
344
 
+                                        urgency);
345
 
 }
346
 
 #endif
347
 
 
348
 
@@ -376,22 +564,23 @@
349
 
 
350
 
        gpm_notify_create (notify, title, msg, 0,
351
 
                           GTK_STOCK_DIALOG_WARNING,
352
 
-                          GPM_NOTIFY_URGENCY_CRITICAL);
353
 
+                          GPM_NOTIFY_URGENCY_CRITICAL,
354
 
+                          TRUE);
355
 
 
356
 
        /* add extra stuff */
357
 
 #ifdef HAVE_LIBNOTIFY
358
 
        notify->priv->internet_url = g_strdup (website);
359
 
-       notify_notification_add_action  (notify->priv->libnotify,
360
 
-                                        "visit-website",
361
 
-                                        _("Visit recall website"),
362
 
-                                        (NotifyActionCallback) notify_general_clicked_cb,
363
 
-                                        notify, NULL);
364
 
+       gpm_notify_add_action  (notify,
365
 
+                               "visit-website",
366
 
+                               _("Visit recall website"),
367
 
+                               (NotifyActionCallback) notify_general_clicked_cb,
368
 
+                               notify, NULL);
369
 
        notify->priv->do_not_show_gconf = GPM_CONF_NOTIFY_PERHAPS_RECALL;
370
 
-       notify_notification_add_action  (notify->priv->libnotify,
371
 
-                                        "dont-show-again",
372
 
-                                        _("Do not show me this again"),
373
 
-                                        (NotifyActionCallback) notify_general_clicked_cb,
374
 
-                                        notify, NULL);
375
 
+       gpm_notify_add_action  (notify,
376
 
+                               "dont-show-again",
377
 
+                               _("Do not show me this again"),
378
 
+                               (NotifyActionCallback) notify_general_clicked_cb,
379
 
+                               notify, NULL);
380
 
 #endif
381
 
 
382
 
        gpm_notify_show (notify);
383
 
@@ -422,16 +611,17 @@
384
 
 
385
 
        gpm_notify_create (notify, title, msg, GPM_NOTIFY_TIMEOUT_LONG,
386
 
                           GTK_STOCK_DIALOG_WARNING,
387
 
-                          GPM_NOTIFY_URGENCY_CRITICAL);
388
 
+                          GPM_NOTIFY_URGENCY_CRITICAL,
389
 
+                          TRUE);
390
 
 
391
 
        /* add extra stuff */
392
 
 #ifdef HAVE_LIBNOTIFY
393
 
        notify->priv->do_not_show_gconf = GPM_CONF_NOTIFY_LOW_CAPACITY;
394
 
-       notify_notification_add_action  (notify->priv->libnotify,
395
 
-                                        "dont-show-again",
396
 
-                                        _("Do not show me this again"),
397
 
-                                        (NotifyActionCallback) notify_general_clicked_cb,
398
 
-                                        notify, NULL);
399
 
+       gpm_notify_add_action  (notify,
400
 
+                               "dont-show-again",
401
 
+                               _("Do not show me this again"),
402
 
+                               (NotifyActionCallback) notify_general_clicked_cb,
403
 
+                               notify, NULL);
404
 
 #endif
405
 
 
406
 
        gpm_notify_show (notify);
407
 
@@ -445,37 +635,6 @@
408
 
 gboolean
409
 
 gpm_notify_inhibit_lid (GpmNotify *notify)
410
 
 {
411
 
-       gchar *msg;
412
 
-       const gchar *title;
413
 
-
414
 
-       /* don't show when running under GDM */
415
 
-       if (g_getenv ("RUNNING_UNDER_GDM") != NULL) {
416
 
-               egg_debug ("running under gdm, so no notification");
417
 
-               return FALSE;
418
 
-       }
419
 
-
420
 
-       title = _("Sleep warning");
421
 
-       msg = g_strdup (_("Your laptop will not sleep if you shut the "
422
 
-                         "lid as a running program has prevented this.\n"
423
 
-                         "Some laptops can overheat if they do not sleep "
424
 
-                         "when the lid is closed."));
425
 
-
426
 
-       gpm_notify_create (notify, title, msg, GPM_NOTIFY_TIMEOUT_LONG,
427
 
-                          GPM_STOCK_INHIBIT,
428
 
-                          GPM_NOTIFY_URGENCY_CRITICAL);
429
 
-
430
 
-       /* add extra stuff */
431
 
-#ifdef HAVE_LIBNOTIFY
432
 
-       notify->priv->do_not_show_gconf = GPM_CONF_NOTIFY_INHIBIT_LID;
433
 
-       notify_notification_add_action  (notify->priv->libnotify,
434
 
-                                        "dont-show-again",
435
 
-                                        _("Do not show me this again"),
436
 
-                                        (NotifyActionCallback) notify_general_clicked_cb,
437
 
-                                        notify, NULL);
438
 
-#endif
439
 
-
440
 
-       gpm_notify_show (notify);
441
 
-       g_free (msg);
442
 
        return TRUE;
443
 
 }
444
 
 
445
 
@@ -485,27 +644,6 @@
446
 
 gboolean
447
 
 gpm_notify_fully_charged_primary (GpmNotify *notify)
448
 
 {
449
 
-       const gchar *msg;
450
 
-       const gchar *title;
451
 
-
452
 
-       title = _("Battery Charged");
453
 
-       msg = _("Your laptop battery is now fully charged");
454
 
-
455
 
-       gpm_notify_create (notify, title, msg, GPM_NOTIFY_TIMEOUT_SHORT,
456
 
-                          GTK_STOCK_DIALOG_WARNING,
457
 
-                          GPM_NOTIFY_URGENCY_CRITICAL);
458
 
-
459
 
-       /* add extra stuff */
460
 
-#ifdef HAVE_LIBNOTIFY
461
 
-       notify->priv->do_not_show_gconf = GPM_CONF_NOTIFY_FULLY_CHARGED;
462
 
-       notify_notification_add_action  (notify->priv->libnotify,
463
 
-                                        "dont-show-again",
464
 
-                                        _("Do not show me this again"),
465
 
-                                        (NotifyActionCallback) notify_general_clicked_cb,
466
 
-                                        notify, NULL);
467
 
-#endif
468
 
-
469
 
-       gpm_notify_show (notify);
470
 
        return TRUE;
471
 
 }
472
 
 
473
 
@@ -523,16 +661,17 @@
474
 
 
475
 
        gpm_notify_create (notify, title, msg, GPM_NOTIFY_TIMEOUT_SHORT,
476
 
                           GTK_STOCK_DIALOG_WARNING,
477
 
-                          GPM_NOTIFY_URGENCY_CRITICAL);
478
 
+                          GPM_NOTIFY_URGENCY_CRITICAL,
479
 
+                          FALSE);
480
 
 
481
 
        /* add extra stuff */
482
 
 #ifdef HAVE_LIBNOTIFY
483
 
        notify->priv->do_not_show_gconf = GPM_CONF_NOTIFY_DISCHARGING;
484
 
-       notify_notification_add_action  (notify->priv->libnotify,
485
 
-                                        "dont-show-again",
486
 
-                                        _("Do not show me this again"),
487
 
-                                        (NotifyActionCallback) notify_general_clicked_cb,
488
 
-                                        notify, NULL);
489
 
+       gpm_notify_add_action  (notify,
490
 
+                               "dont-show-again",
491
 
+                               _("Do not show me this again"),
492
 
+                               (NotifyActionCallback) notify_general_clicked_cb,
493
 
+                               notify, NULL);
494
 
 #endif
495
 
 
496
 
        gpm_notify_show (notify);
497
 
@@ -553,16 +692,17 @@
498
 
 
499
 
        gpm_notify_create (notify, title, msg, GPM_NOTIFY_TIMEOUT_SHORT,
500
 
                           GTK_STOCK_DIALOG_WARNING,
501
 
-                          GPM_NOTIFY_URGENCY_CRITICAL);
502
 
+                          GPM_NOTIFY_URGENCY_CRITICAL,
503
 
+                          FALSE);
504
 
 
505
 
        /* add extra stuff */
506
 
 #ifdef HAVE_LIBNOTIFY
507
 
        notify->priv->do_not_show_gconf = GPM_CONF_NOTIFY_DISCHARGING;
508
 
-       notify_notification_add_action  (notify->priv->libnotify,
509
 
-                                        "dont-show-again",
510
 
-                                        _("Do not show me this again"),
511
 
-                                        (NotifyActionCallback) notify_general_clicked_cb,
512
 
-                                        notify, NULL);
513
 
+       gpm_notify_add_action  (notify,
514
 
+                               "dont-show-again",
515
 
+                               _("Do not show me this again"),
516
 
+                               (NotifyActionCallback) notify_general_clicked_cb,
517
 
+                               notify, NULL);
518
 
 #endif
519
 
 
520
 
        gpm_notify_show (notify);
521
 
@@ -589,16 +729,17 @@
522
 
        }
523
 
 
524
 
        gpm_notify_create (notify, title, msg, GPM_NOTIFY_TIMEOUT_NEVER, icon,
525
 
-                          GPM_NOTIFY_URGENCY_CRITICAL);
526
 
+                          GPM_NOTIFY_URGENCY_CRITICAL,
527
 
+                          TRUE);
528
 
 
529
 
        /* add extra stuff */
530
 
 #ifdef HAVE_LIBNOTIFY
531
 
        notify->priv->do_not_show_gconf = GPM_CONF_NOTIFY_SLEEP_FAILED;
532
 
-       notify_notification_add_action  (notify->priv->libnotify,
533
 
-                                        "dont-show-again",
534
 
-                                        _("Do not show me this again"),
535
 
-                                        (NotifyActionCallback) notify_general_clicked_cb,
536
 
-                                        notify, NULL);
537
 
+       gpm_notify_add_action  (notify,
538
 
+                               "dont-show-again",
539
 
+                               _("Do not show me this again"),
540
 
+                               (NotifyActionCallback) notify_general_clicked_cb,
541
 
+                               notify, NULL);
542
 
 
543
 
        notify->priv->internet_url = g_strdup (QUIRK_WEBSITE);
544
 
        /* Translator: Quirks refer to strange/weird/undocumented behaviour of
545
 
@@ -607,11 +748,11 @@
546
 
         * supply the info by following the procedures outlined in the "Quirks
547
 
         * website" at http://people.freedesktop.org/~hughsient/quirk/.
548
 
         */
549
 
-       notify_notification_add_action  (notify->priv->libnotify,
550
 
-                                        "visit-website",
551
 
-                                        _("Visit quirk website"),
552
 
-                                        (NotifyActionCallback) notify_general_clicked_cb,
553
 
-                                        notify, NULL);
554
 
+       gpm_notify_add_action  (notify,
555
 
+                               "visit-website",
556
 
+                               _("Visit quirk website"),
557
 
+                               (NotifyActionCallback) notify_general_clicked_cb,
558
 
+                               notify, NULL);
559
 
 #endif
560
 
 
561
 
        gpm_notify_show (notify);
562