~ubuntu-branches/ubuntu/saucy/unity-tweak-tool/saucy-proposed

« back to all changes in this revision

Viewing changes to UnityTweakTool/section/unity.py

  • Committer: Package Import Robot
  • Author(s): Barneedhar Vigneshwar, J Phani Mahesh, Barneedhar Vigneshwar
  • Date: 2013-09-16 19:34:38 UTC
  • Revision ID: package-import@ubuntu.com-20130916193438-dw14bzxkohvxub2y
Tags: 0.0.5
[ J Phani Mahesh ]
* New upstream release (LP: #1226059)
  - New application icon 
  - Show error dialog when schemas are missing instead of crashing
  - Trigger new build of pot files
* UnityTweakTool/section/unity.py
  - Fix Show recently used and more suggestions in dash search (LP: #1166294)
  - Fix Launcher reveal sensitivity scale update issues (LP: #1168863)
* UnityTweakTool/elements/colorchooser.py
  - Fix TypeError in get_rgba() (LP: #1165627)
  - Fix segmentation fault on selecting custom launcher (LP: #1190398)
* UnityTweakTool/elements/option.py
  - Fix "Restore defaults" button (LP: #1186634)
* UnityTweakTool/__init__.py  
  - Fix unity-tweak-tool crashed with dbus.exceptions.DBusException in
  call_blocking() (LP: #1168738)
  - Fix FileNotFoundError (LP: #1225463)
  - Fix dbus.exceptions.DBusException (LP: #1170571)
* data/unity.ui
  - Remove Panel transparency switch (LP: #1168836)
  - Remove Launcher transparency switch (LP: #1168834)

[ Barneedhar Vigneshwar ]
* UnityTweakTool/section/unity.py
  - Fix 'Can't set background blur to static' (LP: #1167343)
  - Fix non-working Launcher only on primary desktop (LP: #1173977)
* UnityTweakTool/section/sphagetti/compiz.py
  - Fix TypeError in color_to_hash() (LP: #1166884)

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
from UnityTweakTool.elements.spin import SpinButton
40
40
from UnityTweakTool.elements.switch import Switch
41
41
 
42
 
from UnityTweakTool.section.sphagetti.unity import Unitysettings as SphagettiUnitySettings
 
42
from UnityTweakTool.section.spaghetti.unity import Unitysettings as SpaghettiUnitySettings
43
43
from UnityTweakTool.elements.option import Option,HandlerObject
44
44
 
 
45
from UnityTweakTool.backends import gsettings
 
46
 
45
47
from collections import defaultdict
 
48
from gi.repository import Gtk
46
49
 
47
50
Unity=Section(ui='unity.ui',id='nb_unitysettings')
48
51
 
80
83
    'id'        : 'radio_reveal_left',
81
84
    'builder'   : Unity.builder,
82
85
    'schema'    : 'org.compiz.unityshell',
83
 
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell',
 
86
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell/',
84
87
    'key'       : 'reveal-trigger',
85
88
    'type'      : 'int',
86
89
    'group'     : 'radio_reveal_topleft',
92
95
    'id'        : 'radio_reveal_topleft',
93
96
    'builder'   : Unity.builder,
94
97
    'schema'    : 'org.compiz.unityshell',
95
 
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell',
 
98
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell/',
96
99
    'key'       : 'reveal-trigger',
97
100
    'type'      : 'int',
98
101
    'group'     : 'radio_reveal_topleft',
100
103
    'dependants': []
101
104
})
102
105
 
103
 
sw_launcher_transparent= Switch({
104
 
    'id'        : 'sw_launcher_transparent',
105
 
    'builder'   : Unity.builder,
106
 
    'schema'    : 'org.compiz.unityshell',
107
 
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell/',
108
 
    'key'       : 'launcher-opacity',
109
 
    'type'      : 'double',
110
 
    'map'       : defaultdict(lambda:True,{1:True,0:False}),
111
 
    'dependants': ['l_launcher_transparency_scale',
112
 
                   'sc_launcher_transparency']
113
 
})
114
 
 
115
106
radio_launcher_visibility_all=Radio({
116
107
    'id'        : 'radio_launcher_visibility_all',
117
108
    'builder'   : Unity.builder,
118
109
    'schema'    : 'org.compiz.unityshell',
119
 
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell',
 
110
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell/',
120
111
    'key'       : 'num-launchers',
121
112
    'type'      : 'int',
122
113
    'group'     : 'radio_launcher_visibility_primary',
128
119
    'id'        : 'radio_launcher_visibility_primary',
129
120
    'builder'   : Unity.builder,
130
121
    'schema'    : 'org.compiz.unityshell',
131
 
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell',
 
122
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell/',
132
123
    'key'       : 'num-launchers',
133
124
    'type'      : 'int',
134
125
    'group'     : 'radio_launcher_visibility_primary',
179
170
 
180
171
# TODO:
181
172
 
182
 
# sc_reveal_sensitivity
183
173
# sc_launcher_transparency
184
174
# radio_launcher_color_cham
185
175
# radio_launcher_color_cus
199
189
     'id'     : 'sc_reveal_sensitivity',
200
190
     'builder': Unity.builder,
201
191
     'schema' : 'org.compiz.unityshell',
202
 
     'path'   : '/org/compiz/profiles/unity/plugins/unityshell',
 
192
     'path'   : '/org/compiz/profiles/unity/plugins/unityshell/',
203
193
     'key'    : 'edge-responsiveness',
204
194
     'type'   : 'double',
205
195
     'min'    : 0.2,
206
196
     'max'    : 8.0,
207
 
     'ticks'  : [] #[2.0] XXX : Correct this or get rid of ticks altogether
208
 
 })
 
197
     'ticks'  : [(2.0,Gtk.PositionType.BOTTOM,None)] # XXX : Correct this or get rid of ticks altogether
 
198
 })
 
199
 
 
200
 
 
201
sc_launcher_transparency=Scale({
 
202
     'id'     : 'sc_launcher_transparency',
 
203
     'builder': Unity.builder,
 
204
     'schema' : 'org.compiz.unityshell',
 
205
     'path'   : '/org/compiz/profiles/unity/plugins/unityshell/',
 
206
     'key'    : 'launcher-opacity',
 
207
     'type'   : 'double',
 
208
     'min'    : 0.2, # TODO : Check these min max. Most prolly wrong.
 
209
     'max'    : 8.0, # But fine since they are ignored anyway.
 
210
     'ticks'  : [(0.666, Gtk.PositionType.BOTTOM, None)]
 
211
 
 
212
 })
 
213
 
209
214
 
210
215
 
211
216
LauncherIcons=Tab([sw_launcher_hidemode,
212
217
                   cbox_autohide_animation,
213
218
                   radio_reveal_left, 
214
219
                   radio_reveal_topleft,
215
 
                   sw_launcher_transparent,
216
220
                   radio_launcher_visibility_primary,
217
221
                   radio_launcher_visibility_all,
218
222
                   cbox_urgent_animation,
219
223
                   cbox_launch_animation,
220
224
                   cbox_launcher_icon_colouring,
221
225
                   spin_launcher_icon_size,
222
 
                 #  sc_reveal_sensitivity,
 
226
                   sc_reveal_sensitivity,
 
227
                   sc_launcher_transparency,
223
228
                   color_launcher_color_cus])
224
229
 
225
230
#=============== DASH ==========================
242
247
    'id'        : 'radio_dash_blur_smart',
243
248
    'builder'   : Unity.builder,
244
249
    'schema'    : 'org.compiz.unityshell',
245
 
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell',
 
250
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell/',
246
251
    'key'       : 'dash-blur-experimental',
247
252
    'type'      : 'int',
248
253
    'group'     : 'radio_dash_blur_static',
254
259
    'id'        : 'radio_dash_blur_static',
255
260
    'builder'   : Unity.builder,
256
261
    'schema'    : 'org.compiz.unityshell',
257
 
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell',
 
262
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell/',
258
263
    'key'       : 'dash-blur-experimental',
259
264
    'type'      : 'int',
260
265
    'group'     : 'radio_dash_blur_static',
334
339
    'max'    : 10
335
340
})
336
341
 
337
 
sw_transparent_panel= Switch({
338
 
    'id'        : 'sw_transparent_panel',
339
 
    'builder'   : Unity.builder,
340
 
    'schema'    : 'org.compiz.unityshell',
341
 
    'path'      : '/org/compiz/profiles/unity/plugins/unityshell/',
342
 
    'key'       : 'panel-opacity',
343
 
    'type'      : 'double',
344
 
    'map'       : defaultdict(lambda:True,{0.33:True,1:False}),
345
 
    'dependants': ['sc_panel_transparency',
346
 
                   'l_transparent_panel',
347
 
                   'check_panel_opaque']
348
 
})
 
342
sc_panel_transparency=Scale({
 
343
     'id'     : 'sc_panel_transparency',
 
344
     'builder': Unity.builder,
 
345
     'schema' : 'org.compiz.unityshell',
 
346
     'path'   : '/org/compiz/profiles/unity/plugins/unityshell/',
 
347
     'key'    : 'panel-opacity',
 
348
     'type'   : 'double',
 
349
     'min'    : 0.2, # TODO : Check these min max. Most prolly wrong.
 
350
     'max'    : 8.0, # But fine since they are ignored anyway.
 
351
     'ticks'  : [(0.666, Gtk.PositionType.BOTTOM, None)]
 
352
 })
 
353
 
349
354
 
350
355
check_panel_opaque= CheckBox({
351
356
    'id'        : 'check_panel_opaque',
541
546
 
542
547
# TODO:
543
548
 
544
 
# sc_panel_transparency
545
549
# cbox_default_player
546
550
 
547
551
PanelIcons=Tab([spin_menu_visible,
548
 
                 sw_transparent_panel,
 
552
                 sc_panel_transparency,
549
553
                 check_panel_opaque,
550
554
                 check_indicator_datetime,
551
555
                 radio_12hour,
737
741
Unity.add_page(WebappsIcons)
738
742
Unity.add_page(AdditionalIcons)
739
743
 
740
 
# XXX : Sphagetti bridge
741
 
unitysettings=HandlerObject(SphagettiUnitySettings(Unity.builder))
 
744
# XXX : Spaghetti bridge
 
745
unitysettings=HandlerObject(SpaghettiUnitySettings(Unity.builder))
742
746
Unity.add_page(unitysettings)
743
747
# After all pages are added, the section needs to be registered to start listening for events
744
748
Unity.register()