Comment 18 for bug 406302

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Do you think we should put an #IFDEF HAVE_LIBNOTIFY (which can be set automatically in SConstruct) around the calls to libnotify until we get a plugin system going? RZ, what are your thoughts?

Sorry for the trouble, but I found some additional issues:

- showNotification should use std::string for title. const char* is not guaranteed to be around after being queued.
- use notify_notification_new_with_status_icon(title.c_str(), body.c_str(), "linuxdcpp", statusIcon); no need to use gtk_icon_theme_load_icon that way.
- Don't need to queue showNotification from inside other *_gui() functions. So you can just call showNotification() from addPrivateMessage_gui (but keep the on(finished) the same)
- Move the call to #include <libnotify/notify.h> to mainwindow.cc to reduce the scope of the include