DictionaryGrid could have a DeleteColumn/DeleteKey funciton

Bug #560333 reported by Rick Spencer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Quickly Widgets
New
Undecided
Rick Spencer

Bug Description

Adding this functionality externally is complex and completely unintuitive:
    def delete_keys_from_store(self, model, path, iter, keys_to_delete):
        d = model.get_value(iter,len(self.grid.keys))
        for k in keys_to_delete:
            if k in d:
                del(d[k])
        if '__desktopcouch_id' in d:
            keys = d.keys()
            for k in keys:
                if k.startswith("__desktopcouch"):
                    dc_key = k.split("__desktopcouch")[1]
                    d[dc_key] = d[k]
                    del(d[k])
                if k == "__record_type":
                    d["record_type"] = d["__record_type"]
                    del(d["__record_type"])
            self.database.delete_record(d['_id'])
            del(d["_rev"])
            del(d["_id"])
            self.database.put_record(Record(d))

Changed in quidgets:
assignee: nobody → Rick Spencer (rick-rickspencer3)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.