Merge lp:~jeff-licquia/gwibber/gwibber-antiwarning into lp:gwibber

Proposed by Jeff Licquia
Status: Merged
Merged at revision: 1370
Proposed branch: lp:~jeff-licquia/gwibber/gwibber-antiwarning
Merge into: lp:gwibber
Diff against target: 86 lines (+8/-8)
5 files modified
client/attachments-item.vala (+0/-1)
client/tab-bar-widgets.vala (+0/-1)
client/users-item.vala (+1/-1)
libgwibber/account.vala (+2/-0)
libgwibber/streams.vala (+5/-5)
To merge this branch: bzr merge lp:~jeff-licquia/gwibber/gwibber-antiwarning
Reviewer Review Type Date Requested Status
Ken VanDine Approve
Review via email: mp+118271@code.launchpad.net

Description of the change

This is my first pass at "de-warning-ification" of Gwibber: getting rid of GTK warnings at runtime. With these changes, the Gwibber client can start, run for a bit, and close without warnings.

Some of the changes look fairly serious; there's use of an uninitialized value, and a place where Facebook accounts may not be fully parsed coming from the service due to a bogus parameter interrupting the parsing loop.

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Looks great, you rock!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'client/attachments-item.vala'
2--- client/attachments-item.vala 2012-03-06 21:07:22 +0000
3+++ client/attachments-item.vala 2012-08-05 19:59:19 +0000
4@@ -35,7 +35,6 @@
5 _align.add (box);
6
7 var images_but = new TabWidgets.RadioButton (_("Images"));
8- images_but.join_group (images_but);
9 images_but.clicked.connect(() => {
10 if (images_but.active)
11 {
12
13=== modified file 'client/tab-bar-widgets.vala'
14--- client/tab-bar-widgets.vala 2012-02-14 04:15:56 +0000
15+++ client/tab-bar-widgets.vala 2012-08-05 19:59:19 +0000
16@@ -300,7 +300,6 @@
17 continue;
18 }
19 account_button = create_button (account);
20- account_button.join_group (account_button);
21 if (i == 0)
22 {
23 selected = account.id;
24
25=== modified file 'client/users-item.vala'
26--- client/users-item.vala 2012-02-14 14:12:21 +0000
27+++ client/users-item.vala 2012-08-05 19:59:19 +0000
28@@ -46,7 +46,6 @@
29 _view.set_homogeneous (true);
30 _view.set_no_show_all (true);
31 _view.show ();
32- _vbox.show ();
33
34 _user_view = new GwibberGtk.UserView ();
35 _user_view.show_all ();
36@@ -91,6 +90,7 @@
37 _vbox.pack_start (_profile_box, false, false, 0);
38
39 _align.add (_vbox);
40+ _vbox.show ();
41
42 _entry = new Gtk.Entry ();
43 _entry.set_icon_from_stock (Gtk.EntryIconPosition.SECONDARY, "gtk-clear");
44
45=== modified file 'libgwibber/account.vala'
46--- libgwibber/account.vala 2011-10-25 16:20:32 +0000
47+++ libgwibber/account.vala 2012-08-05 19:59:19 +0000
48@@ -49,6 +49,8 @@
49 var root_object = parser.get_root().get_object();
50
51 foreach (var param in root_object.get_members()) {
52+ if (param == "uid")
53+ continue;
54 GLib.Value? value = null;
55 if (root_object.get_member(param).type_name() == "gboolean") {
56 if (param == "send_enabled") {
57
58=== modified file 'libgwibber/streams.vala'
59--- libgwibber/streams.vala 2012-04-04 20:52:48 +0000
60+++ libgwibber/streams.vala 2012-08-05 19:59:19 +0000
61@@ -485,12 +485,11 @@
62 _sender = _sender_obj.get_string_member("name");
63 if (_sender_obj.has_member("nick"))
64 _sender_nick = _sender_obj.get_string_member("nick");
65+ if (_sender_obj.has_member("is_me"))
66+ _from_me = _sender_obj.get_boolean_member("is_me");
67 }
68 }
69
70- if (_sender_obj.has_member("is_me"))
71- _from_me = _sender_obj.get_boolean_member("is_me");
72-
73 if (obj.has_member("time"))
74 _time = (uint)obj.get_double_member("time");
75 if (_time < 1 && obj.has_member("time"))
76@@ -506,8 +505,9 @@
77
78 // FIXME: the transient == 0 disables dupe checking for transients, we should fix that
79 //string _icon = yield service.avatar_path(_sender_obj.get_string_member("image"));
80- if (_sender_obj.has_member("image"))
81- _icon = _sender_obj.get_string_member("image");
82+ if (_sender_obj != null)
83+ if (_sender_obj.has_member("image"))
84+ _icon = _sender_obj.get_string_member("image");
85 if (obj.has_member("url"))
86 _url = obj.get_string_member("url");
87