/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to preferences/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2008-06-29 18:12:29 UTC
  • mto: This revision was merged to the branch mainline in revision 519.
  • Revision ID: jelmer@samba.org-20080629181229-1l2m4cf7vvbyh8qg
Simplify progress bar code, use embedded progress bar inside viz window.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
from bzrlib.config import GlobalConfig
26
26
from identity import IdentityPage
27
27
from plugins import PluginsPage
28
 
from notifications import NotificationsPage
29
28
 
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()
45
43
        self._create()
 
44
        self._create_pages()
 
45
 
46
46
 
47
47
    def _create(self):
48
 
        self.set_default_size(320, 480)
49
 
        self.set_border_width(0)
50
 
 
 
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))
55
 
 
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)
61
54
 
62
55
    def _create_pages(self):
63
56
        return [("Identity", IdentityPage(self.config)), 
64
 
                ("Plugins", PluginsPage()),
65
 
                ("Notifications", NotificationsPage(self.config))]
 
57
                ("Plugins", PluginsPage())]
66
58
 
67
59
    def display(self):
68
60
        self.window.show_all()