Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
61c6dc0e
Commit
61c6dc0e
authored
Apr 03, 2008
by
Emmanuel Milou
Browse files
Notification - Voice mails
parent
b1d1eb46
Changes
2
Hide whitespace changes
Inline
Side-by-side
sflphone-gtk/src/SFLnotify.c
View file @
61c6dc0e
...
...
@@ -78,7 +78,36 @@ refuse_call_cb( NotifyNotification *notification, gchar *action, gpointer data )
void
ignore_call_cb
(
NotifyNotification
*
notification
,
gchar
*
action
,
gpointer
data
)
{
call_t
*
c
=
(
call_t
*
)
g_object_get_data
(
G_OBJECT
(
notification
)
,
"call"
);
g_object_unref
(
notification
);
}
void
notify_voice_mails
(
guint
count
,
account_t
*
acc
)
{
// the account is different from NULL
GdkPixbuf
*
pixbuf
;
gchar
*
title
;
gchar
*
body
;
notify_init
(
"sflphone"
);
title
=
g_markup_printf_escaped
(
_
(
"%s account: %s"
)
,
g_hash_table_lookup
(
acc
->
properties
,
ACCOUNT_TYPE
)
,
g_hash_table_lookup
(
acc
->
properties
,
ACCOUNT_ALIAS
)
)
;
body
=
g_markup_printf_escaped
(
_
(
"%d voice mails"
),
count
);
pixbuf
=
gdk_pixbuf_new_from_file
(
ICON_DIR
"/sflphone.png"
,
NULL
);
notification
=
notify_notification_new
(
title
,
body
,
NULL
,
NULL
);
notify_notification_set_urgency
(
notification
,
NOTIFY_URGENCY_NORMAL
);
notify_notification_set_icon_from_pixbuf
(
notification
,
pixbuf
);
notify_notification_attach_to_status_icon
(
notification
,
get_status_icon
()
);
notify_notification_set_timeout
(
notification
,
NOTIFY_EXPIRES_DEFAULT
);
notify_notification_add_action
(
notification
,
"ignore"
,
_
(
"Ignore"
)
,
(
NotifyActionCallback
)
ignore_call_cb
,
NULL
,
NULL
);
if
(
!
notify_notification_show
(
notification
,
NULL
))
{
g_print
(
"notify(), failed to send notification
\n
"
);
}
}
sflphone-gtk/src/SFLnotify.h
View file @
61c6dc0e
...
...
@@ -41,6 +41,8 @@
*/
void
notify_incoming_call
(
call_t
*
c
);
void
notify_voice_mails
(
guint
count
,
account_t
*
acc
);
/*
* Callback when answer button is pressed.
* Action: Pick up the incoming call
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment