~nathwill-deactivatedaccount-deactivatedaccount/ubuntu/precise/gnome-control-center/fix-lp-978118

« back to all changes in this revision

Viewing changes to debian/patches/04_new_appearance_settings.patch

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2012-01-26 10:42:38 UTC
  • Revision ID: package-import@ubuntu.com-20120126104238-pybbhk6b01kknpn9
Tags: 1:3.2.2-2ubuntu4
* 04_add_theme_selection.patch => 04_new_appearance_settings.patch:
  (background screen)
  - rename and add unity officials option to it. Note that those
    only appears if you are in an unity session. It impacts both
    unity-2d and unity-3d. unity-3d settings are taken if the options
    are different on first launch. All options for the settings aren't
    exposed. If the user specify something else in ccsm for instance,
    it will be preserved. (LP: #869080)
  - also add a "restore defauts" on the background screen to reset
    the user selection change to default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: gnome-control-center-3.2.2/configure.ac
 
2
===================================================================
 
3
--- gnome-control-center-3.2.2.orig/configure.ac        2012-01-25 18:30:21.062768851 +0100
 
4
+++ gnome-control-center-3.2.2/configure.ac     2012-01-26 08:29:39.832143977 +0100
 
5
@@ -91,7 +91,7 @@
 
6
 PKG_CHECK_MODULES(LIBSHORTCUTS, $COMMON_MODULES x11)
 
7
 PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu-3.0 gio-unix-2.0)
 
8
 PKG_CHECK_MODULES(BACKGROUND_PANEL, $COMMON_MODULES libxml-2.0 gnome-desktop-3.0
 
9
-                  gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)
 
10
+                  gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION gconf-2.0)
 
11
 PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES dbus-glib-1
 
12
                   polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
 
13
                   gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)
 
14
Index: gnome-control-center-3.2.2/panels/background/background.ui
 
15
===================================================================
 
16
--- gnome-control-center-3.2.2.orig/panels/background/background.ui     2011-11-08 21:20:01.000000000 +0100
 
17
+++ gnome-control-center-3.2.2/panels/background/background.ui  2012-01-25 18:30:21.146769261 +0100
 
18
@@ -1,7 +1,6 @@
 
19
-<?xml version="1.0"?>
 
20
+<?xml version="1.0" encoding="UTF-8"?>
 
21
 <interface>
 
22
   <requires lib="gtk+" version="2.16"/>
 
23
-  <!-- interface-naming-policy project-wide -->
 
24
   <object class="GtkListStore" id="sources-liststore">
 
25
     <columns>
 
26
       <!-- column-name source-name -->
 
27
@@ -12,305 +11,821 @@
 
28
       <column type="gpointer"/>
 
29
     </columns>
 
30
   </object>
 
31
-  <object class="GtkHBox" id="background-panel">
 
32
-    <property name="visible">True</property>
 
33
-    <property name="border_width">10</property>
 
34
-    <property name="spacing">12</property>
 
35
+  <object class="GtkListStore" id="style-liststore">
 
36
+    <columns>
 
37
+      <!-- column-name name -->
 
38
+      <column type="gchararray"/>
 
39
+      <!-- column-name value -->
 
40
+      <column type="gint"/>
 
41
+    </columns>
 
42
+    <data>
 
43
+      <row>
 
44
+        <col id="0" translatable="yes">Tile</col>
 
45
+        <col id="1">1</col>
 
46
+      </row>
 
47
+      <row>
 
48
+        <col id="0" translatable="yes">Zoom</col>
 
49
+        <col id="1">5</col>
 
50
+      </row>
 
51
+      <row>
 
52
+        <col id="0" translatable="yes">Center</col>
 
53
+        <col id="1">2</col>
 
54
+      </row>
 
55
+      <row>
 
56
+        <col id="0" translatable="yes">Scale</col>
 
57
+        <col id="1">3</col>
 
58
+      </row>
 
59
+      <row>
 
60
+        <col id="0" translatable="yes">Fill</col>
 
61
+        <col id="1">4</col>
 
62
+      </row>
 
63
+      <row>
 
64
+        <col id="0" translatable="yes">Span</col>
 
65
+        <col id="1">6</col>
 
66
+      </row>
 
67
+    </data>
 
68
+  </object>
 
69
+  <object class="GtkWindow" id="window1">
 
70
+    <property name="can_focus">False</property>
 
71
     <child>
 
72
-      <object class="GtkVBox" id="vbox2">
 
73
+      <object class="GtkNotebook" id="main-notebook">
 
74
         <property name="visible">True</property>
 
75
-        <property name="orientation">vertical</property>
 
76
-        <property name="spacing">0</property>
 
77
-        <child>
 
78
-          <object class="GtkComboBox" id="sources-combobox">
 
79
-            <property name="visible">True</property>
 
80
-            <property name="model">sources-liststore</property>
 
81
-            <child>
 
82
-              <object class="GtkCellRendererText" id="cellrenderertext2"/>
 
83
-              <attributes>
 
84
-                <attribute name="text">0</attribute>
 
85
-              </attributes>
 
86
-            </child>
 
87
-          </object>
 
88
-          <packing>
 
89
-            <property name="expand">False</property>
 
90
-            <property name="position">0</property>
 
91
-            <property name="padding">6</property>
 
92
-          </packing>
 
93
-        </child>
 
94
+        <property name="can_focus">True</property>
 
95
+        <property name="margin_left">14</property>
 
96
         <child>
 
97
-          <object class="GtkScrolledWindow" id="scrolledwindow1">
 
98
-            <property name="width_request">220</property>
 
99
-            <property name="height_request">380</property>
 
100
+          <object class="GtkBox" id="background-panel">
 
101
             <property name="visible">True</property>
 
102
-            <property name="can_focus">True</property>
 
103
-            <property name="hscrollbar_policy">automatic</property>
 
104
-            <property name="vscrollbar_policy">automatic</property>
 
105
-            <property name="shadow_type">in</property>
 
106
+            <property name="can_focus">False</property>
 
107
+            <property name="margin_top">3</property>
 
108
+            <property name="margin_bottom">3</property>
 
109
+            <property name="orientation">vertical</property>
 
110
+            <property name="spacing">3</property>
 
111
             <child>
 
112
-              <object class="GtkIconView" id="backgrounds-iconview">
 
113
+              <object class="GtkHBox" id="background-container">
 
114
                 <property name="visible">True</property>
 
115
-                <property name="can_focus">True</property>
 
116
-                <property name="row_spacing">0</property>
 
117
-                <property name="column_spacing">0</property>
 
118
-                <property name="margin">0</property>
 
119
+                <property name="can_focus">False</property>
 
120
+                <property name="border_width">10</property>
 
121
+                <property name="spacing">12</property>
 
122
                 <child>
 
123
-                  <object class="GtkCellRendererPixbuf" id="pixbuf-renderer">
 
124
-                    <property name="stock_size">6</property>
 
125
+                  <object class="GtkVBox" id="vbox3">
 
126
+                    <property name="visible">True</property>
 
127
+                    <property name="can_focus">False</property>
 
128
+                    <child>
 
129
+                      <object class="GtkLabel" id="label1">
 
130
+                        <property name="visible">True</property>
 
131
+                        <property name="can_focus">False</property>
 
132
+                        <property name="xalign">0</property>
 
133
+                        <property name="label" translatable="yes">&lt;b&gt;Background&lt;/b&gt;</property>
 
134
+                        <property name="use_markup">True</property>
 
135
+                      </object>
 
136
+                      <packing>
 
137
+                        <property name="expand">False</property>
 
138
+                        <property name="fill">True</property>
 
139
+                        <property name="position">0</property>
 
140
+                      </packing>
 
141
+                    </child>
 
142
+                    <child>
 
143
+                      <object class="GtkDrawingArea" id="preview-area">
 
144
+                        <property name="visible">True</property>
 
145
+                        <property name="can_focus">False</property>
 
146
+                      </object>
 
147
+                      <packing>
 
148
+                        <property name="expand">True</property>
 
149
+                        <property name="fill">True</property>
 
150
+                        <property name="position">1</property>
 
151
+                      </packing>
 
152
+                    </child>
 
153
+                    <child>
 
154
+                      <object class="GtkHBox" id="heading-hbox">
 
155
+                        <property name="visible">True</property>
 
156
+                        <property name="can_focus">False</property>
 
157
+                        <property name="halign">center</property>
 
158
+                        <property name="valign">end</property>
 
159
+                        <property name="spacing">4</property>
 
160
+                        <child>
 
161
+                          <object class="GtkLabel" id="background-label">
 
162
+                            <property name="visible">True</property>
 
163
+                            <property name="can_focus">False</property>
 
164
+                            <property name="halign">center</property>
 
165
+                            <property name="label">Current background</property>
 
166
+                            <attributes>
 
167
+                              <attribute name="style" value="italic"/>
 
168
+                            </attributes>
 
169
+                          </object>
 
170
+                          <packing>
 
171
+                            <property name="expand">False</property>
 
172
+                            <property name="fill">True</property>
 
173
+                            <property name="position">0</property>
 
174
+                          </packing>
 
175
+                        </child>
 
176
+                        <child>
 
177
+                          <object class="GtkLabel" id="size_label">
 
178
+                            <property name="width_request">15</property>
 
179
+                            <property name="visible">True</property>
 
180
+                            <property name="can_focus">False</property>
 
181
+                            <property name="label">(2560 x 2560)</property>
 
182
+                            <attributes>
 
183
+                              <attribute name="style" value="italic"/>
 
184
+                            </attributes>
 
185
+                          </object>
 
186
+                          <packing>
 
187
+                            <property name="expand">False</property>
 
188
+                            <property name="fill">True</property>
 
189
+                            <property name="position">1</property>
 
190
+                          </packing>
 
191
+                        </child>
 
192
+                      </object>
 
193
+                      <packing>
 
194
+                        <property name="expand">False</property>
 
195
+                        <property name="fill">True</property>
 
196
+                        <property name="padding">6</property>
 
197
+                        <property name="position">2</property>
 
198
+                      </packing>
 
199
+                    </child>
 
200
+                    <child>
 
201
+                      <object class="GtkHBox" id="bottom-hbox">
 
202
+                        <property name="visible">True</property>
 
203
+                        <property name="can_focus">False</property>
 
204
+                        <property name="spacing">12</property>
 
205
+                        <child>
 
206
+                          <object class="GtkHBox" id="hbox2">
 
207
+                            <property name="visible">True</property>
 
208
+                            <property name="can_focus">False</property>
 
209
+                            <property name="spacing">2</property>
 
210
+                            <child>
 
211
+                              <object class="GtkImage" id="slide_image">
 
212
+                                <property name="visible">True</property>
 
213
+                                <property name="can_focus">False</property>
 
214
+                                <property name="icon_name">slideshow-symbolic</property>
 
215
+                              </object>
 
216
+                              <packing>
 
217
+                                <property name="expand">False</property>
 
218
+                                <property name="fill">True</property>
 
219
+                                <property name="position">0</property>
 
220
+                              </packing>
 
221
+                            </child>
 
222
+                            <child>
 
223
+                              <object class="GtkLabel" id="slide-label">
 
224
+                                <property name="visible">True</property>
 
225
+                                <property name="can_focus">False</property>
 
226
+                                <property name="xalign">0</property>
 
227
+                                <property name="label" translatable="yes" comments="This refers to a slideshow background">Changes throughout the day</property>
 
228
+                              </object>
 
229
+                              <packing>
 
230
+                                <property name="expand">False</property>
 
231
+                                <property name="fill">True</property>
 
232
+                                <property name="position">1</property>
 
233
+                              </packing>
 
234
+                            </child>
 
235
+                            <child>
 
236
+                              <object class="GtkLabel" id="strut">
 
237
+                                <property name="visible">True</property>
 
238
+                                <property name="can_focus">False</property>
 
239
+                                <property name="label"> </property>
 
240
+                              </object>
 
241
+                              <packing>
 
242
+                                <property name="expand">False</property>
 
243
+                                <property name="fill">True</property>
 
244
+                                <property name="position">1</property>
 
245
+                              </packing>
 
246
+                            </child>
 
247
+                          </object>
 
248
+                          <packing>
 
249
+                            <property name="expand">True</property>
 
250
+                            <property name="fill">True</property>
 
251
+                            <property name="position">0</property>
 
252
+                          </packing>
 
253
+                        </child>
 
254
+                        <child>
 
255
+                          <object class="GtkHBox" id="edit-hbox">
 
256
+                            <property name="visible">True</property>
 
257
+                            <property name="can_focus">False</property>
 
258
+                            <property name="spacing">6</property>
 
259
+                            <child>
 
260
+                              <object class="GtkColorButton" id="style-pcolor">
 
261
+                                <property name="use_action_appearance">False</property>
 
262
+                                <property name="visible">True</property>
 
263
+                                <property name="can_focus">True</property>
 
264
+                                <property name="receives_default">True</property>
 
265
+                                <property name="use_action_appearance">False</property>
 
266
+                                <property name="color">#000000000000</property>
 
267
+                              </object>
 
268
+                              <packing>
 
269
+                                <property name="expand">False</property>
 
270
+                                <property name="fill">False</property>
 
271
+                                <property name="position">0</property>
 
272
+                              </packing>
 
273
+                            </child>
 
274
+                            <child>
 
275
+                              <object class="GtkButton" id="swap-color-button">
 
276
+                                <property name="use_action_appearance">False</property>
 
277
+                                <property name="visible">True</property>
 
278
+                                <property name="can_focus">True</property>
 
279
+                                <property name="receives_default">True</property>
 
280
+                                <property name="use_action_appearance">False</property>
 
281
+                                <child>
 
282
+                                  <object class="GtkImage" id="image1">
 
283
+                                    <property name="visible">True</property>
 
284
+                                    <property name="can_focus">False</property>
 
285
+                                    <property name="icon_name">object-flip-horizontal-symbolic</property>
 
286
+                                  </object>
 
287
+                                </child>
 
288
+                              </object>
 
289
+                              <packing>
 
290
+                                <property name="expand">False</property>
 
291
+                                <property name="fill">False</property>
 
292
+                                <property name="position">1</property>
 
293
+                              </packing>
 
294
+                            </child>
 
295
+                            <child>
 
296
+                              <object class="GtkColorButton" id="style-scolor">
 
297
+                                <property name="use_action_appearance">False</property>
 
298
+                                <property name="visible">True</property>
 
299
+                                <property name="can_focus">True</property>
 
300
+                                <property name="receives_default">True</property>
 
301
+                                <property name="use_action_appearance">False</property>
 
302
+                                <property name="color">#000000000000</property>
 
303
+                              </object>
 
304
+                              <packing>
 
305
+                                <property name="expand">False</property>
 
306
+                                <property name="fill">False</property>
 
307
+                                <property name="position">2</property>
 
308
+                              </packing>
 
309
+                            </child>
 
310
+                            <child>
 
311
+                              <object class="GtkComboBox" id="style-combobox">
 
312
+                                <property name="visible">True</property>
 
313
+                                <property name="can_focus">False</property>
 
314
+                                <property name="model">style-liststore</property>
 
315
+                                <property name="active">0</property>
 
316
+                                <child>
 
317
+                                  <object class="GtkCellRendererText" id="cellrenderertext1"/>
 
318
+                                  <attributes>
 
319
+                                    <attribute name="text">0</attribute>
 
320
+                                  </attributes>
 
321
+                                </child>
 
322
+                              </object>
 
323
+                              <packing>
 
324
+                                <property name="expand">False</property>
 
325
+                                <property name="fill">False</property>
 
326
+                                <property name="pack_type">end</property>
 
327
+                                <property name="position">3</property>
 
328
+                              </packing>
 
329
+                            </child>
 
330
+                          </object>
 
331
+                          <packing>
 
332
+                            <property name="expand">False</property>
 
333
+                            <property name="fill">False</property>
 
334
+                            <property name="pack_type">end</property>
 
335
+                            <property name="position">1</property>
 
336
+                          </packing>
 
337
+                        </child>
 
338
+                      </object>
 
339
+                      <packing>
 
340
+                        <property name="expand">False</property>
 
341
+                        <property name="fill">True</property>
 
342
+                        <property name="position">3</property>
 
343
+                      </packing>
 
344
+                    </child>
 
345
                   </object>
 
346
-                  <attributes>
 
347
-                    <attribute name="gicon">0</attribute>
 
348
-                  </attributes>
 
349
+                  <packing>
 
350
+                    <property name="expand">True</property>
 
351
+                    <property name="fill">True</property>
 
352
+                    <property name="position">0</property>
 
353
+                  </packing>
 
354
                 </child>
 
355
                 <child>
 
356
-                  <!-- this cell renderer is here just to have
 
357
-                       the text spoken in orca -->
 
358
-                  <object class="GtkCellRendererText" id="text-renderer">
 
359
-                    <property name="visible">False</property>
 
360
+                  <object class="GtkVBox" id="vbox2">
 
361
+                    <property name="visible">True</property>
 
362
+                    <property name="can_focus">False</property>
 
363
+                    <child>
 
364
+                      <object class="GtkComboBox" id="sources-combobox">
 
365
+                        <property name="visible">True</property>
 
366
+                        <property name="can_focus">False</property>
 
367
+                        <property name="model">sources-liststore</property>
 
368
+                        <child>
 
369
+                          <object class="GtkCellRendererText" id="cellrenderertext2"/>
 
370
+                          <attributes>
 
371
+                            <attribute name="text">0</attribute>
 
372
+                          </attributes>
 
373
+                        </child>
 
374
+                      </object>
 
375
+                      <packing>
 
376
+                        <property name="expand">False</property>
 
377
+                        <property name="fill">True</property>
 
378
+                        <property name="position">0</property>
 
379
+                      </packing>
 
380
+                    </child>
 
381
+                    <child>
 
382
+                      <object class="GtkScrolledWindow" id="scrolledwindow1">
 
383
+                        <property name="width_request">220</property>
 
384
+                        <property name="height_request">380</property>
 
385
+                        <property name="visible">True</property>
 
386
+                        <property name="can_focus">True</property>
 
387
+                        <property name="shadow_type">in</property>
 
388
+                        <child>
 
389
+                          <object class="GtkIconView" id="backgrounds-iconview">
 
390
+                            <property name="visible">True</property>
 
391
+                            <property name="can_focus">True</property>
 
392
+                            <property name="row_spacing">0</property>
 
393
+                            <property name="column_spacing">0</property>
 
394
+                            <child>
 
395
+                              <object class="GtkCellRendererPixbuf" id="pixbuf-renderer">
 
396
+                                <property name="stock_size">6</property>
 
397
+                              </object>
 
398
+                              <attributes>
 
399
+                                <attribute name="gicon">0</attribute>
 
400
+                              </attributes>
 
401
+                            </child>
 
402
+                            <child>
 
403
+                              <object class="GtkCellRendererText" id="text-renderer">
 
404
+                                <property name="visible">False</property>
 
405
+                              </object>
 
406
+                              <attributes>
 
407
+                                <attribute name="text">2</attribute>
 
408
+                              </attributes>
 
409
+                            </child>
 
410
+                          </object>
 
411
+                        </child>
 
412
+                      </object>
 
413
+                      <packing>
 
414
+                        <property name="expand">True</property>
 
415
+                        <property name="fill">True</property>
 
416
+                        <property name="position">1</property>
 
417
+                      </packing>
 
418
+                    </child>
 
419
+                    <child>
 
420
+                      <object class="GtkToolbar" id="toolbar1">
 
421
+                        <property name="visible">True</property>
 
422
+                        <property name="can_focus">False</property>
 
423
+                        <property name="icon_size">1</property>
 
424
+                        <style>
 
425
+                          <class name="inline-toolbar"/>
 
426
+                        </style>
 
427
+                        <child>
 
428
+                          <object class="GtkToolButton" id="add_button">
 
429
+                            <property name="use_action_appearance">False</property>
 
430
+                            <property name="visible">True</property>
 
431
+                            <property name="can_focus">False</property>
 
432
+                            <property name="use_action_appearance">False</property>
 
433
+                            <property name="label" translatable="yes">Add wallpaper</property>
 
434
+                            <property name="use_underline">True</property>
 
435
+                            <property name="icon_name">list-add-symbolic</property>
 
436
+                          </object>
 
437
+                          <packing>
 
438
+                            <property name="expand">False</property>
 
439
+                            <property name="homogeneous">True</property>
 
440
+                          </packing>
 
441
+                        </child>
 
442
+                        <child>
 
443
+                          <object class="GtkToolButton" id="remove_button">
 
444
+                            <property name="use_action_appearance">False</property>
 
445
+                            <property name="visible">True</property>
 
446
+                            <property name="sensitive">False</property>
 
447
+                            <property name="can_focus">False</property>
 
448
+                            <property name="use_action_appearance">False</property>
 
449
+                            <property name="label" translatable="yes">Remove wallpaper</property>
 
450
+                            <property name="use_underline">True</property>
 
451
+                            <property name="icon_name">list-remove-symbolic</property>
 
452
+                          </object>
 
453
+                          <packing>
 
454
+                            <property name="expand">False</property>
 
455
+                            <property name="homogeneous">True</property>
 
456
+                          </packing>
 
457
+                        </child>
 
458
+                      </object>
 
459
+                      <packing>
 
460
+                        <property name="expand">False</property>
 
461
+                        <property name="fill">True</property>
 
462
+                        <property name="position">3</property>
 
463
+                      </packing>
 
464
+                    </child>
 
465
                   </object>
 
466
-                  <attributes>
 
467
-                    <attribute name="text">2</attribute>
 
468
-                  </attributes>
 
469
+                  <packing>
 
470
+                    <property name="expand">False</property>
 
471
+                    <property name="fill">True</property>
 
472
+                    <property name="position">1</property>
 
473
+                  </packing>
 
474
                 </child>
 
475
               </object>
 
476
-            </child>
 
477
-          </object>
 
478
-          <packing>
 
479
-            <property name="expand">True</property>
 
480
-            <property name="fill">True</property>
 
481
-            <property name="position">1</property>
 
482
-          </packing>
 
483
-        </child>
 
484
-        <child>
 
485
-          <object class="GtkToolbar" id="toolbar1">
 
486
-            <property name="visible">True</property>
 
487
-            <property name="can_focus">False</property>
 
488
-            <property name="icon_size">1</property>
 
489
-            <style>
 
490
-              <class name="inline-toolbar"/>
 
491
-            </style>
 
492
-            <child>
 
493
-              <object class="GtkToolButton" id="add_button">
 
494
-                <property name="visible">True</property>
 
495
-                <property name="label" translatable="yes">Add wallpaper</property>
 
496
-                <property name="use_action_appearance">False</property>
 
497
-                <property name="use_underline">True</property>
 
498
-                <property name="icon_name">list-add-symbolic</property>
 
499
-              </object>
 
500
               <packing>
 
501
                 <property name="expand">False</property>
 
502
-                <property name="homogeneous">True</property>
 
503
+                <property name="fill">True</property>
 
504
+                <property name="position">0</property>
 
505
               </packing>
 
506
             </child>
 
507
             <child>
 
508
-              <object class="GtkToolButton" id="remove_button">
 
509
+              <object class="GtkSeparator" id="separator1">
 
510
                 <property name="visible">True</property>
 
511
-                <property name="label" translatable="yes">Remove wallpaper</property>
 
512
-                <property name="use_action_appearance">False</property>
 
513
-                <property name="use_underline">True</property>
 
514
-                <property name="icon_name">list-remove-symbolic</property>
 
515
-                <property name="sensitive">False</property>
 
516
+                <property name="can_focus">False</property>
 
517
+                <property name="margin_left">5</property>
 
518
+                <property name="margin_right">5</property>
 
519
               </object>
 
520
               <packing>
 
521
                 <property name="expand">False</property>
 
522
-                <property name="homogeneous">True</property>
 
523
+                <property name="fill">True</property>
 
524
+                <property name="position">1</property>
 
525
               </packing>
 
526
             </child>
 
527
-          </object>
 
528
-          <packing>
 
529
-            <property name="expand">False</property>
 
530
-            <property name="fill">True</property>
 
531
-            <property name="position">2</property>
 
532
-          </packing>
 
533
-        </child>
 
534
-      </object>
 
535
-      <packing>
 
536
-        <property name="expand">False</property>
 
537
-        <property name="fill">True</property>
 
538
-        <property name="position">0</property>
 
539
-      </packing>
 
540
-    </child>
 
541
-    <child>
 
542
-      <object class="GtkVBox" id="vbox3">
 
543
-        <property name="visible">True</property>
 
544
-        <property name="can_focus">False</property>
 
545
-        <property name="spacing">6</property>
 
546
-        <child>
 
547
-          <object class="GtkHBox" id="heading-hbox">
 
548
-            <property name="visible">True</property>
 
549
-            <property name="can_focus">False</property>
 
550
-            <property name="spacing">24</property>
 
551
             <child>
 
552
-              <object class="GtkLabel" id="background-label">
 
553
+              <object class="GtkBox" id="theme-box">
 
554
                 <property name="visible">True</property>
 
555
                 <property name="can_focus">False</property>
 
556
-                <property name="xalign">0</property>
 
557
-                <property name="label">Current background</property>
 
558
-                <attributes>
 
559
-                  <attribute name="weight" value="bold"/>
 
560
-                </attributes>
 
561
+                <property name="margin_bottom">8</property>
 
562
+                <property name="spacing">12</property>
 
563
+                <child>
 
564
+                  <object class="GtkLabel" id="theme-label">
 
565
+                    <property name="visible">True</property>
 
566
+                    <property name="can_focus">False</property>
 
567
+                    <property name="xalign">0</property>
 
568
+                    <property name="xpad">6</property>
 
569
+                    <property name="label" translatable="yes">&lt;b&gt;Theme&lt;/b&gt;</property>
 
570
+                    <property name="use_markup">True</property>
 
571
+                  </object>
 
572
+                  <packing>
 
573
+                    <property name="expand">False</property>
 
574
+                    <property name="fill">True</property>
 
575
+                    <property name="padding">6</property>
 
576
+                    <property name="position">0</property>
 
577
+                  </packing>
 
578
+                </child>
 
579
+                <child>
 
580
+                  <object class="GtkComboBoxText" id="theme-selector">
 
581
+                    <property name="width_request">220</property>
 
582
+                    <property name="visible">True</property>
 
583
+                    <property name="can_focus">False</property>
 
584
+                    <property name="entry_text_column">0</property>
 
585
+                    <property name="id_column">1</property>
 
586
+                  </object>
 
587
+                  <packing>
 
588
+                    <property name="expand">False</property>
 
589
+                    <property name="fill">True</property>
 
590
+                    <property name="padding">9</property>
 
591
+                    <property name="pack_type">end</property>
 
592
+                    <property name="position">1</property>
 
593
+                  </packing>
 
594
+                </child>
 
595
               </object>
 
596
               <packing>
 
597
                 <property name="expand">False</property>
 
598
-                <property name="position">0</property>
 
599
+                <property name="fill">True</property>
 
600
+                <property name="position">2</property>
 
601
               </packing>
 
602
             </child>
 
603
             <child>
 
604
-              <object class="GtkLabel" id="size_label">
 
605
+              <object class="GtkSeparator" id="unity-separator1">
 
606
                 <property name="visible">True</property>
 
607
-                <property name="xalign">1</property>
 
608
-                <property name="label">1280x700px</property>
 
609
+                <property name="can_focus">False</property>
 
610
+                <property name="margin_left">5</property>
 
611
+                <property name="margin_right">5</property>
 
612
               </object>
 
613
               <packing>
 
614
-                <property name="position">1</property>
 
615
+                <property name="expand">False</property>
 
616
+                <property name="fill">True</property>
 
617
+                <property name="position">3</property>
 
618
               </packing>
 
619
             </child>
 
620
-          </object>
 
621
-          <packing>
 
622
-            <property name="expand">False</property>
 
623
-            <property name="position">0</property>
 
624
-          </packing>
 
625
-        </child>
 
626
-        <child>
 
627
-          <object class="GtkDrawingArea" id="preview-area">
 
628
-            <property name="visible">True</property>
 
629
-          </object>
 
630
-          <packing>
 
631
-            <property name="position">1</property>
 
632
-          </packing>
 
633
-        </child>
 
634
-        <child>
 
635
-          <object class="GtkHBox" id="bottom-hbox">
 
636
-            <property name="visible">True</property>
 
637
-            <property name="spacing">12</property>
 
638
             <child>
 
639
-              <object class="GtkHBox" id="hbox2">
 
640
+              <object class="GtkBox" id="unity-iconsize-box">
 
641
                 <property name="visible">True</property>
 
642
-                <property name="spacing">2</property>
 
643
-                <child>
 
644
-                  <object class="GtkImage" id="slide_image">
 
645
-                    <property name="visible">True</property>
 
646
-                    <property name="icon_name">slideshow-symbolic</property>
 
647
-                  </object>
 
648
-                  <packing>
 
649
-                    <property name="expand">False</property>
 
650
-                    <property name="position">0</property>
 
651
-                  </packing>
 
652
-                </child>
 
653
+                <property name="can_focus">False</property>
 
654
+                <property name="spacing">12</property>
 
655
                 <child>
 
656
-                  <object class="GtkLabel" id="slide-label">
 
657
+                  <object class="GtkLabel" id="unity-iconsize-label">
 
658
                     <property name="visible">True</property>
 
659
+                    <property name="can_focus">False</property>
 
660
                     <property name="xalign">0</property>
 
661
-                    <property name="label" translatable="yes" comments="This refers to a slideshow background">Changes throughout the day</property>
 
662
+                    <property name="xpad">6</property>
 
663
+                    <property name="label" translatable="yes">&lt;b&gt;Launcher icon size&lt;/b&gt;</property>
 
664
+                    <property name="use_markup">True</property>
 
665
                   </object>
 
666
                   <packing>
 
667
                     <property name="expand">False</property>
 
668
-                    <property name="position">1</property>
 
669
+                    <property name="fill">True</property>
 
670
+                    <property name="padding">6</property>
 
671
+                    <property name="position">0</property>
 
672
                   </packing>
 
673
                 </child>
 
674
                 <child>
 
675
-                  <object class="GtkLabel" id="strut">
 
676
+                  <object class="GtkScale" id="unity-iconsize-scale">
 
677
+                    <property name="width_request">250</property>
 
678
                     <property name="visible">True</property>
 
679
-                    <property name="label" translatable="no"> </property>
 
680
+                    <property name="can_focus">True</property>
 
681
+                    <property name="round_digits">0</property>
 
682
+                    <property name="digits">0</property>
 
683
+                    <property name="value_pos">left</property>
 
684
                   </object>
 
685
                   <packing>
 
686
                     <property name="expand">False</property>
 
687
+                    <property name="fill">True</property>
 
688
+                    <property name="padding">9</property>
 
689
+                    <property name="pack_type">end</property>
 
690
                     <property name="position">1</property>
 
691
                   </packing>
 
692
                 </child>
 
693
               </object>
 
694
               <packing>
 
695
-                <property name="position">0</property>
 
696
+                <property name="expand">False</property>
 
697
+                <property name="fill">True</property>
 
698
+                <property name="position">4</property>
 
699
+              </packing>
 
700
+            </child>
 
701
+            <child>
 
702
+              <object class="GtkSeparator" id="separator2">
 
703
+                <property name="visible">True</property>
 
704
+                <property name="can_focus">False</property>
 
705
+                <property name="margin_left">5</property>
 
706
+                <property name="margin_right">5</property>
 
707
+              </object>
 
708
+              <packing>
 
709
+                <property name="expand">False</property>
 
710
+                <property name="fill">True</property>
 
711
+                <property name="position">5</property>
 
712
               </packing>
 
713
             </child>
 
714
             <child>
 
715
-              <object class="GtkHBox" id="edit-hbox">
 
716
+              <object class="GtkBox" id="box2">
 
717
+                <property name="height_request">36</property>
 
718
                 <property name="visible">True</property>
 
719
-                <property name="spacing">6</property>
 
720
+                <property name="can_focus">False</property>
 
721
                 <child>
 
722
-                  <object class="GtkColorButton" id="style-pcolor">
 
723
+                  <object class="GtkButton" id="button-restore">
 
724
+                    <property name="label" translatable="yes">Restore defaults</property>
 
725
+                    <property name="use_action_appearance">False</property>
 
726
+                    <property name="width_request">136</property>
 
727
                     <property name="visible">True</property>
 
728
                     <property name="can_focus">True</property>
 
729
                     <property name="receives_default">True</property>
 
730
-                    <property name="color">#000000000000</property>
 
731
+                    <property name="use_action_appearance">False</property>
 
732
                   </object>
 
733
                   <packing>
 
734
                     <property name="expand">False</property>
 
735
-                    <property name="fill">False</property>
 
736
+                    <property name="fill">True</property>
 
737
+                    <property name="padding">10</property>
 
738
                     <property name="position">0</property>
 
739
                   </packing>
 
740
                 </child>
 
741
                 <child>
 
742
-                  <object class="GtkButton" id="swap-color-button">
 
743
+                  <placeholder/>
 
744
+                </child>
 
745
+              </object>
 
746
+              <packing>
 
747
+                <property name="expand">False</property>
 
748
+                <property name="fill">True</property>
 
749
+                <property name="position">6</property>
 
750
+              </packing>
 
751
+            </child>
 
752
+          </object>
 
753
+        </child>
 
754
+        <child type="tab">
 
755
+          <object class="GtkLabel" id="appearance_label">
 
756
+            <property name="visible">True</property>
 
757
+            <property name="can_focus">False</property>
 
758
+            <property name="label" translatable="yes">Appearance</property>
 
759
+          </object>
 
760
+          <packing>
 
761
+            <property name="tab_fill">False</property>
 
762
+          </packing>
 
763
+        </child>
 
764
+        <child>
 
765
+          <object class="GtkBox" id="unity-behavior">
 
766
+            <property name="visible">True</property>
 
767
+            <property name="can_focus">False</property>
 
768
+            <property name="margin_top">3</property>
 
769
+            <property name="margin_bottom">3</property>
 
770
+            <property name="orientation">vertical</property>
 
771
+            <property name="spacing">3</property>
 
772
+            <child>
 
773
+              <object class="GtkBox" id="box3">
 
774
+                <property name="visible">True</property>
 
775
+                <property name="can_focus">False</property>
 
776
+                <property name="border_width">10</property>
 
777
+                <property name="spacing">12</property>
 
778
+                <child>
 
779
+                  <object class="GtkBox" id="box4">
 
780
                     <property name="visible">True</property>
 
781
-                    <property name="can_focus">True</property>
 
782
-                    <property name="receives_default">True</property>
 
783
-                    <property name="use_action_appearance">False</property>
 
784
+                    <property name="can_focus">False</property>
 
785
+                    <property name="orientation">vertical</property>
 
786
+                    <child>
 
787
+                      <object class="GtkLabel" id="label4">
 
788
+                        <property name="visible">True</property>
 
789
+                        <property name="can_focus">False</property>
 
790
+                        <property name="xalign">0</property>
 
791
+                        <property name="label" translatable="yes">&lt;b&gt;Auto-hide the Launcher&lt;/b&gt;</property>
 
792
+                        <property name="use_markup">True</property>
 
793
+                      </object>
 
794
+                      <packing>
 
795
+                        <property name="expand">False</property>
 
796
+                        <property name="fill">True</property>
 
797
+                        <property name="position">0</property>
 
798
+                      </packing>
 
799
+                    </child>
 
800
+                    <child>
 
801
+                      <object class="GtkLabel" id="label2">
 
802
+                        <property name="visible">True</property>
 
803
+                        <property name="can_focus">False</property>
 
804
+                        <property name="label" translatable="yes">&lt;span size="small"&gt;The launcher will reveal when moving the pointer to the defined hot spot.&lt;/span&gt;</property>
 
805
+                        <property name="use_markup">True</property>
 
806
+                      </object>
 
807
+                      <packing>
 
808
+                        <property name="expand">False</property>
 
809
+                        <property name="fill">True</property>
 
810
+                        <property name="position">1</property>
 
811
+                      </packing>
 
812
+                    </child>
 
813
                     <child>
 
814
-                      <object class="GtkImage" id="image1">
 
815
+                      <object class="GtkBox" id="box1">
 
816
                         <property name="visible">True</property>
 
817
                         <property name="can_focus">False</property>
 
818
-                        <property name="icon_name">object-flip-horizontal-symbolic</property>
 
819
+                        <property name="margin_left">10</property>
 
820
+                        <property name="margin_top">17</property>
 
821
+                        <property name="orientation">vertical</property>
 
822
+                        <child>
 
823
+                          <object class="GtkLabel" id="unity_reveal_label">
 
824
+                            <property name="visible">True</property>
 
825
+                            <property name="can_focus">False</property>
 
826
+                            <property name="xalign">0</property>
 
827
+                            <property name="label" translatable="yes">Reveal spot:</property>
 
828
+                          </object>
 
829
+                          <packing>
 
830
+                            <property name="expand">False</property>
 
831
+                            <property name="fill">True</property>
 
832
+                            <property name="position">0</property>
 
833
+                          </packing>
 
834
+                        </child>
 
835
+                        <child>
 
836
+                          <object class="GtkRadioButton" id="unity_reveal_spot_left">
 
837
+                            <property name="label" translatable="yes">Left side</property>
 
838
+                            <property name="use_action_appearance">False</property>
 
839
+                            <property name="visible">True</property>
 
840
+                            <property name="can_focus">True</property>
 
841
+                            <property name="receives_default">False</property>
 
842
+                            <property name="use_action_appearance">False</property>
 
843
+                            <property name="xalign">0</property>
 
844
+                            <property name="active">True</property>
 
845
+                            <property name="draw_indicator">True</property>
 
846
+                          </object>
 
847
+                          <packing>
 
848
+                            <property name="expand">False</property>
 
849
+                            <property name="fill">True</property>
 
850
+                            <property name="position">1</property>
 
851
+                          </packing>
 
852
+                        </child>
 
853
+                        <child>
 
854
+                          <object class="GtkRadioButton" id="unity_reveal_spot_topleft">
 
855
+                            <property name="label" translatable="yes">Top left corner</property>
 
856
+                            <property name="use_action_appearance">False</property>
 
857
+                            <property name="visible">True</property>
 
858
+                            <property name="can_focus">True</property>
 
859
+                            <property name="receives_default">False</property>
 
860
+                            <property name="use_action_appearance">False</property>
 
861
+                            <property name="xalign">0</property>
 
862
+                            <property name="active">True</property>
 
863
+                            <property name="draw_indicator">True</property>
 
864
+                            <property name="group">unity_reveal_spot_left</property>
 
865
+                          </object>
 
866
+                          <packing>
 
867
+                            <property name="expand">False</property>
 
868
+                            <property name="fill">True</property>
 
869
+                            <property name="position">2</property>
 
870
+                          </packing>
 
871
+                        </child>
 
872
+                        <child>
 
873
+                          <object class="GtkRadioButton" id="unity_reveal_spot_otheroption">
 
874
+                            <property name="label" translatable="yes">Other reveal option</property>
 
875
+                            <property name="use_action_appearance">False</property>
 
876
+                            <property name="can_focus">True</property>
 
877
+                            <property name="receives_default">False</property>
 
878
+                            <property name="no_show_all">True</property>
 
879
+                            <property name="use_action_appearance">False</property>
 
880
+                            <property name="xalign">0</property>
 
881
+                            <property name="draw_indicator">True</property>
 
882
+                            <property name="group">unity_reveal_spot_left</property>
 
883
+                          </object>
 
884
+                          <packing>
 
885
+                            <property name="expand">False</property>
 
886
+                            <property name="fill">True</property>
 
887
+                            <property name="position">3</property>
 
888
+                          </packing>
 
889
+                        </child>
 
890
                       </object>
 
891
+                      <packing>
 
892
+                        <property name="expand">False</property>
 
893
+                        <property name="fill">True</property>
 
894
+                        <property name="position">2</property>
 
895
+                      </packing>
 
896
                     </child>
 
897
                   </object>
 
898
                   <packing>
 
899
                     <property name="expand">False</property>
 
900
-                    <property name="fill">False</property>
 
901
-                    <property name="position">1</property>
 
902
+                    <property name="fill">True</property>
 
903
+                    <property name="padding">5</property>
 
904
+                    <property name="position">0</property>
 
905
                   </packing>
 
906
                 </child>
 
907
                 <child>
 
908
-                  <object class="GtkComboBox" id="style-combobox">
 
909
+                  <object class="GtkBox" id="box6">
 
910
                     <property name="visible">True</property>
 
911
-                    <property name="model">style-liststore</property>
 
912
-                    <property name="active">0</property>
 
913
+                    <property name="can_focus">False</property>
 
914
+                    <property name="orientation">vertical</property>
 
915
+                    <child>
 
916
+                      <object class="GtkSwitch" id="unity_launcher_autohide">
 
917
+                        <property name="use_action_appearance">False</property>
 
918
+                        <property name="visible">True</property>
 
919
+                        <property name="can_focus">True</property>
 
920
+                        <property name="use_action_appearance">False</property>
 
921
+                        <property name="active">True</property>
 
922
+                      </object>
 
923
+                      <packing>
 
924
+                        <property name="expand">False</property>
 
925
+                        <property name="fill">True</property>
 
926
+                        <property name="position">0</property>
 
927
+                      </packing>
 
928
+                    </child>
 
929
                     <child>
 
930
-                      <object class="GtkCellRendererText" id="cellrenderertext1"/>
 
931
-                      <attributes>
 
932
-                        <attribute name="text">0</attribute>
 
933
-                      </attributes>
 
934
+                      <placeholder/>
 
935
                     </child>
 
936
                   </object>
 
937
                   <packing>
 
938
                     <property name="expand">False</property>
 
939
                     <property name="fill">False</property>
 
940
                     <property name="pack_type">end</property>
 
941
-                    <property name="position">3</property>
 
942
+                    <property name="position">1</property>
 
943
                   </packing>
 
944
                 </child>
 
945
+              </object>
 
946
+              <packing>
 
947
+                <property name="expand">False</property>
 
948
+                <property name="fill">True</property>
 
949
+                <property name="position">0</property>
 
950
+              </packing>
 
951
+            </child>
 
952
+            <child>
 
953
+              <object class="GtkSeparator" id="separator3">
 
954
+                <property name="visible">True</property>
 
955
+                <property name="can_focus">False</property>
 
956
+              </object>
 
957
+              <packing>
 
958
+                <property name="expand">False</property>
 
959
+                <property name="fill">True</property>
 
960
+                <property name="position">1</property>
 
961
+              </packing>
 
962
+            </child>
 
963
+            <child>
 
964
+              <object class="GtkBox" id="box5">
 
965
+                <property name="height_request">36</property>
 
966
+                <property name="visible">True</property>
 
967
+                <property name="can_focus">False</property>
 
968
                 <child>
 
969
-                  <object class="GtkColorButton" id="style-scolor">
 
970
+                  <object class="GtkButton" id="button-restore-unitybehavior">
 
971
+                    <property name="label" translatable="yes">Restore defaults</property>
 
972
+                    <property name="use_action_appearance">False</property>
 
973
+                    <property name="width_request">136</property>
 
974
                     <property name="visible">True</property>
 
975
                     <property name="can_focus">True</property>
 
976
                     <property name="receives_default">True</property>
 
977
                     <property name="use_action_appearance">False</property>
 
978
-                    <property name="color">#000000000000</property>
 
979
                   </object>
 
980
                   <packing>
 
981
                     <property name="expand">False</property>
 
982
-                    <property name="fill">False</property>
 
983
-                    <property name="position">2</property>
 
984
+                    <property name="fill">True</property>
 
985
+                    <property name="padding">10</property>
 
986
+                    <property name="position">0</property>
 
987
                   </packing>
 
988
                 </child>
 
989
+                <child>
 
990
+                  <placeholder/>
 
991
+                </child>
 
992
               </object>
 
993
               <packing>
 
994
                 <property name="expand">False</property>
 
995
-                <property name="fill">False</property>
 
996
-                <property name="pack_type">end</property>
 
997
-                <property name="position">1</property>
 
998
+                <property name="fill">True</property>
 
999
+                <property name="position">2</property>
 
1000
               </packing>
 
1001
             </child>
 
1002
+            <child>
 
1003
+              <placeholder/>
 
1004
+            </child>
 
1005
+            <child>
 
1006
+              <placeholder/>
 
1007
+            </child>
 
1008
           </object>
 
1009
           <packing>
 
1010
-            <property name="expand">False</property>
 
1011
-            <property name="position">2</property>
 
1012
+            <property name="position">1</property>
 
1013
+          </packing>
 
1014
+        </child>
 
1015
+        <child type="tab">
 
1016
+          <object class="GtkLabel" id="behavior_label">
 
1017
+            <property name="visible">True</property>
 
1018
+            <property name="can_focus">False</property>
 
1019
+            <property name="label" translatable="yes">Behavior</property>
 
1020
+          </object>
 
1021
+          <packing>
 
1022
+            <property name="position">1</property>
 
1023
+            <property name="tab_fill">False</property>
 
1024
           </packing>
 
1025
         </child>
 
1026
       </object>
 
1027
-      <packing>
 
1028
-        <property name="position">1</property>
 
1029
-      </packing>
 
1030
     </child>
 
1031
   </object>
 
1032
   <object class="GtkSizeGroup" id="sizegroup">
 
1033
@@ -322,38 +837,4 @@
 
1034
       <widget name="strut"/>
 
1035
     </widgets>
 
1036
   </object>
 
1037
-  <object class="GtkListStore" id="style-liststore">
 
1038
-    <columns>
 
1039
-      <!-- column-name name -->
 
1040
-      <column type="gchararray"/>
 
1041
-      <!-- column-name value -->
 
1042
-      <column type="gint"/>
 
1043
-    </columns>
 
1044
-    <data>
 
1045
-      <row>
 
1046
-        <col id="0" translatable="yes">Tile</col>
 
1047
-        <col id="1">1</col>
 
1048
-      </row>
 
1049
-      <row>
 
1050
-        <col id="0" translatable="yes">Zoom</col>
 
1051
-        <col id="1">5</col>
 
1052
-      </row>
 
1053
-      <row>
 
1054
-        <col id="0" translatable="yes">Center</col>
 
1055
-        <col id="1">2</col>
 
1056
-      </row>
 
1057
-      <row>
 
1058
-        <col id="0" translatable="yes">Scale</col>
 
1059
-        <col id="1">3</col>
 
1060
-      </row>
 
1061
-      <row>
 
1062
-        <col id="0" translatable="yes">Fill</col>
 
1063
-        <col id="1">4</col>
 
1064
-      </row>
 
1065
-      <row>
 
1066
-        <col id="0" translatable="yes">Span</col>
 
1067
-        <col id="1">6</col>
 
1068
-      </row>
 
1069
-    </data>
 
1070
-  </object>
 
1071
 </interface>
 
1072
Index: gnome-control-center-3.2.2/panels/background/cc-background-panel.c
 
1073
===================================================================
 
1074
--- gnome-control-center-3.2.2.orig/panels/background/cc-background-panel.c     2011-11-08 21:20:01.000000000 +0100
 
1075
+++ gnome-control-center-3.2.2/panels/background/cc-background-panel.c  2012-01-26 10:14:05.075211641 +0100
 
1076
@@ -24,6 +24,7 @@
 
1077
 #include <string.h>
 
1078
 #include <glib/gi18n-lib.h>
 
1079
 #include <gdesktop-enums.h>
 
1080
+#include <gconf/gconf-client.h>
 
1081
 
 
1082
 #include "cc-background-panel.h"
 
1083
 #include "bg-wallpapers-source.h"
 
1084
@@ -69,6 +70,8 @@
 
1085
 #endif
 
1086
 
 
1087
   GSettings *settings;
 
1088
+  GSettings *interface_settings;
 
1089
+  GSettings *unity2d_settings;
 
1090
 
 
1091
   GnomeDesktopThumbnailFactory *thumb_factory;
 
1092
 
 
1093
@@ -81,6 +84,8 @@
 
1094
 
 
1095
   GdkPixbuf *display_base;
 
1096
   GdkPixbuf *display_overlay;
 
1097
+
 
1098
+  GSList *gconf_notify_id;
 
1099
 };
 
1100
 
 
1101
 enum
 
1102
@@ -93,6 +98,12 @@
 
1103
 #endif
 
1104
 };
 
1105
 
 
1106
+#define UNITY_KEYS "/apps/compiz-1/plugins/unityshell"
 
1107
+#define UNITY_ICONSIZE_KEY UNITY_KEYS"/screen0/options/icon_size"
 
1108
+#define UNITY_GCONF_OPTION_PATH "/apps/compiz-1/plugins/unityshell/screen0/options"
 
1109
+#define UNITY_LAUNCHERHIDE_KEY UNITY_GCONF_OPTION_PATH"/launcher_hide_mode"
 
1110
+#define UNITY_LAUNCHERREVEAL_KEY UNITY_GCONF_OPTION_PATH"/launcher_reveal_edge"
 
1111
+#define UNITY2D_GSETTINGS_LAUNCHER "com.canonical.Unity2d.Launcher"
 
1112
 
 
1113
 #define WID(y) (GtkWidget *) gtk_builder_get_object (priv->builder, y)
 
1114
 
 
1115
@@ -126,6 +137,10 @@
 
1116
 cc_background_panel_dispose (GObject *object)
 
1117
 {
 
1118
   CcBackgroundPanelPrivate *priv = CC_BACKGROUND_PANEL (object)->priv;
 
1119
+  GConfClient *client;
 
1120
+  GSList* iter;
 
1121
+
 
1122
+  client = gconf_client_get_default ();
 
1123
 
 
1124
   if (priv->builder)
 
1125
     {
 
1126
@@ -167,6 +182,18 @@
 
1127
       priv->settings = NULL;
 
1128
     }
 
1129
 
 
1130
+  if (priv->interface_settings)
 
1131
+    {
 
1132
+      g_object_unref (priv->interface_settings);
 
1133
+      priv->interface_settings = NULL;
 
1134
+    }
 
1135
+
 
1136
+  if (priv->unity2d_settings)
 
1137
+    {
 
1138
+      g_object_unref (priv->unity2d_settings);
 
1139
+      priv->unity2d_settings = NULL;
 
1140
+    }
 
1141
+
 
1142
   if (priv->copy_cancellable)
 
1143
     {
 
1144
       /* cancel any copy operation */
 
1145
@@ -194,6 +221,16 @@
 
1146
       priv->display_overlay = NULL;
 
1147
     }
 
1148
 
 
1149
+  iter = priv->gconf_notify_id;
 
1150
+  while (iter != NULL)
 
1151
+    {
 
1152
+      gconf_client_notify_remove(client, (guint) iter->data);
 
1153
+      iter = g_slist_next (iter);
 
1154
+    }
 
1155
+  g_object_unref (client);
 
1156
+  g_slist_free (priv->gconf_notify_id);
 
1157
+  priv->gconf_notify_id = NULL;
 
1158
+
 
1159
   G_OBJECT_CLASS (cc_background_panel_parent_class)->dispose (object);
 
1160
 }
 
1161
 
 
1162
@@ -341,11 +378,13 @@
 
1163
     {
 
1164
       GdkColor pcolor, scolor;
 
1165
 
 
1166
-      markup = g_strdup_printf ("<b>%s</b>", cc_background_item_get_name (priv->current_background));
 
1167
+      markup = g_strdup_printf ("<i>%s</i>", cc_background_item_get_name (priv->current_background));
 
1168
       gtk_label_set_markup (GTK_LABEL (WID ("background-label")), markup);
 
1169
       g_free (markup);
 
1170
 
 
1171
-      gtk_label_set_text (GTK_LABEL (WID ("size_label")), cc_background_item_get_size (priv->current_background));
 
1172
+      markup = g_strdup_printf ("%s%s%s", "(", cc_background_item_get_size (priv->current_background), ")");
 
1173
+      gtk_label_set_markup (GTK_LABEL (WID ("size_label")), markup);
 
1174
+      g_free (markup);
 
1175
 
 
1176
       gdk_color_parse (cc_background_item_get_pcolor (priv->current_background), &pcolor);
 
1177
       gdk_color_parse (cc_background_item_get_scolor (priv->current_background), &scolor);
 
1178
@@ -1136,12 +1175,412 @@
 
1179
     g_object_set (G_OBJECT (scrolled), "height-request", 280, NULL);
 
1180
 }
 
1181
 
 
1182
+static gchar *themes[] = { "Adwaita", "Ambiance", "Radiance", "HighContrast", "HighContrastInverse" };
 
1183
+
 
1184
+static gboolean
 
1185
+get_theme_data (const gchar *theme_name,
 
1186
+               gchar **gtk_theme,
 
1187
+               gchar **icon_theme,
 
1188
+               gchar **window_theme,
 
1189
+               gchar **cursor_theme)
 
1190
+{
 
1191
+  gchar *path;
 
1192
+  GKeyFile *theme_file;
 
1193
+  GError *error = NULL;
 
1194
+  gboolean result = FALSE;
 
1195
+
 
1196
+  *gtk_theme = *icon_theme = *window_theme = *cursor_theme = NULL;
 
1197
+
 
1198
+  theme_file = g_key_file_new ();
 
1199
+  path = g_build_filename ("/usr/share/themes", theme_name, "index.theme", NULL);
 
1200
+  if (g_key_file_load_from_file (theme_file, path, G_KEY_FILE_NONE, &error))
 
1201
+    {
 
1202
+      *gtk_theme = g_key_file_get_string (theme_file, "X-GNOME-Metatheme", "GtkTheme", NULL);
 
1203
+      *icon_theme = g_key_file_get_string (theme_file, "X-GNOME-Metatheme", "IconTheme", NULL);
 
1204
+      *window_theme = g_key_file_get_string (theme_file, "X-GNOME-Metatheme", "MetacityTheme", NULL);
 
1205
+      *cursor_theme = g_key_file_get_string (theme_file, "X-GNOME-Metatheme", "CursorTheme", NULL);
 
1206
+
 
1207
+      result = TRUE;
 
1208
+    }
 
1209
+  else
 
1210
+    {
 
1211
+      g_warning ("Could not load %s: %s", path, error->message);
 
1212
+      g_error_free (error);
 
1213
+    }
 
1214
+
 
1215
+  g_key_file_free (theme_file);
 
1216
+  g_free (path);
 
1217
+
 
1218
+  return result;
 
1219
+}
 
1220
+
 
1221
+static void
 
1222
+theme_selection_changed (GtkComboBox *combo, CcBackgroundPanel *self)
 
1223
+{
 
1224
+  gint active;
 
1225
+  gchar *gtk_theme, *icon_theme, *window_theme, *cursor_theme;
 
1226
+  GConfClient *client;
 
1227
+
 
1228
+  active = gtk_combo_box_get_active (combo);
 
1229
+  g_return_if_fail (active >= 0 && active < G_N_ELEMENTS (themes));
 
1230
+
 
1231
+  if (!get_theme_data (gtk_combo_box_get_active_id (combo),
 
1232
+                       &gtk_theme, &icon_theme, &window_theme, &cursor_theme))
 
1233
+    return;
 
1234
+
 
1235
+  g_settings_delay (self->priv->interface_settings);
 
1236
+
 
1237
+  g_settings_set_string (self->priv->interface_settings, "gtk-theme", gtk_theme);
 
1238
+  g_settings_set_string (self->priv->interface_settings, "icon-theme", icon_theme);
 
1239
+  g_settings_set_string (self->priv->interface_settings, "cursor-theme", cursor_theme);
 
1240
+
 
1241
+  g_settings_apply (self->priv->interface_settings);
 
1242
+
 
1243
+  /* For metacity, we use GConf */
 
1244
+  client = gconf_client_get_default ();
 
1245
+  gconf_client_set_string (client, "/desktop/gnome/shell/windows/theme", window_theme, NULL);
 
1246
+  gconf_client_set_string (client, "/apps/metacity/general/theme", window_theme, NULL);
 
1247
+
 
1248
+  g_object_unref (client);
 
1249
+  g_free (gtk_theme);
 
1250
+  g_free (icon_theme);
 
1251
+  g_free (window_theme);
 
1252
+  g_free (cursor_theme);
 
1253
+}
 
1254
+
 
1255
+static void
 
1256
+setup_theme_selector (CcBackgroundPanel *self, gboolean init)
 
1257
+{
 
1258
+  gchar *current_gtk_theme;
 
1259
+  gint i, current_theme_index = 0;
 
1260
+  GtkWidget *widget;
 
1261
+  CcBackgroundPanelPrivate *priv = self->priv;
 
1262
+
 
1263
+  priv->interface_settings = g_settings_new ("org.gnome.desktop.interface");
 
1264
+  current_gtk_theme = g_settings_get_string (priv->interface_settings, "gtk-theme");
 
1265
+
 
1266
+  widget = WID ("theme-selector");
 
1267
+  gtk_combo_box_set_id_column (GTK_COMBO_BOX (widget), 0);
 
1268
+
 
1269
+  for (i = 0; i < G_N_ELEMENTS (themes); i++, current_theme_index++)
 
1270
+    {
 
1271
+      gchar *gtk_theme, *icon_theme, *window_theme, *cursor_theme;
 
1272
+
 
1273
+      if (!get_theme_data (themes[i], &gtk_theme, &icon_theme, &window_theme, &cursor_theme))
 
1274
+        {
 
1275
+          current_theme_index--;
 
1276
+          continue;
 
1277
+        }
 
1278
+
 
1279
+      if (init)
 
1280
+        gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (widget), themes[i], themes[i]);
 
1281
+
 
1282
+      if (g_strcmp0 (gtk_theme, current_gtk_theme) == 0)
 
1283
+        {
 
1284
+         /* This is the current theme, so select item in the combo box */
 
1285
+         gtk_combo_box_set_active (GTK_COMBO_BOX (widget), current_theme_index);
 
1286
+       }
 
1287
+
 
1288
+      g_free (gtk_theme);
 
1289
+      g_free (icon_theme);
 
1290
+      g_free (window_theme);
 
1291
+      g_free (cursor_theme);
 
1292
+    }
 
1293
+
 
1294
+  if (init)
 
1295
+    g_signal_connect (G_OBJECT (widget), "changed",
 
1296
+                     G_CALLBACK (theme_selection_changed), self);
 
1297
+}
 
1298
+
 
1299
+static void
 
1300
+iconsize_widget_refresh (GtkAdjustment *iconsize_adj)
 
1301
+{
 
1302
+  gint value = gconf_client_get_int (gconf_client_get_default (), UNITY_ICONSIZE_KEY, NULL);
 
1303
+  gtk_adjustment_set_value (iconsize_adj, (gdouble)value);
 
1304
+}
 
1305
+
 
1306
+static void
 
1307
+ext_iconsize_changed_callback (GConfClient* client,
 
1308
+                               guint cnxn_id,
 
1309
+                               GConfEntry *entry,
 
1310
+                               gpointer user_data)
 
1311
+{
 
1312
+  iconsize_widget_refresh (GTK_ADJUSTMENT (user_data));
 
1313
+}
 
1314
+
 
1315
+static void
 
1316
+on_iconsize_changed (GtkAdjustment *adj, gpointer user_data)
 
1317
+{
 
1318
+  gconf_client_set_int (gconf_client_get_default (), UNITY_ICONSIZE_KEY, (gint)gtk_adjustment_get_value (adj), NULL);
 
1319
+}
 
1320
+
 
1321
+static void
 
1322
+on_restore_defaults_page1_clicked (GtkButton *button, gpointer user_data)
 
1323
+{
 
1324
+  CcBackgroundPanel *self = CC_BACKGROUND_PANEL (user_data);
 
1325
+  CcBackgroundPanelPrivate *priv = self->priv;
 
1326
+  GConfClient *client;
 
1327
+  gchar *current_gtk_theme;
 
1328
+  GtkTreePath *path;
 
1329
+
 
1330
+  /* icon theme */
 
1331
+  g_settings_delay (priv->interface_settings);
 
1332
+  g_settings_reset (priv->interface_settings, "gtk-theme");
 
1333
+  g_settings_reset (priv->interface_settings, "icon-theme");
 
1334
+  g_settings_reset (priv->interface_settings, "cursor-theme");
 
1335
+
 
1336
+  g_settings_apply (priv->interface_settings);
 
1337
+
 
1338
+  /* For metacity, we use GConf (don't unset because there is no defaut set) */
 
1339
+  current_gtk_theme = g_settings_get_string (priv->interface_settings, "gtk-theme");
 
1340
+  client = gconf_client_get_default ();
 
1341
+  gconf_client_set_string (client, "/desktop/gnome/shell/windows/theme",  current_gtk_theme, NULL);
 
1342
+  gconf_client_set_string (client, "/apps/metacity/general/theme", current_gtk_theme, NULL);
 
1343
+
 
1344
+  setup_theme_selector(self, FALSE);
 
1345
+
 
1346
+  /* Unity launcher icon size (if visible) */
 
1347
+  if (gtk_widget_get_visible (GTK_WIDGET (WID ("unity-iconsize-box"))))
 
1348
+    gconf_client_unset (client, UNITY_ICONSIZE_KEY, NULL);
 
1349
+
 
1350
+  /* reload default bg */
 
1351
+  /*FIXME: should be:
 
1352
+  g_settings_reset (priv->settings, WP_URI_KEY);
 
1353
+  g_settings_apply (priv->settings);
 
1354
+  gtk_icon_view_unselect_all (GTK_ICON_VIEW (WID ("backgrounds-iconview")));
 
1355
+  load_current_bg (self);
 
1356
+  update_preview (priv, NULL);
 
1357
+
 
1358
+  shows style-combobox style-pcolor and style-combobox items.*/
 
1359
+  gtk_combo_box_set_active (GTK_COMBO_BOX (WID ("sources-combobox")), 0);
 
1360
+  path = gtk_tree_path_new_from_string ("1");
 
1361
+  gtk_icon_view_select_path (GTK_ICON_VIEW (WID ("backgrounds-iconview")), path);
 
1362
+  gtk_tree_path_free (path);
 
1363
+
 
1364
+  g_object_unref (client);
 
1365
+  g_free (current_gtk_theme);
 
1366
+}
 
1367
+
 
1368
+static void
 
1369
+hidelauncher_set_sensitivity_reveal (CcBackgroundPanel *self, gboolean autohide)
 
1370
+{
 
1371
+  CcBackgroundPanelPrivate *priv = self->priv;
 
1372
+  gtk_widget_set_sensitive (WID ("unity_reveal_label"), autohide);
 
1373
+  gtk_widget_set_sensitive (WID ("unity_reveal_spot_topleft"), autohide);
 
1374
+  gtk_widget_set_sensitive (WID ("unity_reveal_spot_left"), autohide);
 
1375
+}
 
1376
+
 
1377
+static void
 
1378
+hidelauncher_widget_refresh (CcBackgroundPanel *self)
 
1379
+{
 
1380
+  CcBackgroundPanelPrivate *priv = self->priv;
 
1381
+  gint value = gconf_client_get_int (gconf_client_get_default (), UNITY_LAUNCHERHIDE_KEY, NULL);
 
1382
+  gboolean autohide;
 
1383
+
 
1384
+  autohide = (value != 0);
 
1385
+  gtk_switch_set_active (GTK_SWITCH (WID ("unity_launcher_autohide")), autohide);
 
1386
+
 
1387
+  /* 2d (which doesn't have value = 3). We have to refresh 2d there, because maybe
 
1388
+     someone changed in ccsm (and so, no on_hidelauncher_changed if 2 -> 1 for instance
 
1389
+     and we need to refreshed it */
 
1390
+  if (priv->unity2d_settings)
 
1391
+    {
 
1392
+      if (value > 2)
 
1393
+        value = 2;
 
1394
+      g_settings_set_int (priv->unity2d_settings, "hide-mode", value);
 
1395
+    }
 
1396
+
 
1397
+  hidelauncher_set_sensitivity_reveal (self, autohide);
 
1398
+}
 
1399
+
 
1400
+static void
 
1401
+ext_hidelauncher_changed_callback (GConfClient* client,
 
1402
+                                   guint cnxn_id,
 
1403
+                                   GConfEntry *entry,
 
1404
+                                   gpointer user_data)
 
1405
+{
 
1406
+  hidelauncher_widget_refresh (CC_BACKGROUND_PANEL (user_data));
 
1407
+}
 
1408
+
 
1409
+static void
 
1410
+on_hidelauncher_changed (GtkSwitch *switcher, gboolean enabled, gpointer user_data)
 
1411
+{
 
1412
+  gint value = 0;
 
1413
+  gint gconf_value = gconf_client_get_int (gconf_client_get_default (), UNITY_LAUNCHERHIDE_KEY, NULL);
 
1414
+  gboolean gconf_autohide_enabled;
 
1415
+
 
1416
+  gconf_autohide_enabled = (gconf_value != 0);
 
1417
+  if (gtk_switch_get_active (switcher))
 
1418
+    {
 
1419
+      /* change value to "active" if activation isn't due to gconf switching to any value */
 
1420
+      if (gconf_autohide_enabled)
 
1421
+        return;
 
1422
+      value = 2;
 
1423
+    }
 
1424
+
 
1425
+  /* 3d */
 
1426
+  gconf_client_set_int (gconf_client_get_default (), UNITY_LAUNCHERHIDE_KEY, value, NULL);
 
1427
+  hidelauncher_set_sensitivity_reveal (CC_BACKGROUND_PANEL (user_data), (value != -1));
 
1428
+}
 
1429
+
 
1430
+static void
 
1431
+reveallauncher_widget_refresh (CcBackgroundPanel *self)
 
1432
+{
 
1433
+  CcBackgroundPanelPrivate *priv = self->priv;
 
1434
+  gchar *value = gconf_client_get_string (gconf_client_get_default (), UNITY_LAUNCHERREVEAL_KEY, NULL);
 
1435
+
 
1436
+  if (g_strcmp0 (value, "TopLeft") == 0)
 
1437
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("unity_reveal_spot_topleft")), TRUE);
 
1438
+  else if (g_strcmp0 (value, "Left") == 0)
 
1439
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("unity_reveal_spot_left")), TRUE);
 
1440
+  else
 
1441
+    /* this is a hidden spot when another option is selected (through ccsm) */
 
1442
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("unity_reveal_spot_otheroption")), TRUE);
 
1443
+
 
1444
+  g_free (value);
 
1445
+}
 
1446
+
 
1447
+static void
 
1448
+ext_reveallauncher_changed_callback (GConfClient* client,
 
1449
+                                     guint cnxn_id,
 
1450
+                                     GConfEntry *entry,
 
1451
+                                     gpointer user_data)
 
1452
+{
 
1453
+  reveallauncher_widget_refresh (CC_BACKGROUND_PANEL (user_data));
 
1454
+}
 
1455
+
 
1456
+static void
 
1457
+on_reveallauncher_changed (GtkToggleButton *button, gpointer user_data)
 
1458
+{
 
1459
+  CcBackgroundPanel *self = CC_BACKGROUND_PANEL (user_data);
 
1460
+  CcBackgroundPanelPrivate *priv = self->priv;
 
1461
+  char *reveal_spot = NULL;
 
1462
+
 
1463
+  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (WID ("unity_reveal_spot_topleft"))))
 
1464
+    reveal_spot = g_strdup ("TopLeft");
 
1465
+  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (WID ("unity_reveal_spot_left"))))
 
1466
+    reveal_spot = g_strdup ("Left");
 
1467
+
 
1468
+  if (reveal_spot)
 
1469
+    {
 
1470
+      gconf_client_set_string (gconf_client_get_default (), UNITY_LAUNCHERREVEAL_KEY, reveal_spot, NULL);
 
1471
+      g_free (reveal_spot);
 
1472
+    }
 
1473
+
 
1474
+  reveallauncher_widget_refresh (self);
 
1475
+}
 
1476
+
 
1477
+static void
 
1478
+on_restore_defaults_page2_clicked (GtkButton *button, gpointer user_data)
 
1479
+{
 
1480
+  GConfClient *client;
 
1481
+  CcBackgroundPanel *self = CC_BACKGROUND_PANEL (user_data);
 
1482
+  CcBackgroundPanelPrivate *priv = self->priv;
 
1483
+
 
1484
+  client = gconf_client_get_default ();
 
1485
+
 
1486
+  /* reset defaut for the profile and get the default */
 
1487
+  gconf_client_unset (client, UNITY_LAUNCHERHIDE_KEY, NULL);
 
1488
+  gconf_client_unset (client, UNITY_LAUNCHERREVEAL_KEY, NULL);
 
1489
+
 
1490
+  if (priv->unity2d_settings)
 
1491
+    g_settings_reset (priv->unity2d_settings, "hide-mode");
 
1492
+}
 
1493
+
 
1494
+static gboolean
 
1495
+background_is_unity_session (void)
 
1496
+{
 
1497
+  return (g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity") == 0);
 
1498
+}
 
1499
+
 
1500
+static void
 
1501
+hide_unity2d_not_supportted (CcBackgroundPanel *self)
 
1502
+{
 
1503
+  CcBackgroundPanelPrivate *priv = self->priv;
 
1504
+  gtk_widget_hide (GTK_WIDGET (WID ("unity-separator1")));
 
1505
+  gtk_widget_hide (GTK_WIDGET (WID ("unity-iconsize-box")));
 
1506
+}
 
1507
+
 
1508
+static void
 
1509
+setup_unity_settings (CcBackgroundPanel *self)
 
1510
+{
 
1511
+  CcBackgroundPanelPrivate *priv = self->priv;
 
1512
+  GConfClient *client;
 
1513
+  GtkAdjustment* iconsize_adj;
 
1514
+  GtkScale* iconsize_scale;
 
1515
+  const gchar * const *schemas;
 
1516
+
 
1517
+  client = gconf_client_get_default ();
 
1518
+  gconf_client_add_dir (client, UNITY_KEYS, 0, NULL);
 
1519
+  priv->gconf_notify_id = NULL;
 
1520
+
 
1521
+  /* Only use the unity-2d schema if it's installed */
 
1522
+  schemas = g_settings_list_schemas ();
 
1523
+  while (*schemas != NULL)
 
1524
+    {
 
1525
+      if (g_strcmp0 (*schemas, UNITY2D_GSETTINGS_LAUNCHER) == 0)
 
1526
+        {
 
1527
+          priv->unity2d_settings = g_settings_new (UNITY2D_GSETTINGS_LAUNCHER);
 
1528
+          break;
 
1529
+        }
 
1530
+      schemas++;
 
1531
+    }
 
1532
+
 
1533
+  /* Icon size change (Not supported in unity-2d) */
 
1534
+  if (g_strcmp0(g_getenv("DESKTOP_SESSION"), "ubuntu-2d") != 0)
 
1535
+    {
 
1536
+      iconsize_adj = gtk_adjustment_new (48, 32, 64, 1, 5, 0);
 
1537
+      iconsize_scale = GTK_SCALE (WID ("unity-iconsize-scale"));
 
1538
+      gtk_range_set_adjustment (GTK_RANGE (iconsize_scale), iconsize_adj);
 
1539
+      priv->gconf_notify_id = g_slist_append (priv->gconf_notify_id,
 
1540
+                                              GINT_TO_POINTER (
 
1541
+                                              gconf_client_notify_add (client, UNITY_ICONSIZE_KEY,
 
1542
+                                                       ext_iconsize_changed_callback, iconsize_adj,
 
1543
+                                                       NULL, NULL)));
 
1544
+      g_signal_connect (iconsize_adj, "value_changed",
 
1545
+                        G_CALLBACK (on_iconsize_changed), NULL);
 
1546
+      iconsize_widget_refresh (iconsize_adj);
 
1547
+    }
 
1548
+  else
 
1549
+    hide_unity2d_not_supportted (self);
 
1550
+
 
1551
+  /* Autohide launcher setting */
 
1552
+  priv->gconf_notify_id = g_slist_append (priv->gconf_notify_id,
 
1553
+                                          GINT_TO_POINTER (
 
1554
+                                          gconf_client_notify_add (client, UNITY_LAUNCHERHIDE_KEY,
 
1555
+                                                   ext_hidelauncher_changed_callback, self,
 
1556
+                                                   NULL, NULL)));
 
1557
+  g_signal_connect (WID ("unity_launcher_autohide"), "notify::active",
 
1558
+                    G_CALLBACK (on_hidelauncher_changed), self);
 
1559
+  hidelauncher_widget_refresh (self);
 
1560
+
 
1561
+  /* Reveal spot setting */
 
1562
+  priv->gconf_notify_id = g_slist_append (priv->gconf_notify_id,
 
1563
+                                          GINT_TO_POINTER (
 
1564
+                                          gconf_client_notify_add (client, UNITY_LAUNCHERREVEAL_KEY,
 
1565
+                                                   ext_reveallauncher_changed_callback, self,
 
1566
+                                                   NULL, NULL)));
 
1567
+  g_signal_connect (WID ("unity_reveal_spot_topleft"), "toggled",
 
1568
+                     G_CALLBACK (on_reveallauncher_changed), self);
 
1569
+  g_signal_connect (WID ("unity_reveal_spot_left"), "toggled",
 
1570
+                     G_CALLBACK (on_reveallauncher_changed), self);
 
1571
+  reveallauncher_widget_refresh (self);
 
1572
+
 
1573
+  /* Restore defaut on second page */
 
1574
+  g_signal_connect (WID ("button-restore-unitybehavior"), "clicked",
 
1575
+                    G_CALLBACK (on_restore_defaults_page2_clicked), self);
 
1576
+
 
1577
+  g_object_unref (client);
 
1578
+}
 
1579
+
 
1580
 static void
 
1581
 cc_background_panel_init (CcBackgroundPanel *self)
 
1582
 {
 
1583
   CcBackgroundPanelPrivate *priv;
 
1584
   gchar *objects[] = { "style-liststore",
 
1585
       "sources-liststore", "background-panel", "sizegroup", NULL };
 
1586
+  gchar *objects_unity[] = { "style-liststore",
 
1587
+      "sources-liststore", "main-notebook", "sizegroup", NULL };
 
1588
   GError *err = NULL;
 
1589
   GtkWidget *widget;
 
1590
   GtkListStore *store;
 
1591
@@ -1151,9 +1590,14 @@
 
1592
 
 
1593
   priv->builder = gtk_builder_new ();
 
1594
 
 
1595
-  gtk_builder_add_objects_from_file (priv->builder,
 
1596
-                                     DATADIR"/background.ui",
 
1597
-                                     objects, &err);
 
1598
+  if (background_is_unity_session ())
 
1599
+    gtk_builder_add_objects_from_file (priv->builder,
 
1600
+                                       DATADIR"/background.ui",
 
1601
+                                       objects_unity, &err);
 
1602
+  else
 
1603
+    gtk_builder_add_objects_from_file (priv->builder,
 
1604
+                                       DATADIR"/background.ui",
 
1605
+                                       objects, &err);
 
1606
 
 
1607
   if (err)
 
1608
     {
 
1609
@@ -1204,7 +1648,10 @@
 
1610
 
 
1611
 
 
1612
   /* add the top level widget */
 
1613
-  widget = WID ("background-panel");
 
1614
+  if (background_is_unity_session ())
 
1615
+    widget = WID ("main-notebook");
 
1616
+  else
 
1617
+    widget = WID ("background-panel");
 
1618
 
 
1619
   gtk_container_add (GTK_CONTAINER (self), widget);
 
1620
   gtk_widget_show_all (GTK_WIDGET (self));
 
1621
@@ -1267,6 +1714,20 @@
 
1622
 
 
1623
   /* Setup the edit box with our current settings */
 
1624
   source_update_edit_box (priv, TRUE);
 
1625
+
 
1626
+  /* Setup theme selector */
 
1627
+  setup_theme_selector (self, TRUE);
 
1628
+
 
1629
+  /* Setup unity settings */
 
1630
+  if (background_is_unity_session ())
 
1631
+    setup_unity_settings (self);
 
1632
+  else
 
1633
+    hide_unity2d_not_supportted (self);
 
1634
+
 
1635
+  /* Restore default on first page */
 
1636
+  g_signal_connect (WID ("button-restore"), "clicked",
 
1637
+                    G_CALLBACK (on_restore_defaults_page1_clicked), self);
 
1638
+
 
1639
 }
 
1640
 
 
1641
 void
 
1642
Index: gnome-control-center-3.2.2/panels/background/gnome-background-panel.desktop.in.in
 
1643
===================================================================
 
1644
--- gnome-control-center-3.2.2.orig/panels/background/gnome-background-panel.desktop.in.in      2011-09-01 12:01:00.000000000 +0200
 
1645
+++ gnome-control-center-3.2.2/panels/background/gnome-background-panel.desktop.in.in   2012-01-25 18:30:21.146769261 +0100
 
1646
@@ -1,6 +1,6 @@
 
1647
 [Desktop Entry]
 
1648
-_Name=Background
 
1649
-_Comment=Change the background
 
1650
+_Name=User Interface
 
1651
+_Comment=Change the background and theme
 
1652
 Exec=gnome-control-center background
 
1653
 Icon=preferences-desktop-wallpaper
 
1654
 Terminal=false
 
1655
@@ -10,4 +10,4 @@
 
1656
 OnlyShowIn=GNOME;Unity;
 
1657
 X-GNOME-Settings-Panel=background
 
1658
 # Translators: those are keywords for the background control-center panel
 
1659
-_X-GNOME-Keywords=Wallpaper;Screen;Desktop;
 
1660
+_X-GNOME-Keywords=Wallpaper;Screen;Desktop;Theme;Appearance;Launcher;Unity;Menus;