Merge lp:~sergiusens/indicator-messages/g_type_init-guards into lp:indicator-messages/phablet

Proposed by Sergio Schvezov
Status: Merged
Approved by: Sergio Schvezov
Approved revision: 363
Merged at revision: 362
Proposed branch: lp:~sergiusens/indicator-messages/g_type_init-guards
Merge into: lp:indicator-messages/phablet
Diff against target: 111 lines (+20/-2)
6 files modified
debian/changelog (+6/-0)
doc/reference/Makefile.am (+0/-1)
doc/reference/messaging-menu-docs.xml.in (+2/-1)
src/messages-service.c (+2/-0)
test/indicator-messages-service-activate.c (+2/-0)
test/test-gactionmuxer.cpp (+8/-0)
To merge this branch: bzr merge lp:~sergiusens/indicator-messages/g_type_init-guards
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Gustavo Pichorim Boiko (community) Approve
Review via email: mp+155064@code.launchpad.net

Commit message

Adding guards for g_type_init and reversioning

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Looks good.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Reapproving, connection error occurred:
ssh: connect to host bazaar.launchpad.net port 22: Connection refused

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Why did you not use the GLIB_CHECK_VERSION() instead, as it's the commonly accepted method for doing such version tests?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

@Mathieu, I'm no glib expert, feel free to change, I'll keep this in mind.

FYI, I tried to improve what was done here: https://code.launchpad.net/~macslow/nux/phablet-symbol-deprecation-guard-g-type-init/+merge/154887

Revision history for this message
Lars Karlitski (larsu) wrote :

Guys, the real solution to this is to define GLIB_MIN_VERSION. GLib only generates warnings for functions that were deprecated before that, not after. No code changes necessary.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-12-20 17:50:37 +0000
3+++ debian/changelog 2013-03-22 20:45:37 +0000
4@@ -1,3 +1,9 @@
5+indicator-messages (12.10.6phablet1) quantal; urgency=low
6+
7+ * Adding guards for g_type_init
8+
9+ -- Sergio Schvezov <sergio.schvezov@canonical.com> Fri, 22 Mar 2013 17:23:45 -0300
10+
11 indicator-messages (12.10.6-0ubuntu1phablet9) quantal; urgency=low
12
13 * add "remove-all" signal to imapplicationlist (temporarily)
14
15=== modified file 'doc/reference/Makefile.am'
16--- doc/reference/Makefile.am 2012-11-13 12:40:12 +0000
17+++ doc/reference/Makefile.am 2013-03-22 20:45:37 +0000
18@@ -4,7 +4,6 @@
19
20 DOC_SOURCE_DIR = $(top_srcdir)/libmessaging-menu
21
22-SCANGOBJ_OPTIONS=--type-init-func="g_type_init()"
23 MKDB_OPTIONS=--xml-mode --output-format=xml
24
25 # Used for dependencies. The docs will be rebuilt if any of these change.
26
27=== modified file 'doc/reference/messaging-menu-docs.xml.in'
28--- doc/reference/messaging-menu-docs.xml.in 2012-08-29 11:27:54 +0000
29+++ doc/reference/messaging-menu-docs.xml.in 2013-03-22 20:45:37 +0000
30@@ -18,7 +18,8 @@
31
32 <chapter>
33 <title>API Reference</title>
34- <xi:include href="xml/messaging-menu.xml"/>
35+ <xi:include href="xml/messaging-menu-app.xml" />
36+ <xi:include href="xml/messaging-menu-message.xml" />
37 </chapter>
38
39 <chapter id="object-tree">
40
41=== modified file 'src/messages-service.c'
42--- src/messages-service.c 2012-12-20 16:46:15 +0000
43+++ src/messages-service.c 2013-03-22 20:45:37 +0000
44@@ -130,7 +130,9 @@
45 GBusNameOwnerFlags flags;
46
47 /* Glib init */
48+#if G_ENCODE_VERSION(GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34
49 g_type_init();
50+#endif
51
52 mainloop = g_main_loop_new (NULL, FALSE);
53
54
55=== modified file 'test/indicator-messages-service-activate.c'
56--- test/indicator-messages-service-activate.c 2009-05-28 15:29:41 +0000
57+++ test/indicator-messages-service-activate.c 2013-03-22 20:45:37 +0000
58@@ -28,7 +28,9 @@
59 int
60 main (int argc, char ** argv)
61 {
62+#if G_ENCODE_VERSION(GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34
63 g_type_init();
64+#endif
65
66 guint returnval = 0;
67 GError * error = NULL;
68
69=== modified file 'test/test-gactionmuxer.cpp'
70--- test/test-gactionmuxer.cpp 2013-02-20 13:10:51 +0000
71+++ test/test-gactionmuxer.cpp 2013-03-22 20:45:37 +0000
72@@ -43,7 +43,9 @@
73 TEST(GActionMuxerTest, Sanity) {
74 GActionMuxer *muxer;
75
76+#if G_ENCODE_VERSION(GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34
77 g_type_init ();
78+#endif
79
80 g_action_muxer_insert (NULL, NULL, NULL);
81 g_action_muxer_remove (NULL, NULL);
82@@ -64,7 +66,9 @@
83 GActionMuxer *muxer;
84 gchar **actions;
85
86+#if G_ENCODE_VERSION(GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34
87 g_type_init ();
88+#endif
89
90 muxer = g_action_muxer_new ();
91
92@@ -85,7 +89,9 @@
93 GActionMuxer *muxer;
94 gchar **actions;
95
96+#if G_ENCODE_VERSION(GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34
97 g_type_init ();
98+#endif
99
100 group1 = g_simple_action_group_new ();
101 g_simple_action_group_add_entries (group1,
102@@ -178,7 +184,9 @@
103 GVariant *state_hint[2];
104 GVariant *state[2];
105
106+#if G_ENCODE_VERSION(GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) <= GLIB_VERSION_2_34
107 g_type_init ();
108+#endif
109
110 group = g_simple_action_group_new ();
111 action = g_simple_action_new ("one", G_VARIANT_TYPE_STRING);

Subscribers

People subscribed via source and target branches