Subversion Repositories basico

Rev

Rev 4 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 74
Line 78... Line 78...
78
        selection.set_mode(Gtk.SelectionMode.SINGLE)
78
        selection.set_mode(Gtk.SelectionMode.SINGLE)
79
        self.treeview.set_search_entry(self.pname)
79
        self.treeview.set_search_entry(self.pname)
80
80
81
81
82
    def delete_project(self, *args):
82
    def delete_project(self, *args):
-
 
83
        db = self.get_service('DB')
83
        found = 0
84
        found = 0
84
        selection = self.treeview.get_selection()
85
        selection = self.treeview.get_selection()
85
        result = selection.get_selected()
86
        result = selection.get_selected()
86
        if result: #result could be None
87
        if result: #result could be None
87
            model, iter = result
88
            model, iter = result
88
            project = model.get_value(iter, 1)
89
            project = model.get_value(iter, 1)
89
            self.log.debug(project)
90
            self.log.debug(project)
90
            sapnotes = self.sap.get_notes()
-
 
-
 
91
            sapnotes = db.get_notes()
91
            for sapnote in sapnotes:
92
            for sapnote in sapnotes:
92
                projects = sapnotes[sapnote]['projects']
93
                projects = sapnotes[sapnote]['projects']
93
                if project in projects:
94
                if project in projects:
94
                    found += 1
95
                    found += 1
95
            if found > 1:
96
            if found > 1: