Avoid using wxLogError(), for the reasons given at the top of the file
Also use correct linkage for callback
This commit is contained in:
parent
f7985a74c4
commit
654656c885
@ -87,11 +87,12 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxLibnotifyModule, wxModule);
|
||||
|
||||
class wxLibNotifyMsgImpl;
|
||||
|
||||
extern "C" {
|
||||
static
|
||||
void wxLibNotifyMsgImplActionCallback(NotifyNotification *notification,
|
||||
char *action,
|
||||
gpointer user_data);
|
||||
|
||||
extern "C" {
|
||||
static void closed_notification(NotifyNotification* notification, void* user_data);
|
||||
}
|
||||
|
||||
@ -104,7 +105,7 @@ public:
|
||||
m_flags(wxICON_INFORMATION)
|
||||
{
|
||||
if ( !wxLibnotifyModule::Initialize() )
|
||||
wxLogError(_("Could not initalize libnotify."));
|
||||
wxLogDebug("Could not initialize libnotify");
|
||||
|
||||
}
|
||||
|
||||
@ -183,17 +184,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __WXGTK3__
|
||||
// Explicitly specified icon name overrides the implicit one determined by
|
||||
// the flags.
|
||||
if ( m_icon.IsOk() )
|
||||
{
|
||||
#ifdef __WXGTK3__
|
||||
notify_notification_set_image_from_pixbuf(
|
||||
m_notification,
|
||||
m_icon.GetPixbufNoMask()
|
||||
);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -341,6 +342,8 @@ private:
|
||||
int m_flags;
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
static
|
||||
void wxLibNotifyMsgImplActionCallback(NotifyNotification *WXUNUSED(notification),
|
||||
char *action,
|
||||
gpointer user_data)
|
||||
@ -350,7 +353,6 @@ void wxLibNotifyMsgImplActionCallback(NotifyNotification *WXUNUSED(notification)
|
||||
impl->NotifyAction(wxAtoi(action));
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
static void closed_notification(NotifyNotification* notification, void* user_data)
|
||||
{
|
||||
wxLibNotifyMsgImpl* impl = (wxLibNotifyMsgImpl*) user_data;
|
||||
|
Loading…
Reference in New Issue
Block a user