예제 #1
0
    def add_cb(self, *arg):
        name = string.strip(self.name.get_text())
        if name == '': return

        table = self.get()
        field = Types.FieldDescription(name, self.current_menu)
        table[string.lower(name)] = field
        self.set(table)

        self.changed = 1
        return
예제 #2
0
 def page1_add(self, *args):
     t = self.menu_items[0]
     description = Types.FieldDescription('')
     iter = self.fm.append(
         ('new field', _typename[t], '_new field_', description))
     if iter:
         s_iter = self.sfm.convert_child_iter_to_iter(None, iter)
         s_path = self.sfm.get_path(s_iter)
         self.fields1.scroll_to_cell(s_path)
         self.s1.select_iter(s_iter)
         self.check()
예제 #3
0
    )),
    'Unpublished': ((
        'author',
        'title',
        'note',
    ), ('date', )),
}

Config.set('base/lyxpipe', '~/.lyx/lyxpipe')

# --------------------------------------------------

desc = {}
# create the hash table
for f in fields:
    desc[string.lower(f)] = Types.FieldDescription(f)

# Special fields

desc['author'].type = Fields.AuthorGroup
desc['editor'].type = Fields.AuthorGroup
desc['date'].type = Fields.Date
desc['crossref'].type = Fields.Reference
desc['url'].type = Fields.URL

desc['abstract'].type = Fields.LongText
desc['annotate'].type = Fields.LongText
desc['note'].type = Fields.LongText
desc['quote'].type = Fields.LongText
desc['remarks'].type = Fields.LongText
#desc ['beigabevermerk'].type      = Fields.LongText