/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: Lucas Shrewsbury
  • Date: 2009-08-24 05:45:14 UTC
  • mto: This revision was merged to the branch mainline in revision 663.
  • Revision ID: rollbak@gmail.com-20090824054514-x5cteatkygzhw1ls
Fix #294632 by adding ignored emblem and correct status.
Fix #417966 by setting not emblem and correcting status.

* nautilus-bzr.py:
(BzrExtension.update_file_info): added check for ignored and unversioned files.

* setup.py: 
(data_files): added ignored emblem image.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
from gi.repository import Gtk
 
17
try:
 
18
    import pygtk
 
19
    pygtk.require("2.0")
 
20
except:
 
21
    pass
 
22
 
 
23
import gtk
18
24
 
19
25
from bzrlib.config import GlobalConfig
20
 
from bzrlib.plugins.gtk.preferences.identity import IdentityPage
21
 
from bzrlib.plugins.gtk.preferences.plugins import PluginsPage
22
 
from bzrlib.plugins.gtk.preferences.notifications import NotificationsPage
 
26
from identity import IdentityPage
 
27
from plugins import PluginsPage
 
28
from notifications import NotificationsPage
23
29
 
24
 
class PreferencesWindow(Gtk.Dialog):
 
30
class PreferencesWindow(gtk.Dialog):
25
31
    """Displays global preferences windows."""
26
 
    # Note that we don't allow configuration of aliases or
27
 
    # default log formats. This is because doing so wouldn't make
28
 
    # a lot of sense to pure GUI users. Users that need these settings
 
32
    # Note that we don't allow configuration of aliases or 
 
33
    # default log formats. This is because doing so wouldn't make 
 
34
    # a lot of sense to pure GUI users. Users that need these settings 
29
35
    # will already be familiar with the configuration file.
30
36
 
31
37
    def __init__(self, config=None):
32
38
        """ Initialize the Status window. """
33
 
        super(PreferencesWindow, self).__init__(flags=Gtk.DialogFlags.MODAL)
 
39
        super(PreferencesWindow, self).__init__(flags=gtk.DIALOG_MODAL)
34
40
        self.set_title("Bazaar Preferences")
 
41
        self.set_has_separator(False)
35
42
        self.config = config
36
43
        if self.config is None:
37
44
            self.config = GlobalConfig()
41
48
        self.set_default_size(320, 480)
42
49
        self.set_border_width(0)
43
50
 
44
 
        notebook = Gtk.Notebook()
 
51
        notebook = gtk.Notebook()
45
52
        notebook.set_border_width(12)
46
53
        for (label, page) in self._create_pages():
47
 
            notebook.append_page(page, Gtk.Label(label=label))
 
54
            notebook.append_page(page, gtk.Label(label))
48
55
 
49
56
        notebook.set_current_page(0)
50
 
        content_area = self.get_content_area()
51
 
        content_area.set_border_width(0)
52
 
        content_area.pack_start(notebook, True, True, 0)
53
 
        content_area.show_all()
54
 
        self.get_action_area().set_border_width(12)
 
57
        self.vbox.set_border_width(0)
 
58
        self.vbox.pack_start(notebook, True, True)
 
59
        self.vbox.show_all()
 
60
        self.action_area.set_border_width(12)
55
61
 
56
62
    def _create_pages(self):
57
 
        return [("Identity", IdentityPage(self.config)),
 
63
        return [("Identity", IdentityPage(self.config)), 
58
64
                ("Plugins", PluginsPage()),
59
65
                ("Notifications", NotificationsPage(self.config))]
60
66
 
64
70
    def close(self, widget=None):
65
71
        self.window.destroy()
66
72
 
67
 
 
68
 
class BranchPreferencesWindow(Gtk.Dialog):
 
73
class BranchPreferencesWindow(gtk.Dialog):
69
74
    """Displays global preferences windows."""
70
75
    def __init__(self, config=None):
71
76
        super(BranchPreferencesWindow, self).__init__(config)