Merge lp:~compiz-team/compiz-compizconfig-gconf/compiz-compizconfig-gconf.settings_upgrades into lp:compiz-compizconfig-gconf

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 154
Proposed branch: lp:~compiz-team/compiz-compizconfig-gconf/compiz-compizconfig-gconf.settings_upgrades
Merge into: lp:compiz-compizconfig-gconf
Diff against target: 262 lines (+33/-31)
1 file modified
src/gconf.c (+33/-31)
To merge this branch: bzr merge lp:~compiz-team/compiz-compizconfig-gconf/compiz-compizconfig-gconf.settings_upgrades
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Review via email: mp+68992@code.launchpad.net

Description of the change

API Update

To post a comment you must log in.
Revision history for this message
Jason Smith (jassmith) wrote :

Code looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/gconf.c'
2--- src/gconf.c 2011-07-13 10:34:55 +0000
3+++ src/gconf.c 2011-07-24 13:01:38 +0000
4@@ -443,7 +443,6 @@
5 char *pluginName;
6 char *token;
7 int index;
8- Bool isScreen;
9 unsigned int screenNum;
10 CCSPlugin *plugin;
11 CCSSetting *setting;
12@@ -474,7 +473,6 @@
13 if (!token)
14 return;
15
16- isScreen = TRUE;
17 sscanf (token, "screen%d", &screenNum);
18
19 token = strsep (&keyName, "/"); /* 'options' */
20@@ -491,7 +489,7 @@
21
22 readInit (context);
23 if (!readOption (setting))
24- ccsResetToDefault (setting);
25+ ccsResetToDefault (setting, TRUE);
26
27 if (ccsGetIntegrationEnabled (context) &&
28 isIntegratedOption (setting, &index))
29@@ -572,10 +570,6 @@
30 {
31 for (i = 0; i < 1; i++)
32 {
33- unsigned int screen;
34-
35- screen = 0;
36-
37 setting = ccsFindSetting (plugin, (char*) opt->settingName);
38
39 if (setting)
40@@ -822,7 +816,7 @@
41 valueList = gconf_value_get_list (gconfValue);
42 if (!valueList)
43 {
44- ccsSetList (setting, NULL);
45+ ccsSetList (setting, NULL, TRUE);
46 return TRUE;
47 }
48
49@@ -906,7 +900,7 @@
50
51 if (list)
52 {
53- ccsSetList (setting, list);
54+ ccsSetList (setting, list, TRUE);
55 ccsSettingValueListFree (list, TRUE);
56 return TRUE;
57 }
58@@ -987,7 +981,7 @@
59 guint value;
60
61 value = gconf_value_get_int (gconfValue);
62- ccsSetInt (setting, value);
63+ ccsSetInt (setting, value, TRUE);
64 ret = TRUE;
65 }
66 break;
67@@ -997,7 +991,7 @@
68 gboolean value;
69
70 value = gconf_value_get_bool (gconfValue);
71- ccsSetBool (setting, value ? TRUE : FALSE);
72+ ccsSetBool (setting, value ? TRUE : FALSE, TRUE);
73 ret = TRUE;
74 }
75 break;
76@@ -1009,7 +1003,7 @@
77 value = gconf_value_get_string (gconfValue);
78 if (value)
79 {
80- ccsSetString (setting, value);
81+ ccsSetString (setting, value, TRUE);
82 ret = TRUE;
83 }
84 }
85@@ -1028,7 +1022,7 @@
86 ccsGetKey (setting, &key);
87 if (ccsStringToKeyBinding (value, &key))
88 {
89- ccsSetKey (setting, key);
90+ ccsSetKey (setting, key, TRUE);
91 ret = TRUE;
92 }
93 }
94@@ -1046,7 +1040,7 @@
95 gboolean showAll;
96
97 showAll = gconf_value_get_bool (gconfValue);
98- ccsSetBool (setting, !showAll);
99+ ccsSetBool (setting, !showAll, TRUE);
100 ret = TRUE;
101 }
102 }
103@@ -1062,7 +1056,7 @@
104 Bool fullscreen;
105
106 fullscreen = strcmp (value, "fullscreen") == 0;
107- ccsSetBool (setting, fullscreen);
108+ ccsSetBool (setting, fullscreen, TRUE);
109 ret = TRUE;
110 }
111 }
112@@ -1078,7 +1072,7 @@
113 if (focusMode)
114 {
115 Bool clickToFocus = (strcmp (focusMode, "click") == 0);
116- ccsSetBool (setting, clickToFocus);
117+ ccsSetBool (setting, clickToFocus, TRUE);
118 ret = TRUE;
119 }
120 }
121@@ -1109,7 +1103,7 @@
122 else
123 button.button = 1;
124
125- ccsSetButton (setting, button);
126+ ccsSetButton (setting, button, TRUE);
127 ret = TRUE;
128 }
129 }
130@@ -1189,7 +1183,7 @@
131 value = gconf_value_get_string (gconfValue);
132 if (value)
133 {
134- ccsSetString (setting, value);
135+ ccsSetString (setting, value, TRUE);
136 ret = TRUE;
137 }
138 }
139@@ -1200,7 +1194,7 @@
140 value = gconf_value_get_string (gconfValue);
141 if (value)
142 {
143- ccsSetMatch (setting, value);
144+ ccsSetMatch (setting, value, TRUE);
145 ret = TRUE;
146 }
147 }
148@@ -1210,7 +1204,7 @@
149 int value;
150 value = gconf_value_get_int (gconfValue);
151
152- ccsSetInt (setting, value);
153+ ccsSetInt (setting, value, TRUE);
154 ret = TRUE;
155 }
156 break;
157@@ -1219,7 +1213,7 @@
158 gboolean value;
159 value = gconf_value_get_bool (gconfValue);
160
161- ccsSetBool (setting, value ? TRUE : FALSE);
162+ ccsSetBool (setting, value ? TRUE : FALSE, TRUE);
163 ret = TRUE;
164 }
165 break;
166@@ -1228,7 +1222,7 @@
167 double value;
168 value = gconf_value_get_float (gconfValue);
169
170- ccsSetFloat (setting, (float)value);
171+ ccsSetFloat (setting, (float)value, TRUE);
172 ret = TRUE;
173 }
174 break;
175@@ -1240,7 +1234,7 @@
176
177 if (value && ccsStringToColor (value, &color))
178 {
179- ccsSetColor (setting, color);
180+ ccsSetColor (setting, color, TRUE);
181 ret = TRUE;
182 }
183 }
184@@ -1253,7 +1247,7 @@
185
186 if (value && ccsStringToKeyBinding (value, &key))
187 {
188- ccsSetKey (setting, key);
189+ ccsSetKey (setting, key, TRUE);
190 ret = TRUE;
191 }
192 }
193@@ -1266,7 +1260,7 @@
194
195 if (value && ccsStringToButtonBinding (value, &button))
196 {
197- ccsSetButton (setting, button);
198+ ccsSetButton (setting, button, TRUE);
199 ret = TRUE;
200 }
201 }
202@@ -1280,7 +1274,7 @@
203 {
204 unsigned int edges;
205 edges = ccsStringToEdges (value);
206- ccsSetEdge (setting, edges);
207+ ccsSetEdge (setting, edges, TRUE);
208 ret = TRUE;
209 }
210 }
211@@ -1290,7 +1284,7 @@
212 gboolean value;
213 value = gconf_value_get_bool (gconfValue);
214
215- ccsSetBell (setting, value ? TRUE : FALSE);
216+ ccsSetBell (setting, value ? TRUE : FALSE, TRUE);
217 ret = TRUE;
218 }
219 break;
220@@ -1478,7 +1472,7 @@
221 value.button = button;
222 value.buttonModMask = buttonModMask;
223
224- ccsSetButton (s, value);
225+ ccsSetButton (s, value, TRUE);
226 }
227 }
228
229@@ -1978,7 +1972,7 @@
230 status = readOption (setting);
231
232 if (!status)
233- ccsResetToDefault (setting);
234+ ccsResetToDefault (setting, TRUE);
235 }
236
237 static Bool
238@@ -2040,7 +2034,11 @@
239 {
240 name = strrchr (tmp->data, '/');
241 if (name && (strcmp (name + 1, DEFAULTPROF) != 0))
242- ret = ccsStringListAppend (ret, strdup (name + 1));
243+ {
244+ CCSString *str = calloc (1, sizeof (CCSString));
245+ str->value = strdup (name + 1);
246+ ret = ccsStringListAppend (ret, str);
247+ }
248
249 g_free (tmp->data);
250 }
251@@ -2049,7 +2047,11 @@
252
253 name = getCurrentProfileName ();
254 if (strcmp (name, DEFAULTPROF) != 0)
255- ret = ccsStringListAppend (ret, name);
256+ {
257+ CCSString *str = calloc (1, sizeof (CCSString));
258+ str->value = name;
259+ ret = ccsStringListAppend (ret, str);
260+ }
261 else
262 free (name);
263

Subscribers

People subscribed via source and target branches

to all changes: