diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2013-01-17 17:51:41 -0800 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2013-01-17 17:51:41 -0800 |
commit | 6f4448950dff8ac368b42199240435bceded99db (patch) | |
tree | d4aa09732fb20fe8666185843c7bbb0489593d3d | |
parent | 129cbf6127f58c77e1afc453ae56036ac958f2aa (diff) | |
download | lightdm-6f4448950dff8ac368b42199240435bceded99db.tar.gz |
Stop deprecation warnings from glib >= 2.36
-rw-r--r-- | liblightdm-qt/greeter.cpp | 2 | ||||
-rw-r--r-- | liblightdm-qt/sessionsmodel.cpp | 2 | ||||
-rw-r--r-- | liblightdm-qt/usersmodel.cpp | 2 | ||||
-rw-r--r-- | src/lightdm.c | 2 | ||||
-rw-r--r-- | src/session-child.c | 2 | ||||
-rw-r--r-- | tests/src/X.c | 4 | ||||
-rw-r--r-- | tests/src/Xvnc.c | 2 | ||||
-rw-r--r-- | tests/src/guest-account.c | 2 | ||||
-rw-r--r-- | tests/src/plymouth.c | 2 | ||||
-rw-r--r-- | tests/src/test-gobject-greeter.c | 2 | ||||
-rw-r--r-- | tests/src/test-qt-greeter.cpp | 2 | ||||
-rw-r--r-- | tests/src/test-runner.c | 2 | ||||
-rw-r--r-- | tests/src/test-script-hook.c | 2 | ||||
-rw-r--r-- | tests/src/test-session.c | 2 | ||||
-rw-r--r-- | tests/src/vnc-client.c | 2 | ||||
-rw-r--r-- | utils/dm-tool.c | 2 | ||||
-rw-r--r-- | utils/lightdm-set-defaults.c | 2 |
17 files changed, 35 insertions, 1 deletions
diff --git a/liblightdm-qt/greeter.cpp b/liblightdm-qt/greeter.cpp index 717f5c2d..93152568 100644 --- a/liblightdm-qt/greeter.cpp +++ b/liblightdm-qt/greeter.cpp @@ -42,7 +42,9 @@ private: GreeterPrivate::GreeterPrivate(Greeter *parent) : q_ptr(parent) { +#if !defined(GLIB_VERSION_2_36) g_type_init(); +#endif ldmGreeter = lightdm_greeter_new(); g_signal_connect (ldmGreeter, "show-prompt", G_CALLBACK (cb_showPrompt), this); diff --git a/liblightdm-qt/sessionsmodel.cpp b/liblightdm-qt/sessionsmodel.cpp index 3315c71b..63c06154 100644 --- a/liblightdm-qt/sessionsmodel.cpp +++ b/liblightdm-qt/sessionsmodel.cpp @@ -46,7 +46,9 @@ private: SessionsModelPrivate::SessionsModelPrivate(SessionsModel *parent) : q_ptr(parent) { +#if !defined(GLIB_VERSION_2_36) g_type_init(); +#endif } void SessionsModelPrivate::loadSessions(SessionsModel::SessionType sessionType) diff --git a/liblightdm-qt/usersmodel.cpp b/liblightdm-qt/usersmodel.cpp index f1624938..94557240 100644 --- a/liblightdm-qt/usersmodel.cpp +++ b/liblightdm-qt/usersmodel.cpp @@ -65,7 +65,9 @@ public: UsersModelPrivate::UsersModelPrivate(UsersModel* parent) : q_ptr(parent) { +#if !defined(GLIB_VERSION_2_36) g_type_init(); +#endif } UsersModelPrivate::~UsersModelPrivate() diff --git a/src/lightdm.c b/src/lightdm.c index 79c9fc47..aa1b6b4e 100644 --- a/src/lightdm.c +++ b/src/lightdm.c @@ -870,7 +870,9 @@ main (int argc, char **argv) if (argc >= 2 && strcmp (argv[1], "--session-child") == 0) return session_child_run (argc, argv); +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif loop = g_main_loop_new (NULL, FALSE); g_signal_connect (process_get_current (), "got-signal", G_CALLBACK (signal_cb), NULL); diff --git a/src/session-child.c b/src/session-child.c index 628d8faf..c06cbc8b 100644 --- a/src/session-child.c +++ b/src/session-child.c @@ -184,7 +184,9 @@ session_child_run (int argc, char **argv) const gchar *path; GError *error = NULL; +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif /* Make input non-blocking */ fd = open ("/dev/null", O_RDONLY); diff --git a/tests/src/X.c b/tests/src/X.c index 3fe309b0..a6aeac44 100644 --- a/tests/src/X.c +++ b/tests/src/X.c @@ -255,8 +255,10 @@ main (int argc, char **argv) signal (SIGINT, signal_cb); signal (SIGTERM, signal_cb); signal (SIGHUP, signal_cb); - + +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif loop = g_main_loop_new (NULL, FALSE); diff --git a/tests/src/Xvnc.c b/tests/src/Xvnc.c index 451c33e1..6b828c23 100644 --- a/tests/src/Xvnc.c +++ b/tests/src/Xvnc.c @@ -177,7 +177,9 @@ main (int argc, char **argv) signal (SIGTERM, signal_cb); signal (SIGHUP, signal_cb); +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif loop = g_main_loop_new (NULL, FALSE); diff --git a/tests/src/guest-account.c b/tests/src/guest-account.c index b3459548..f45a59e8 100644 --- a/tests/src/guest-account.c +++ b/tests/src/guest-account.c @@ -19,7 +19,9 @@ main (int argc, char **argv) { gchar *passwd_path; +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif status_connect (request_cb); diff --git a/tests/src/plymouth.c b/tests/src/plymouth.c index aa8da5e6..3537014e 100644 --- a/tests/src/plymouth.c +++ b/tests/src/plymouth.c @@ -15,7 +15,9 @@ request_cb (const gchar *message) int main (int argc, char **argv) { +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif status_connect (request_cb); diff --git a/tests/src/test-gobject-greeter.c b/tests/src/test-gobject-greeter.c index da31796b..6c6aeb40 100644 --- a/tests/src/test-gobject-greeter.c +++ b/tests/src/test-gobject-greeter.c @@ -192,7 +192,9 @@ main (int argc, char **argv) signal (SIGINT, signal_cb); signal (SIGTERM, signal_cb); +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif main_loop = g_main_loop_new (NULL, FALSE); diff --git a/tests/src/test-qt-greeter.cpp b/tests/src/test-qt-greeter.cpp index 85007692..92f48a26 100644 --- a/tests/src/test-qt-greeter.cpp +++ b/tests/src/test-qt-greeter.cpp @@ -115,7 +115,9 @@ request_cb (const gchar *request) int main(int argc, char *argv[]) { +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif status_connect (request_cb); diff --git a/tests/src/test-runner.c b/tests/src/test-runner.c index 80560158..961d2352 100644 --- a/tests/src/test-runner.c +++ b/tests/src/test-runner.c @@ -1181,7 +1181,9 @@ main (int argc, char **argv) gchar cwd[1024]; GError *error = NULL; +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif loop = g_main_loop_new (NULL, FALSE); diff --git a/tests/src/test-script-hook.c b/tests/src/test-script-hook.c index 028d1ff6..e3212005 100644 --- a/tests/src/test-script-hook.c +++ b/tests/src/test-script-hook.c @@ -14,7 +14,9 @@ request_cb (const gchar *message) int main (int argc, char **argv) { +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif status_connect (request_cb); diff --git a/tests/src/test-session.c b/tests/src/test-session.c index 6a3dd79e..c0d20ba4 100644 --- a/tests/src/test-session.c +++ b/tests/src/test-session.c @@ -164,7 +164,9 @@ main (int argc, char **argv) signal (SIGINT, quit_cb); signal (SIGTERM, quit_cb); +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif loop = g_main_loop_new (NULL, FALSE); diff --git a/tests/src/vnc-client.c b/tests/src/vnc-client.c index 8e4e7968..8577b39d 100644 --- a/tests/src/vnc-client.c +++ b/tests/src/vnc-client.c @@ -28,7 +28,9 @@ main (int argc, char **argv) gchar buffer[1024]; gssize n_read, n_sent; +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif status_connect (request_cb); diff --git a/utils/dm-tool.c b/utils/dm-tool.c index d955efd1..3382da76 100644 --- a/utils/dm-tool.c +++ b/utils/dm-tool.c @@ -78,7 +78,9 @@ main (int argc, char **argv) gint arg_index; GBusType bus_type = G_BUS_TYPE_SYSTEM; +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif for (arg_index = 1; arg_index < argc; arg_index++) { diff --git a/utils/lightdm-set-defaults.c b/utils/lightdm-set-defaults.c index a28efc2a..b6114aa0 100644 --- a/utils/lightdm-set-defaults.c +++ b/utils/lightdm-set-defaults.c @@ -169,7 +169,9 @@ main (int argc, char *argv[]) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif context = g_option_context_new (N_("- set lightdm default values")); g_option_context_add_main_entries (context, entries, NULL); |