gnome: improve cmd line option handling
Custom cmd line options are now properly printed
when running gnome-ring --help
Note: the old behaviour is still observed on
systems with glib < 2.40
Refs #73700
Change-Id: Ibb2e57767f1b2100c0f5e361033c35f4356e21ec
diff --git a/src/ring_client_options.h b/src/ring_client_options.h
index db6881e..445000e 100644
--- a/src/ring_client_options.h
+++ b/src/ring_client_options.h
@@ -31,11 +31,15 @@
#ifndef RING_CLIENT_OPTIONS_H_
#define RING_CLIENT_OPTIONS_H_
-#include <glib.h>
+#include <gio/gio.h>
G_BEGIN_DECLS
+#if GLIB_CHECK_VERSION(2,40,0)
+void ring_client_add_options(GApplication *app);
+#else
GOptionContext *ring_client_options_get_context(void);
+#endif
G_END_DECLS