Exemplo n.º 1
0
 def __init__(self, new_row_data=None):
     gnomeglade.Component.__init__(self, paths.ui_dir("EditableList.ui"),
                                   "list_alignment", ["EditableListStore"])
     self.new_row_data = new_row_data
     self.model = self.EditableList.get_model()
     selection = self.EditableList.get_selection()
     selection.connect("changed", self._update_sensitivity)
Exemplo n.º 2
0
 def __init__(self, new_row_data=None):
     gnomeglade.Component.__init__(self, paths.ui_dir("EditableList.ui"),
                                   "list_alignment", ["EditableListStore"])
     self.new_row_data = new_row_data
     self.model = self.EditableList.get_model()
     selection = self.EditableList.get_selection()
     selection.connect("changed", self._update_sensitivity)
Exemplo n.º 3
0
 def __init__(self, ui_file, widget, store, treeview, new_row_data=None):
     gnomeglade.Component.__init__(self, paths.ui_dir(ui_file),
                                   widget, store)
     self.new_row_data = new_row_data
     self.list = getattr(self, treeview)
     self.model = self.list.get_model()
     selection = self.list.get_selection()
     selection.connect("changed", self._update_sensitivity)
Exemplo n.º 4
0
 def __init__(self, ui_file, widget, store, treeview, new_row_data=None):
     gnomeglade.Component.__init__(self, paths.ui_dir(ui_file), widget,
                                   store)
     self.new_row_data = new_row_data
     self.list = getattr(self, treeview)
     self.model = self.list.get_model()
     selection = self.list.get_selection()
     selection.connect("changed", self._update_sensitivity)
Exemplo n.º 5
0
 def __init__(self, parent):
     gnomeglade.Component.__init__(self, paths.ui_dir("findbar.ui"),
                                   "findbar", ["arrow_left", "arrow_right"])
     gnomeglade.connect_signal_handlers(self)
     self.textview = None
     self.orig_base_color = self.find_entry.get_style().base[0]
     self.arrow_left.show()
     self.arrow_right.show()
     parent.connect('set-focus-child', self.on_focus_child)
Exemplo n.º 6
0
 def __init__(self, parent):
     gnomeglade.Component.__init__(self, paths.ui_dir("findbar.ui"),
                                   "findbar", ["arrow_left", "arrow_right"])
     gnomeglade.connect_signal_handlers(self)
     self.textview = None
     self.orig_base_color = self.find_entry.get_style().base[0]
     self.arrow_left.show()
     self.arrow_right.show()
     parent.connect('set-focus-child', self.on_focus_child)
Exemplo n.º 7
0
    def __init__(self, parent):
        gnomeglade.Component.__init__(self, paths.ui_dir("vcview.ui"),
                                      "commitdialog")
        self.parent = parent
        self.widget.set_transient_for(parent.widget.get_toplevel())
        selected = parent._get_selected_files()

        try:
            to_commit = parent.vc.get_files_to_commit(selected)
            topdir = parent.vc.root
            if to_commit:
                to_commit = ["\t" + s for s in to_commit]
            else:
                to_commit = ["\t" + _("No files will be committed")]
        except NotImplementedError:
            topdir = _commonprefix(selected)
            to_commit = ["\t" + s[len(topdir) + 1:] for s in selected]
        self.changedfiles.set_text("(in %s)\n%s" %
                                   (topdir, "\n".join(to_commit)))

        fontdesc = pango.FontDescription(self.parent.prefs.get_current_font())
        self.textview.modify_font(fontdesc)
        commit_prefill = self.parent.vc.get_commit_message_prefill()
        if commit_prefill:
            buf = self.textview.get_buffer()
            buf.set_text(commit_prefill)
            buf.place_cursor(buf.get_start_iter())

        # Try and make the textview wide enough for a standard 80-character
        # commit message.
        context = self.textview.get_pango_context()
        metrics = context.get_metrics(fontdesc, context.get_language())
        char_width = metrics.get_approximate_char_width()
        self.textview.set_size_request(80 * pango.PIXELS(char_width), -1)

        self.widget.show_all()
Exemplo n.º 8
0
    def __init__(self, parent):
        gnomeglade.Component.__init__(self, paths.ui_dir("vcview.ui"),
                                      "commitdialog")
        self.parent = parent
        self.widget.set_transient_for(parent.widget.get_toplevel())
        selected = parent._get_selected_files()

        try:
            to_commit = parent.vc.get_files_to_commit(selected)
            topdir = parent.vc.root
            if to_commit:
                to_commit = ["\t" + s for s in to_commit]
            else:
                to_commit = ["\t" + _("No files will be committed")]
        except NotImplementedError:
            topdir = _commonprefix(selected)
            to_commit = ["\t" + s[len(topdir) + 1:] for s in selected]
        self.changedfiles.set_text("(in %s)\n%s" %
                                   (topdir, "\n".join(to_commit)))

        fontdesc = pango.FontDescription(self.parent.prefs.get_current_font())
        self.textview.modify_font(fontdesc)
        commit_prefill = self.parent.vc.get_commit_message_prefill()
        if commit_prefill:
            buf = self.textview.get_buffer()
            buf.set_text(commit_prefill)
            buf.place_cursor(buf.get_start_iter())

        # Try and make the textview wide enough for a standard 80-character
        # commit message.
        context = self.textview.get_pango_context()
        metrics = context.get_metrics(fontdesc, context.get_language())
        char_width = metrics.get_approximate_char_width()
        self.textview.set_size_request(80 * pango.PIXELS(char_width), -1)

        self.widget.show_all()
Exemplo n.º 9
0
 def __init__(self, parent):
     gnomeglade.Component.__init__(self, paths.ui_dir("vcview.ui"),
                                   "pushdialog")
     self.parent = parent
     self.widget.set_transient_for(parent.widget.get_toplevel())
     self.widget.show_all()
Exemplo n.º 10
0
 def __init__(self):
     gnomeglade.Component.__init__(self, paths.ui_dir("findbar.ui"), "findbar")
     gnomeglade.connect_signal_handlers(self)
     self.textview = None
     self.orig_base_color = self.find_entry.get_style().base[0]
Exemplo n.º 11
0
 def __init__(self):
     gnomeglade.Component.__init__(self, paths.ui_dir("findbar.ui"),
                                   "findbar")
     gnomeglade.connect_signal_handlers(self)
     self.textview = None
     self.orig_base_color = self.find_entry.get_style().base[0]
Exemplo n.º 12
0
 def __init__(self, parent):
     gnomeglade.Component.__init__(self, paths.ui_dir("vcview.ui"),
                                   "pushdialog")
     self.parent = parent
     self.widget.set_transient_for(parent.widget.get_toplevel())
     self.widget.show_all()