Advertisement
Guest User

gnome-settings-daemon-2.32.1-libnotify-0.7.patch

a guest
Apr 3rd, 2011
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.48 KB | None | 0 0
  1. --- plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
  2. +++ plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
  3. @@ -48,6 +48,9 @@
  4.  
  5. #ifdef HAVE_LIBNOTIFY
  6. #include <libnotify/notify.h>
  7. +#ifndef NOTIFY_CHECK_VERSION
  8. +#define NOTIFY_CHECK_VERSION(x,y,z) 0
  9. +#endif
  10. #endif /* HAVE_LIBNOTIFY */
  11.  
  12. #include "gnome-settings-profile.h"
  13. @@ -608,9 +611,13 @@
  14. gsd_a11y_keyboard_manager_ensure_status_icon (manager);
  15. manager->priv->notification = notify_notification_new (title,
  16. message,
  17. - "preferences-desktop-accessibility",
  18. - NULL);
  19. + "preferences-desktop-accessibility"
  20. +#if NOTIFY_CHECK_VERSION (0, 7, 0)
  21. + );
  22. +#else
  23. + , NULL);
  24. notify_notification_attach_to_status_icon (manager->priv->notification, manager->priv->status_icon);
  25. +#endif
  26. notify_notification_set_timeout (manager->priv->notification, NOTIFICATION_TIMEOUT * 1000);
  27.  
  28. notify_notification_add_action (manager->priv->notification,
  29. @@ -747,9 +754,13 @@
  30. gsd_a11y_keyboard_manager_ensure_status_icon (manager);
  31. manager->priv->notification = notify_notification_new (title,
  32. message,
  33. - "preferences-desktop-accessibility",
  34. - NULL);
  35. + "preferences-desktop-accessibility"
  36. +#if NOTIFY_CHECK_VERSION (0, 7, 0)
  37. + );
  38. +#else
  39. + , NULL);
  40. notify_notification_attach_to_status_icon (manager->priv->notification, manager->priv->status_icon);
  41. +#endif
  42. notify_notification_set_timeout (manager->priv->notification, NOTIFICATION_TIMEOUT * 1000);
  43.  
  44. notify_notification_add_action (manager->priv->notification,
  45. --- plugins/xrandr/gsd-xrandr-manager.c
  46. +++ plugins/xrandr/gsd-xrandr-manager.c
  47. @@ -48,6 +48,9 @@
  48.  
  49. #ifdef HAVE_LIBNOTIFY
  50. #include <libnotify/notify.h>
  51. +#ifndef NOTIFY_CHECK_VERSION
  52. +#define NOTIFY_CHECK_VERSION(x,y,z) 0
  53. +#endif
  54. #endif
  55.  
  56. #include "gnome-settings-profile.h"
  57. @@ -1086,6 +1089,11 @@
  58.  
  59. g_assert (error_to_display == NULL || secondary_text == NULL);
  60.  
  61. +#if NOTIFY_CHECK_VERSION (0, 7, 0)
  62. + notification = notify_notification_new (primary_text,
  63. + error_to_display ? error_to_display->message : secondary_text,
  64. + GSD_XRANDR_ICON_NAME);
  65. +#else
  66. if (priv->status_icon)
  67. notification = notify_notification_new_with_status_icon (primary_text,
  68. error_to_display ? error_to_display->message : secondary_text,
  69. @@ -1096,6 +1104,7 @@
  70. error_to_display ? error_to_display->message : secondary_text,
  71. GSD_XRANDR_ICON_NAME,
  72. NULL);
  73. +#endif
  74.  
  75. notify_notification_show (notification, NULL); /* NULL-GError */
  76. #else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement