Mercurial > projects > xwrited
diff main.c @ 1:0907cc7064d4
Add support for newer glib versions
Do not call g_type_init() in glib >= 2.35 where it has been deprecated.
glib >= 2.32 only shows debug messages if the G_MESSAGES_DEBUG environment
variable contains the log domain or "all", so add the log domain to
G_MESSAGES_DEBUG if necessary if the "-d" commandline option was specified.
author | Guido Berhoerster <guido+xwrited@berhoerster.name> |
---|---|
date | Sun, 27 Apr 2014 23:12:06 +0200 |
parents | 52694b49dcc4 |
children | fd2e275436a4 |
line wrap: on
line diff
--- a/main.c Sun Apr 27 23:07:51 2014 +0200 +++ b/main.c Sun Apr 27 23:12:06 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Guido Berhoerster <guido+xwrited@berhoerster.name> + * Copyright (C) 2014 Guido Berhoerster <guido+xwrited@berhoerster.name> * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -288,7 +288,10 @@ bind_textdomain_codeset(PACKAGE, "UTF-8"); textdomain(PACKAGE); +#if !GLIB_CHECK_VERSION(2, 35, 0) + /* deprecated in glib >= 2.35 */ g_type_init(); +#endif context = g_option_context_new("- display write and wall messages as " "desktop notifications");