Some small code cleanups.
This commit is contained in:
parent
2676d3aa8b
commit
9b1b095caf
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Jan 20 20:49:31 PST 2006 Christian Hammond <chipx86@chipx86.com>
|
||||||
|
|
||||||
|
* libnotify/notify.c:
|
||||||
|
- Some small code cleanups.
|
||||||
|
|
||||||
Fri Jan 20 02:19:29 PST 2006 Christian Hammond <chipx86@chipx86.com>
|
Fri Jan 20 02:19:29 PST 2006 Christian Hammond <chipx86@chipx86.com>
|
||||||
|
|
||||||
* libnotify/notification.c:
|
* libnotify/notification.c:
|
||||||
|
|
|
@ -47,22 +47,6 @@ static DBusGProxy *_proxy = NULL;
|
||||||
# define format_func
|
# define format_func
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void format_func
|
|
||||||
print_error(char *message, ...)
|
|
||||||
{
|
|
||||||
char buf[1024];
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start(args, message);
|
|
||||||
vsnprintf(buf, sizeof(buf), message, args);
|
|
||||||
va_end(args);
|
|
||||||
|
|
||||||
fprintf(stderr, "%s(%d): libnotify: %s",
|
|
||||||
(getenv("_") ? getenv("_") : ""), getpid(), buf);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
notify_init(const char *app_name)
|
notify_init(const char *app_name)
|
||||||
{
|
{
|
||||||
|
@ -75,7 +59,6 @@ notify_init(const char *app_name)
|
||||||
_app_name = g_strdup(app_name);
|
_app_name = g_strdup(app_name);
|
||||||
|
|
||||||
g_type_init();
|
g_type_init();
|
||||||
dbus_g_type_specialized_init();
|
|
||||||
|
|
||||||
#ifdef HAVE_ATEXIT
|
#ifdef HAVE_ATEXIT
|
||||||
atexit(notify_uninit);
|
atexit(notify_uninit);
|
||||||
|
@ -95,14 +78,16 @@ notify_get_app_name(void)
|
||||||
void
|
void
|
||||||
notify_uninit(void)
|
notify_uninit(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (_app_name != NULL)
|
if (_app_name != NULL)
|
||||||
{
|
{
|
||||||
g_free(_app_name);
|
g_free(_app_name);
|
||||||
_app_name = NULL;
|
_app_name = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: keep track of all notifications and destroy them here? */
|
/*
|
||||||
|
* TODO: Keep track of all notifications and destroy them here?
|
||||||
|
* Definitely all notifications that don't expire.
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
|
Loading…
Reference in New Issue