25
25
from bzrlib.config import GlobalConfig
26
26
from identity import IdentityPage
27
27
from plugins import PluginsPage
28
from notifications import NotificationsPage
30
29
class PreferencesWindow(gtk.Dialog):
31
30
"""Displays global preferences windows."""
38
37
""" Initialize the Status window. """
39
38
super(PreferencesWindow, self).__init__(flags=gtk.DIALOG_MODAL)
40
39
self.set_title("Bazaar Preferences")
41
self.set_has_separator(False)
42
40
self.config = config
43
41
if self.config is None:
44
42
self.config = GlobalConfig()
48
self.set_default_size(320, 480)
49
self.set_border_width(0)
48
self.set_default_size(600, 600)
51
49
notebook = gtk.Notebook()
52
notebook.set_border_width(12)
53
50
for (label, page) in self._create_pages():
54
notebook.append_page(page, gtk.Label(label))
56
notebook.set_current_page(0)
57
self.vbox.set_border_width(0)
51
notebook.insert_page(page, gtk.Label(label))
58
52
self.vbox.pack_start(notebook, True, True)
59
53
self.vbox.show_all()
60
self.action_area.set_border_width(12)
62
55
def _create_pages(self):
63
56
return [("Identity", IdentityPage(self.config)),
64
("Plugins", PluginsPage()),
65
("Notifications", NotificationsPage(self.config))]
57
("Plugins", PluginsPage())]
68
60
self.window.show_all()