/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: 2011-02-18 13:01:03 UTC
  • Revision ID: jelmer@samba.org-20110218130103-fiyk203auk28thpn
Remove some unused imports, fix some formatting.

Show diffs side-by-side

added added

removed removed

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