Merge lp:~azzar1/unity/glib-deprecated into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Stephen M. Webb
Approved revision: no longer in the source branch.
Merged at revision: 3044
Proposed branch: lp:~azzar1/unity/glib-deprecated
Merge into: lp:unity
Diff against target: 149 lines (+25/-10)
9 files modified
hud/StandaloneHud.cpp (+0/-2)
launcher/StandaloneLauncher.cpp (+0/-1)
launcher/StandaloneSwitcher.cpp (+0/-1)
tests/test_main_dbus.cpp (+2/-0)
tests/test_main_xless.cpp (+2/-0)
tests/test_service_main.c (+2/-1)
tests/unit/TestMain.cpp (+0/-2)
unity-shared/IconLoader.cpp (+19/-2)
unity-shared/StandaloneAppManager.cpp (+0/-1)
To merge this branch: bzr merge lp:~azzar1/unity/glib-deprecated
Reviewer Review Type Date Requested Status
Łukasz Zemczak Approve
Stephen M. Webb (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+143694@code.launchpad.net

Commit message

Remove deprecated glib function.

Description of the change

Remove deprecated function.

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) wrote :

Problem reproduced. Problem fixed.

review: Approve
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hud/StandaloneHud.cpp'
--- hud/StandaloneHud.cpp 2012-11-08 09:12:24 +0000
+++ hud/StandaloneHud.cpp 2013-01-17 16:13:29 +0000
@@ -132,8 +132,6 @@
132 // no real tests right now, just make sure we don't get any criticals and such132 // no real tests right now, just make sure we don't get any criticals and such
133 // waiting on nice perceptual diff support before we can build real tests133 // waiting on nice perceptual diff support before we can build real tests
134 // for views134 // for views
135
136 g_type_init ();
137 gtk_init (&argc, &argv);135 gtk_init (&argc, &argv);
138136
139 nux::NuxInitialize(0);137 nux::NuxInitialize(0);
140138
=== modified file 'launcher/StandaloneLauncher.cpp'
--- launcher/StandaloneLauncher.cpp 2012-11-22 16:35:20 +0000
+++ launcher/StandaloneLauncher.cpp 2013-01-17 16:13:29 +0000
@@ -41,7 +41,6 @@
4141
42int main(int argc, char** argv)42int main(int argc, char** argv)
43{43{
44 g_type_init();
45 gtk_init(&argc, &argv);44 gtk_init(&argc, &argv);
46 nux::NuxInitialize(0);45 nux::NuxInitialize(0);
4746
4847
=== modified file 'launcher/StandaloneSwitcher.cpp'
--- launcher/StandaloneSwitcher.cpp 2012-12-19 09:45:55 +0000
+++ launcher/StandaloneSwitcher.cpp 2013-01-17 16:13:29 +0000
@@ -299,7 +299,6 @@
299299
300int main(int argc, char** argv)300int main(int argc, char** argv)
301{301{
302 g_type_init();
303 gtk_init(&argc, &argv);302 gtk_init(&argc, &argv);
304 nux::NuxInitialize(0);303 nux::NuxInitialize(0);
305304
306305
=== modified file 'tests/test_main_dbus.cpp'
--- tests/test_main_dbus.cpp 2012-03-14 06:24:18 +0000
+++ tests/test_main_dbus.cpp 2013-01-17 16:13:29 +0000
@@ -9,7 +9,9 @@
9int main(int argc, char** argv)9int main(int argc, char** argv)
10{10{
11 ::testing::InitGoogleTest(&argc, argv);11 ::testing::InitGoogleTest(&argc, argv);
12#if G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34
12 g_type_init();13 g_type_init();
14#endif
13 15
14 nux::NuxInitialize (0);16 nux::NuxInitialize (0);
1517
1618
=== modified file 'tests/test_main_xless.cpp'
--- tests/test_main_xless.cpp 2012-09-10 21:34:10 +0000
+++ tests/test_main_xless.cpp 2013-01-17 16:13:29 +0000
@@ -6,7 +6,9 @@
6int main(int argc, char** argv)6int main(int argc, char** argv)
7{7{
8 ::testing::InitGoogleTest(&argc, argv);8 ::testing::InitGoogleTest(&argc, argv);
9#if G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34
9 g_type_init();10 g_type_init();
11#endif
10 setlocale(LC_ALL, "C");12 setlocale(LC_ALL, "C");
1113
12 // Slightly higher as we're more likely to test things we know will fail14 // Slightly higher as we're more likely to test things we know will fail
1315
=== modified file 'tests/test_service_main.c'
--- tests/test_service_main.c 2012-11-06 18:19:09 +0000
+++ tests/test_service_main.c 2013-01-17 16:13:29 +0000
@@ -43,8 +43,9 @@
43gint43gint
44main(gint argc, gchar** argv)44main(gint argc, gchar** argv)
45{45{
46#if G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34
46 g_type_init();47 g_type_init();
4748#endif
48 loop_ = g_main_loop_new(NULL, FALSE);49 loop_ = g_main_loop_new(NULL, FALSE);
4950
50 lens_ = service_lens_new();51 lens_ = service_lens_new();
5152
=== modified file 'tests/unit/TestMain.cpp'
--- tests/unit/TestMain.cpp 2012-11-06 18:19:09 +0000
+++ tests/unit/TestMain.cpp 2013-01-17 16:13:29 +0000
@@ -60,8 +60,6 @@
60main(int argc, char** argv)60main(int argc, char** argv)
61{61{
62 g_setenv("GSETTINGS_SCHEMA_DIR", BUILDDIR"/settings/", TRUE);62 g_setenv("GSETTINGS_SCHEMA_DIR", BUILDDIR"/settings/", TRUE);
63
64 g_type_init();
65 63
66 gtk_init(&argc, &argv);64 gtk_init(&argc, &argv);
6765
6866
=== modified file 'unity-shared/IconLoader.cpp'
--- unity-shared/IconLoader.cpp 2012-11-06 18:19:09 +0000
+++ unity-shared/IconLoader.cpp 2013-01-17 16:13:29 +0000
@@ -634,11 +634,27 @@
634634
635 void PushSchedulerJob()635 void PushSchedulerJob()
636 {636 {
637 ::g_io_scheduler_push_job (LoaderJobFunc, this, nullptr, G_PRIORITY_HIGH_IDLE, nullptr);637#if G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34
638 g_io_scheduler_push_job (LoaderJobFunc, this, nullptr, G_PRIORITY_HIGH_IDLE, nullptr);
639#else
640 glib::Object<GTask> task(g_task_new(nullptr, nullptr, [] (GObject*, GAsyncResult*, gpointer data) {
641 auto self = static_cast<IconLoaderTask*>(data);
642 self->LoadIconComplete(data);
643 }, this));
644
645 g_task_set_priority(task, G_PRIORITY_HIGH_IDLE);
646 g_task_set_task_data(task, this, nullptr);
647
648 g_task_run_in_thread(task, LoaderJobFunc);
649#endif
638 }650 }
639651
640 // Loading/rendering of pixbufs is done in a separate thread652 // Loading/rendering of pixbufs is done in a separate thread
653#if G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34
641 static gboolean LoaderJobFunc(GIOSchedulerJob* job, GCancellable *canc, gpointer data)654 static gboolean LoaderJobFunc(GIOSchedulerJob* job, GCancellable *canc, gpointer data)
655#else
656 static void LoaderJobFunc(GTask* job, gpointer source_object, gpointer data, GCancellable* canc)
657#endif
642 {658 {
643 auto task = static_cast<IconLoaderTask*>(data);659 auto task = static_cast<IconLoaderTask*>(data);
644660
@@ -669,9 +685,10 @@
669 }685 }
670 }686 }
671687
688#if G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34
672 g_io_scheduler_job_send_to_mainloop_async (job, LoadIconComplete, task, nullptr);689 g_io_scheduler_job_send_to_mainloop_async (job, LoadIconComplete, task, nullptr);
673
674 return FALSE;690 return FALSE;
691#endif
675 }692 }
676693
677 // this will be invoked back in the thread from which push_job was called694 // this will be invoked back in the thread from which push_job was called
678695
=== modified file 'unity-shared/StandaloneAppManager.cpp'
--- unity-shared/StandaloneAppManager.cpp 2012-11-27 01:19:45 +0000
+++ unity-shared/StandaloneAppManager.cpp 2013-01-17 16:13:29 +0000
@@ -178,7 +178,6 @@
178178
179int main(int argc, char* argv[])179int main(int argc, char* argv[])
180{180{
181 g_type_init();
182 gtk_init(&argc, &argv);181 gtk_init(&argc, &argv);
183 nux::logging::configure_logging(::getenv("UNITY_APP_LOG_SEVERITY"));182 nux::logging::configure_logging(::getenv("UNITY_APP_LOG_SEVERITY"));
184 g_log_set_default_handler(capture_g_log_calls, NULL);183 g_log_set_default_handler(capture_g_log_calls, NULL);