Merge lp:~attente/unity-control-center/fix-incorrect-unref into lp:unity-control-center

Proposed by William Hua
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 12715
Merged at revision: 12723
Proposed branch: lp:~attente/unity-control-center/fix-incorrect-unref
Merge into: lp:unity-control-center
Diff against target: 88 lines (+10/-10)
5 files modified
panels/appearance/cc-appearance-panel.c (+3/-3)
panels/display/cc-display-panel.c (+2/-2)
panels/region/cc-region-panel.c (+2/-2)
panels/region/gnome-region-panel-input.c (+2/-2)
panels/user-accounts/um-user-panel.c (+1/-1)
To merge this branch: bzr merge lp:~attente/unity-control-center/fix-incorrect-unref
Reviewer Review Type Date Requested Status
Robert Ancell Approve
Sebastien Bacher Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+207368@code.launchpad.net

Commit message

Fix incorrect unref which was causing a critical on the region panel.

Description of the change

Fix incorrect unref which was causing a critical on the region panel.

To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Damn, they're not GObjects? Also, shouldn't that be g_settings_schema_unref not g_settings_schema_source_unref?

review: Needs Fixing
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Also, can you fix the other instances of this? (display, appearance, user)

Revision history for this message
William Hua (attente) wrote :

Yikes. You're right, I have no idea why that didn't warn...

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Probably the same reason g_object_unref doesn't warn. Some void pointer magic in there somewhere :)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
12715. By William Hua

Used the wrong unref... thanks Robert!

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks

review: Approve
Revision history for this message
Robert Ancell (robert-ancell) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panels/appearance/cc-appearance-panel.c'
2--- panels/appearance/cc-appearance-panel.c 2014-02-18 23:45:31 +0000
3+++ panels/appearance/cc-appearance-panel.c 2014-02-20 09:31:08 +0000
4@@ -1769,19 +1769,19 @@
5 if (schema)
6 {
7 priv->unity_own_settings = g_settings_new (UNITY_OWN_GSETTINGS_SCHEMA);
8- g_object_unref (schema);
9+ g_settings_schema_unref (schema);
10 }
11 schema = g_settings_schema_source_lookup (g_settings_schema_source_get_default (), UNITY_GSETTINGS_SCHEMA, TRUE);
12 if (schema)
13 {
14 priv->unity_settings = g_settings_new_with_path (UNITY_GSETTINGS_SCHEMA, UNITY_GSETTINGS_PATH);
15- g_object_unref (schema);
16+ g_settings_schema_unref (schema);
17 }
18 schema = g_settings_schema_source_lookup (g_settings_schema_source_get_default (), COMPIZCORE_GSETTINGS_SCHEMA, TRUE);
19 if (schema)
20 {
21 priv->compizcore_settings = g_settings_new_with_path (COMPIZCORE_GSETTINGS_SCHEMA, COMPIZCORE_GSETTINGS_PATH);
22- g_object_unref (schema);
23+ g_settings_schema_unref (schema);
24 }
25
26 if (!priv->unity_settings || !priv->compizcore_settings || !priv->unity_own_settings)
27
28=== modified file 'panels/display/cc-display-panel.c'
29--- panels/display/cc-display-panel.c 2014-02-17 22:45:08 +0000
30+++ panels/display/cc-display-panel.c 2014-02-20 09:31:08 +0000
31@@ -2823,13 +2823,13 @@
32 {
33 self->priv->unity2d_settings_main = g_settings_new (UNITY2D_GSETTINGS_MAIN);
34 self->priv->unity2d_settings_launcher = g_settings_new (UNITY2D_GSETTINGS_LAUNCHER);
35- g_object_unref (schema);
36+ g_settings_schema_unref (schema);
37 }
38 schema = g_settings_schema_source_lookup (g_settings_schema_source_get_default (), UNITY_GSETTINGS_SCHEMA, TRUE);
39 if (schema)
40 {
41 self->priv->unity_settings = g_settings_new_with_path (UNITY_GSETTINGS_SCHEMA, UNITY_GSETTINGS_PATH);
42- g_object_unref (schema);
43+ g_settings_schema_unref (schema);
44 }
45
46 if (!self->priv->unity_settings)
47
48=== modified file 'panels/region/cc-region-panel.c'
49--- panels/region/cc-region-panel.c 2014-02-17 22:45:08 +0000
50+++ panels/region/cc-region-panel.c 2014-02-20 09:31:08 +0000
51@@ -66,8 +66,8 @@
52
53 schema = g_settings_schema_source_lookup (g_settings_schema_source_get_default (), INDICATOR_KEYBOARD_SCHEMA_ID, TRUE);
54 if (schema) {
55- g_object_unref (schema);
56- return TRUE;
57+ g_settings_schema_unref (schema);
58+ return TRUE;
59 }
60
61 return FALSE;
62
63=== modified file 'panels/region/gnome-region-panel-input.c'
64--- panels/region/gnome-region-panel-input.c 2014-02-18 23:45:31 +0000
65+++ panels/region/gnome-region-panel-input.c 2014-02-20 09:31:08 +0000
66@@ -114,8 +114,8 @@
67
68 schema = g_settings_schema_source_lookup (g_settings_schema_source_get_default (), INDICATOR_KEYBOARD_SCHEMA_ID, TRUE);
69 if (schema) {
70- g_object_unref (schema);
71- return TRUE;
72+ g_settings_schema_unref (schema);
73+ return TRUE;
74 }
75
76 return FALSE;
77
78=== modified file 'panels/user-accounts/um-user-panel.c'
79--- panels/user-accounts/um-user-panel.c 2014-02-17 21:23:29 +0000
80+++ panels/user-accounts/um-user-panel.c 2014-02-20 09:31:08 +0000
81@@ -1347,7 +1347,7 @@
82 if (schema) {
83 d->indicator_session_schema = g_settings_new (INDICATOR_SESSION_SCHEMA);
84 g_settings_bind (d->indicator_session_schema, "show-real-name-on-panel", get_widget (d, "show-login-name-checkbutton"), "active", G_SETTINGS_BIND_DEFAULT);
85- g_object_unref (schema);
86+ g_settings_schema_unref (schema);
87 }
88 }
89

Subscribers

People subscribed via source and target branches