def __init__(self): QuestionDialog.__init__(self, _("Enable Version Control?"), # T: Question dialog _("Version control is currently not enabled for this notebook.\n" "Do you want to enable it?" ) # T: Detailed question ) self.combobox = gtk.combo_box_new_text() for option in (VCS.BZR, VCS.GIT, VCS.HG): if VCS.check_dependencies(option): self.combobox.append_text(option) self.combobox.set_active(0) hbox = gtk.HBox(spacing=5) hbox.pack_end(self.combobox, False) hbox.pack_end(gtk.Label(_('Backend') + ':'), False) # T: option to chose versioncontrol backend self.vbox.pack_start(hbox, False) hbox.show_all()
def __init__(self, parent): QuestionDialog.__init__( self, parent, ( _("Enable Version Control?"), # T: Question dialog _("Version control is currently not enabled for this notebook.\n" "Do you want to enable it?") # T: Detailed question )) self.combobox = Gtk.ComboBoxText() for option in (VCS.BZR, VCS.GIT, VCS.HG, VCS.FOSSIL): if VCS.check_dependencies(option): self.combobox.append_text(option) self.combobox.set_active(0) hbox = Gtk.Box(spacing=5) hbox.add(Gtk.Label(_('Backend') + ':')) hbox.add(self.combobox) # T: option to chose versioncontrol backend hbox.set_halign(Gtk.Align.CENTER) self.vbox.pack_start(hbox, False, False, 0) hbox.show_all()