~andrewsomething/ubuntu/precise/compizconfig-settings-manager/first_run_warning

« back to all changes in this revision

Viewing changes to ccm/Pages.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2007-08-10 17:01:48 UTC
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20070810170148-ccdieecssi5r9plt
Tags: upstream-0.0+git20070810
ImportĀ upstreamĀ versionĀ 0.0+git20070810

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import gtk
24
24
import gtk.gdk
25
25
 
 
26
import compizconfig
 
27
ccs = compizconfig
 
28
 
26
29
from ccm.Constants import *
27
30
from ccm.Settings import *
28
31
from ccm.Conflicts import *
110
113
                
111
114
                self.Scroll.add(self.TreeView)
112
115
                self.Widget.pack_start(self.Scroll, True, True)
113
 
                self.Empty = True
114
116
                self.TreeView.connect('row-activated', self.Activated)
115
117
 
116
118
                self.UpdateTreeView()
117
119
                
118
 
        
119
120
        def UpdateTreeView(self):
120
121
                self.Store.clear()
 
122
                self.Empty = True
121
123
 
122
124
                self.Plugins = {}
123
125
                if self.Plugin:
153
155
                                
154
156
                                settings = sum((v.values() for v in [subGroup.Display]+[subGroup.Screens[CurrentScreenNum]]), [])
155
157
                                settings = sorted(FilterSettings(settings, self.Filter), SettingSortCompare)
 
158
 
156
159
                                for setting in settings:
157
160
                                        if setting.Type == 'Action':
158
161
                                                if subGroupName != '':
433
436
                self.LeftWidget.pack_start(infoLabelCont, False, False)
434
437
                infoLabel = Label(plugin.LongDesc, 180)
435
438
                infoLabelCont.pack_start(infoLabel, True, True)
 
439
 
 
440
                self.NotFoundBox = None
436
441
                
437
442
                if plugin.Name != 'core':
438
443
                        Tooltips.set_tip(self.FilterEntry, _("Search %s Plugin Options") % plugin.ShortDesc)
446
451
                        enableCheck.add(Label(_("Enable %s") % plugin.ShortDesc, 120))
447
452
                        Tooltips.set_tip(enableCheck, plugin.LongDesc)
448
453
                        enableCheck.set_active(plugin.Enabled)
 
454
                        enableCheck.set_sensitive(plugin.Context.AutoSort)
449
455
                        enableCheckCont.pack_start(enableCheck, True, True)
450
456
                        enableCheck.connect('toggled', self.EnablePlugin)
451
457
                else:
495
501
                                groups.append((name, groupPage))
496
502
 
497
503
                for page in self.RightWidget.get_children():
498
 
                        if self.RightWidget.get_tab_label(page).get_label() != _("Actions"):
 
504
                        label = self.RightWidget.get_tab_label(page).get_label()
 
505
                        if label != _("Actions") and label != _("Error"):
499
506
                                self.RightWidget.remove_page(self.RightWidget.page_num(page))
500
507
                                page.destroy()
501
508
 
505
512
                if self.ActionPage:
506
513
                        self.ActionPage.Filter = filter
507
514
                        self.ActionPage.UpdateTreeView()
 
515
                        if self.ActionPage.Empty and self.ActionPage.Widget.get_parent():
 
516
                                self.RightWidget.remove_page(self.RightWidget.page_num(self.ActionPage.Widget))
 
517
                        elif not self.ActionPage.Empty and not self.ActionPage.Widget.get_parent():
 
518
                                self.RightWidget.append_page(self.ActionPage.Widget, gtk.Label(_("Actions")))
 
519
 
 
520
                # Add
 
521
                if len(self.RightWidget.get_children()) == 0 and not self.NotFoundBox:
 
522
                        self.NotFoundBox = NotFoundBox(filter)
 
523
                        self.RightWidget.append_page(self.NotFoundBox, gtk.Label(_("Error")))
 
524
                # Update
 
525
                elif len(self.RightWidget.get_children()) == 1 and self.NotFoundBox:
 
526
                        self.NotFoundBox.update(filter)
 
527
                # Cleanup
 
528
                elif len(self.RightWidget.get_children()) > 1 and self.NotFoundBox:
 
529
                        self.RightWidget.remove_page(self.RightWidget.page_num(self.NotFoundBox))
 
530
                        self.NotFoundBox.destroy()
 
531
                        self.NotFoundBox = None
508
532
 
509
533
                self.RightWidget.show_all()
510
534
 
522
546
                self.Plugin.Context.Write()
523
547
                self.Block = self.Block-1
524
548
 
525
 
 
526
549
# Filter Page
527
550
#
528
551
class SelectorButtons(gtk.HBox):
533
556
                self.Buttons = []
534
557
                self.Arrows = []
535
558
 
 
559
        def clear_buttons(self):
 
560
                for widget in (self.Arrows + self.Buttons):
 
561
                        widget.destroy()
 
562
 
 
563
                self.Arrows = []
 
564
                self.Buttons = []
 
565
 
536
566
        def add_button(self, label, callback):
537
567
                arrow = gtk.Arrow(gtk.ARROW_RIGHT, gtk.SHADOW_NONE)
538
568
                button = gtk.Button(label)
691
721
                self.RightChild.pack_start(self.SettingsArea, True, True)
692
722
 
693
723
                self.ActionPage = ActionPage(self.Context)
694
 
 
695
 
                self.FilterChanged(filterEntry)
 
724
                self.NotFoundBox = None
696
725
 
697
726
                # Notebook
698
727
                self.RightWidget.append_page(self.RightChild, gtk.Label(_("Settings")))
699
728
                self.RightWidget.append_page(self.ActionPage.Widget, gtk.Label(_("Actions")))
700
729
 
 
730
                self.FilterChanged(filterEntry)
 
731
 
701
732
        def UpdateBoxes(self):
702
733
                self.PluginBox.clear_list()
703
734
                self.GroupBox.clear_list()
739
770
                                                                self.SettingsBox.pack_start(sga.Widget, False, False)
740
771
 
741
772
                if len(self.FilteredPlugins) == 0:
 
773
                        self.SelectorButtons.clear_buttons()
742
774
                        self.CurrentPlugin = None
743
775
                        self.CurrentGroup = None
744
776
                        self.CurrentSubGroup = None
824
856
                self.FilteredPlugins = plugins
825
857
                self.UpdateBoxes()
826
858
 
 
859
                # No settings found, remove page
 
860
                if len(self.FilteredPlugins) == 0 and self.RightChild.get_parent():
 
861
                        self.RightWidget.remove_page(self.RightWidget.page_num(self.RightChild))
 
862
                # Restore page
 
863
                elif len(self.FilteredPlugins) > 0 and not self.RightChild.get_parent():
 
864
                        self.RightWidget.append_page(self.RightChild, gtk.Label(_("Settings")))
 
865
 
827
866
                self.ActionPage.Filter = self.Filter
828
867
                self.ActionPage.UpdateTreeView()
 
868
                # No actions found, remove page
 
869
                if self.ActionPage.Empty and self.ActionPage.Widget.get_parent():
 
870
                        self.RightWidget.remove_page(self.RightWidget.page_num(self.ActionPage.Widget))
 
871
                # Restore page
 
872
                elif not self.ActionPage.Empty and not self.ActionPage.Widget.get_parent():
 
873
                        self.RightWidget.append_page(self.ActionPage.Widget, gtk.Label(_("Actions")))
 
874
 
 
875
                # Nothing found
 
876
                if not self.RightChild.get_parent() and not self.ActionPage.Widget.get_parent():
 
877
                        if self.NotFoundBox:
 
878
                                self.NotFoundBox.update(self.Filter)
 
879
                        else:
 
880
                                self.NotFoundBox = NotFoundBox(self.Filter)
 
881
                                self.RightWidget.append_page(self.NotFoundBox, gtk.Label(_("Error")))
 
882
                elif self.NotFoundBox:
 
883
                        self.RightWidget.remove_page(self.RightWidget.page_num(self.NotFoundBox))
 
884
                        self.NotFoundBox.destroy()
 
885
                        self.NotFoundBox = None
 
886
 
 
887
                self.RightWidget.show_all()
829
888
 
830
889
# Profile and Backend Page
831
890
#
833
892
        def __init__(self, main, context):
834
893
                self.Context = context
835
894
                self.Main = main
836
 
                self.LeftWidget = gtk.VBox(False, 10)
837
 
                self.LeftWidget.set_border_width(15)
838
 
                self.RightWidget = gtk.Notebook()
839
895
                rightChild = gtk.VBox()
840
896
                rightChild.set_border_width(10)
841
 
                self.RightWidget.append_page(rightChild, gtk.Label(_("Profile & Backend")))
842
 
 
843
 
                # Left Pane
844
 
                self.DescLabel = Label()
845
 
                self.DescLabel.set_markup("<span color='%s' size='large' weight='800'>%s</span>" % (self.Main.Style.BrightColor, _("Backend &amp; Profile")))
846
 
                self.DescImg = Image("profiles",ImageCategory, 64)
847
 
                self.LeftWidget.pack_start(self.DescImg, False, False)
848
 
                self.LeftWidget.pack_start(self.DescLabel, False, False)
849
 
                self.InfoLabelCont = gtk.HBox()
850
 
                self.InfoLabelCont.set_border_width(10)
851
 
                self.LeftWidget.pack_start(self.InfoLabelCont, False, False)
852
 
                self.InfoLabel = Label(_("Configure the backend and profile used by the Compiz Configuration System."), 180)
853
 
                self.InfoLabelCont.pack_start(self.InfoLabel, True, True)
854
897
 
855
898
                # Profiles
856
899
                profileBox = gtk.HBox()
866
909
                self.ProfileComboBox.append_text(_("Default"))
867
910
                for profile in self.Context.Profiles.values():
868
911
                        self.ProfileComboBox.append_text(profile.Name)
869
 
                if self.Context.CurrentProfile.Name == '':
 
912
                if self.Context.CurrentProfile.Name == '' or self.Context.CurrentProfile.Name == 'Default':
870
913
                        self.ProfileComboBox.set_active(0)
871
914
                else:
872
915
                        name = self.Context.CurrentProfile.Name
917
960
                self.IntegrationButton.set_sensitive(self.Context.CurrentBackend.IntegrationSupport)
918
961
                self.IntegrationButton.connect("toggled", self.IntegrationChanged)
919
962
                rightChild.pack_start(integrationLabel, False, False, 5)
920
 
                rightChild.pack_start(self.IntegrationButton, False, False, 5)          
 
963
                rightChild.pack_start(self.IntegrationButton, False, False, 5)
921
964
 
922
 
                # Back Button
923
 
                self.BackButton = gtk.Button(gtk.STOCK_GO_BACK)
924
 
                self.BackButton.set_use_stock(True)
925
 
                self.BackButton.connect('clicked', self.Main.BackToMain)
926
 
                self.LeftWidget.pack_end(self.BackButton, False, False)
 
965
                self.Widget = rightChild
927
966
        
928
967
        def UpdateProfiles(self, default = _("Default")):
929
968
                self.Context.Read()
1035
1074
                self.ProfileComboBox.set_sensitive(self.Context.CurrentBackend.ProfileSupport)
1036
1075
                self.IntegrationButton.set_sensitive(self.Context.CurrentBackend.IntegrationSupport)
1037
1076
 
 
1077
# ScrolledList Widget
 
1078
#
 
1079
class ScrolledList(gtk.ScrolledWindow):
 
1080
        def __init__(self, name):
 
1081
                gtk.ScrolledWindow.__init__(self)
 
1082
 
 
1083
                self.props.hscrollbar_policy = gtk.POLICY_NEVER
 
1084
                self.props.vscrollbar_policy = gtk.POLICY_AUTOMATIC
 
1085
 
 
1086
                self.Store = gtk.ListStore(gobject.TYPE_STRING)
 
1087
 
 
1088
                self.Style = Style()
 
1089
 
 
1090
                viewport = gtk.Viewport()
 
1091
                viewport.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(self.Style.BackgroundColor))
 
1092
        
 
1093
                self.ListView = gtk.TreeView(self.Store)
 
1094
                self.ListView.set_headers_visible(True)
 
1095
                self.ListView.insert_column_with_attributes(-1, name, gtk.CellRendererText(), text=0)
 
1096
                
 
1097
                self.set_size_request(300, 300)
 
1098
                
 
1099
                viewport.add(self.ListView)
 
1100
                self.add(viewport)
 
1101
                
 
1102
                self.Select = self.ListView.get_selection()
 
1103
                self.Select.set_mode(gtk.SELECTION_SINGLE)
 
1104
 
 
1105
        def get_list(self):
 
1106
                values = []
 
1107
                iter = self.Store.get_iter_first()
 
1108
                while iter:
 
1109
                        value = self.Store.get(iter, 0)[0]
 
1110
                        if value != "":
 
1111
                                values.append(value)
 
1112
                        iter = self.Store.iter_next(iter)       
 
1113
                return values
 
1114
 
 
1115
        def clear(self):
 
1116
                self.Store.clear()
 
1117
        
 
1118
        def append(self, value):
 
1119
                iter = self.Store.append()
 
1120
                self.Store.set(iter, 0, value)
 
1121
 
 
1122
        def set(self, pos, value):
 
1123
                iter = self.Store.get_iter(pos)
 
1124
                self.Store.set(iter, 0, value)
 
1125
 
 
1126
        def delete(self, b):
 
1127
                selectedRows = self.Select.get_selected_rows()[1]
 
1128
                for path in selectedRows:
 
1129
                        iter = self.Store.get_iter(path)
 
1130
                        self.Store.remove(iter)
 
1131
        
 
1132
        def move_up(self, b):
 
1133
                selectedRows = self.Select.get_selected_rows()[1]
 
1134
                if len(selectedRows) == 1:
 
1135
                        iter = self.Store.get_iter(selectedRows[0])
 
1136
                        prev = self.Store.get_iter_first()
 
1137
                        if not self.Store.get_path(prev) == self.Store.get_path(iter):
 
1138
                                while prev is not None and not self.Store.get_path(self.Store.iter_next(prev)) == self.Store.get_path(iter):
 
1139
                                        prev = self.Store.iter_next(prev)
 
1140
                                self.Store.swap(iter, prev)
 
1141
 
 
1142
        def move_down(self, b):
 
1143
                selectedRows = self.Select.get_selected_rows()[1]
 
1144
                if len(selectedRows) == 1:
 
1145
                        iter = self.Store.get_iter(selectedRows[0])
 
1146
                        next = self.Store.iter_next(iter)
 
1147
                        if next is not None:
 
1148
                                self.Store.swap(iter, next)
 
1149
 
 
1150
# Plugin List Page
 
1151
#
 
1152
class PluginListPage:
 
1153
        def __init__(self, main, context):
 
1154
                self.Context = context
 
1155
                self.Main = main
 
1156
                self.Blocked = False
 
1157
                rightChild = gtk.VBox()
 
1158
                rightChild.set_border_width(10)
 
1159
                
 
1160
                # Auto sort
 
1161
                autoSort = gtk.CheckButton(_("Automatic plugin sorting"))
 
1162
                rightChild.pack_start(autoSort, False, False, 10)
 
1163
                
 
1164
                # Lists
 
1165
                listBox = gtk.HBox()
 
1166
                listBox.set_spacing(5)
 
1167
 
 
1168
                self.DisabledPluginsList = ScrolledList(_("Disabled Plugins"))
 
1169
                self.EnabledPluginsList = ScrolledList(_("Enabled Plugins"))
 
1170
 
 
1171
                # Left/Right buttons
 
1172
                buttonBox = gtk.VBox()
 
1173
                buttonBox.set_spacing(5)
 
1174
                boxAlignment = gtk.Alignment(0.0, 0.5, 0.0, 0.0)
 
1175
                boxAlignment.add(buttonBox)
 
1176
 
 
1177
                rightButton = gtk.Button()
 
1178
                rightImage = Image(gtk.STOCK_GO_FORWARD, ImageStock, gtk.ICON_SIZE_BUTTON)
 
1179
                rightButton.set_image(rightImage)
 
1180
                rightButton.connect("clicked", self.EnablePlugins)
 
1181
 
 
1182
                leftButton = gtk.Button()
 
1183
                leftImage = Image(gtk.STOCK_GO_BACK, ImageStock, gtk.ICON_SIZE_BUTTON)
 
1184
                leftButton.set_image(leftImage)
 
1185
                leftButton.connect("clicked", self.EnabledPluginsList.delete)
 
1186
 
 
1187
                buttonBox.pack_start(rightButton, False, False)
 
1188
                buttonBox.pack_start(leftButton, False, False)
 
1189
 
 
1190
                # Up/Down buttons
 
1191
                enabledBox = gtk.VBox()
 
1192
                enabledBox.set_spacing(10)
 
1193
 
 
1194
                enabledAlignment = gtk.Alignment(0.5, 0.0, 0.0, 0.0)
 
1195
                enabledButtonBox = gtk.HBox()
 
1196
                enabledButtonBox.set_spacing(5)
 
1197
                enabledAlignment.add(enabledButtonBox)
 
1198
 
 
1199
                upButton = gtk.Button(gtk.STOCK_GO_UP)
 
1200
                downButton = gtk.Button(gtk.STOCK_GO_DOWN)
 
1201
                upButton.set_use_stock(True)
 
1202
                downButton.set_use_stock(True)
 
1203
                upButton.connect('clicked', self.EnabledPluginsList.move_up)
 
1204
                downButton.connect('clicked', self.EnabledPluginsList.move_down)
 
1205
 
 
1206
                # Add buttons
 
1207
                addButton = gtk.Button(gtk.STOCK_ADD)
 
1208
                addButton.set_use_stock(True)
 
1209
                addButton.connect('clicked', self.AddPlugin)
 
1210
 
 
1211
                enabledButtonBox.pack_start(addButton, False, False)
 
1212
                enabledButtonBox.pack_start(upButton, False, False)
 
1213
                enabledButtonBox.pack_start(downButton, False, False)
 
1214
 
 
1215
                enabledBox.pack_start(self.EnabledPluginsList, True, True)
 
1216
                enabledBox.pack_start(enabledAlignment, False, False)
 
1217
 
 
1218
                listBox.pack_start(self.DisabledPluginsList, True, True)
 
1219
                listBox.pack_start(boxAlignment, True, False)
 
1220
                listBox.pack_start(enabledBox, True, True)
 
1221
 
 
1222
                self.UpdateEnabledPluginsList()
 
1223
                self.UpdateDisabledPluginsList()
 
1224
 
 
1225
                # Connect Store
 
1226
                self.EnabledPluginsList.Store.connect('row-changed', self.ListChanged)
 
1227
                self.EnabledPluginsList.Store.connect('row-deleted', self.ListChanged)
 
1228
                self.EnabledPluginsList.Store.connect('rows-reordered', self.ListChanged)
 
1229
 
 
1230
                rightChild.pack_start(listBox, True, True)
 
1231
 
 
1232
                # Auto sort
 
1233
                autoSort.connect('toggled', self.AutoSortChanged)
 
1234
                autoSort.set_active(self.Context.AutoSort)
 
1235
 
 
1236
                self.Widget = rightChild
 
1237
 
 
1238
        def AutoSortChanged(self, widget):
 
1239
                self.Context.AutoSort = widget.get_active()
 
1240
                self.EnabledPluginsList.set_sensitive(not self.Context.AutoSort)
 
1241
                self.DisabledPluginsList.set_sensitive(not self.Context.AutoSort)
 
1242
 
 
1243
        def UpdateEnabledPluginsList(self):
 
1244
                activePlugins = self.Context.Plugins['core'].Display['active_plugins'].Value
 
1245
                
 
1246
                self.EnabledPluginsList.clear()
 
1247
 
 
1248
                for name in activePlugins:
 
1249
                        self.EnabledPluginsList.append(name)
 
1250
 
 
1251
        def UpdateDisabledPluginsList(self):
 
1252
                activePlugins = self.Context.Plugins['core'].Display['active_plugins'].Value
 
1253
 
 
1254
                self.DisabledPluginsList.clear()
 
1255
 
 
1256
                for plugin in sorted(self.Context.Plugins.values(), PluginSortCompare):
 
1257
                        if not plugin.Name in activePlugins and plugin.Name != "core":
 
1258
                                self.DisabledPluginsList.append(plugin.Name)
 
1259
 
 
1260
        def AddPlugin(self, widget):
 
1261
                dlg = gtk.Dialog(_("Add plugin"))
 
1262
                dlg.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
 
1263
                dlg.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK).grab_default()
 
1264
                dlg.set_default_response(gtk.RESPONSE_OK)
 
1265
                
 
1266
                ebox = gtk.EventBox()
 
1267
                label = gtk.Label(_("Plugin name:"))
 
1268
                ebox.add(label)
 
1269
                
 
1270
                Tooltips.set_tip(ebox, _("Insert plugin name"))
 
1271
                dlg.vbox.pack_start(ebox)
 
1272
                
 
1273
                entry = gtk.Entry()
 
1274
                entry.props.activates_default = True
 
1275
                dlg.vbox.pack_start(entry)
 
1276
 
 
1277
                dlg.vbox.set_spacing(5)
 
1278
                
 
1279
                dlg.vbox.show_all()
 
1280
                ret = dlg.run()
 
1281
                dlg.destroy()
 
1282
 
 
1283
                if ret == gtk.RESPONSE_OK:
 
1284
                        self.EnabledPluginsList.append(entry.get_text())
 
1285
 
 
1286
        def EnablePlugins(self, widget):
 
1287
                selectedRows = self.DisabledPluginsList.Select.get_selected_rows()[1]
 
1288
                for path in selectedRows:
 
1289
                        iter = self.DisabledPluginsList.Store.get_iter(path)
 
1290
                        name = self.DisabledPluginsList.Store.get(iter, 0)[0]
 
1291
                        self.EnabledPluginsList.append(name)
 
1292
                self.DisabledPluginsList.delete(widget)
 
1293
        
 
1294
        def ListChanged(self, *args, **kwargs):
 
1295
                if self.Blocked:
 
1296
                        return
 
1297
                self.Blocked = True
 
1298
                plugins = self.EnabledPluginsList.get_list()
 
1299
 
 
1300
                self.Context.Plugins['core'].Display['active_plugins'].Value = plugins
 
1301
                self.Context.Write()
 
1302
                self.UpdateDisabledPluginsList()
 
1303
                self.Blocked = False
 
1304
 
 
1305
# About Dialog
 
1306
#
 
1307
class AboutDialog(gtk.AboutDialog):
 
1308
        def __init__(self):
 
1309
                gtk.AboutDialog.__init__(self)
 
1310
 
 
1311
                self.set_name(_("CompizConfig Settings Manager"))
 
1312
                self.set_version("0.1.0")
 
1313
                self.set_comments(_("This is a settings manager for the CompizConfig configuration system."))
 
1314
                self.set_copyright("Copyright \xC2\xA9 2007 Patrick Niklaus/Quinn Storm")
 
1315
                self.set_translator_credits(_("translator-credits"))
 
1316
                self.set_authors(["Patrick Niklaus <marex@opencompositing.org>",
 
1317
                                                  "Quinn Storm <quinn@beryl-project.org>"])
 
1318
                self.set_artists(["Andrew Wedderburn <andrew.wedderburn@gmail.com>",
 
1319
                                                  "Patrick Niklaus <marex@opencompositing.org>",
 
1320
                                                  "Gnome Icon Theme Team"])
 
1321
                self.set_icon(gtk.gdk.pixbuf_new_from_file(IconDir+"/apps/ccsm.svg"))
 
1322
                self.set_logo(gtk.gdk.pixbuf_new_from_file(IconDir+"/apps/ccsm.svg"))
 
1323
                self.set_website("http://www.opencompositing.org")
 
1324
 
 
1325
# Preferences Page
 
1326
#
 
1327
class PreferencesPage:
 
1328
        def __init__(self, main, context):
 
1329
                self.Context = context
 
1330
                self.Main = main
 
1331
                self.LeftWidget = gtk.VBox(False, 10)
 
1332
                self.LeftWidget.set_border_width(15)
 
1333
                self.RightWidget = gtk.Notebook()
 
1334
 
 
1335
                # Left Pane
 
1336
                self.DescLabel = Label()
 
1337
                self.DescLabel.set_markup("<span color='%s' size='large' weight='800'>%s</span>" % (self.Main.Style.BrightColor, _("Preferences")))
 
1338
                self.DescImg = Image("profiles",ImageCategory, 64)
 
1339
                self.LeftWidget.pack_start(self.DescImg, False, False)
 
1340
                self.LeftWidget.pack_start(self.DescLabel, False, False)
 
1341
                self.InfoLabelCont = gtk.HBox()
 
1342
                self.InfoLabelCont.set_border_width(10)
 
1343
                self.LeftWidget.pack_start(self.InfoLabelCont, False, False)
 
1344
                self.InfoLabel = Label(_("Configure the backend, profile and other internal settings used by the Compiz Configuration System."), 180)
 
1345
                self.InfoLabelCont.pack_start(self.InfoLabel, True, True)
 
1346
 
 
1347
                # About Button
 
1348
                aboutLabel = Label()
 
1349
                aboutLabel.set_markup("<span color='%s' size='large' weight='800'>%s</span>" % (self.Main.Style.BrightColor, _("About")))
 
1350
                aboutButton = gtk.Button()
 
1351
                aboutButton.set_relief(gtk.RELIEF_NONE)
 
1352
                aboutImage = Image(gtk.STOCK_ABOUT, ImageStock, gtk.ICON_SIZE_BUTTON)
 
1353
                aboutFrame = gtk.HBox()
 
1354
                aboutFrame.set_spacing(5)
 
1355
                aboutFrame.pack_start(aboutImage, False, False)
 
1356
                aboutFrame.pack_start(Label(_("About CCSM...")), False, False)
 
1357
                aboutButton.add(aboutFrame)
 
1358
                Tooltips.set_tip(aboutButton, _("About"))
 
1359
                aboutButton.connect('clicked', self.ShowAboutDialog)
 
1360
                aboutBin = gtk.HBox()
 
1361
                aboutBin.set_border_width(10)
 
1362
                aboutBin.pack_start(aboutButton, False, False)
 
1363
                self.LeftWidget.pack_start(aboutLabel, False, False)
 
1364
                self.LeftWidget.pack_start(aboutBin, False, False)
 
1365
        
 
1366
                # Back Button
 
1367
                backButton = gtk.Button(gtk.STOCK_GO_BACK)
 
1368
                backButton.set_use_stock(True)
 
1369
                backButton.connect('clicked', self.Main.BackToMain)
 
1370
                self.LeftWidget.pack_end(backButton, False, False)
 
1371
 
 
1372
                # Profile & Backend Page
 
1373
                self.ProfileBackendPage = ProfileBackendPage(main, context)
 
1374
                self.RightWidget.append_page(self.ProfileBackendPage.Widget, gtk.Label(_("Profile & Backend")))
 
1375
 
 
1376
                # Plugin List
 
1377
                self.PluginListPage = PluginListPage(main, context)
 
1378
                self.RightWidget.append_page(self.PluginListPage.Widget, gtk.Label(_("Plugin List")))
 
1379
 
 
1380
        def ShowAboutDialog(self, widget):
 
1381
                about = AboutDialog()
 
1382
                about.show_all()
 
1383
                about.run()
 
1384
                about.destroy()
 
1385
 
1038
1386
# Page
1039
1387
#
1040
1388
class Page: