~nimit-svnit/gtg/bug-1102453

« back to all changes in this revision

Viewing changes to GTG/gtk/delete_dialog.py

  • Committer: Izidor Matušov
  • Date: 2013-02-25 07:35:07 UTC
  • Revision ID: izidor.matusov@gmail.com-20130225073507-vgts69uthx7z2run
PEP8ification by Nimit

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
import gtk
22
22
 
23
 
from GTG     import _, ngettext
 
23
from GTG import _, ngettext
24
24
from GTG.gtk import ViewConfig
25
25
 
26
26
 
57
57
    def delete_tasks(self, tids=None):
58
58
        if tids:
59
59
            self.tids_todelete = tids
60
 
        #We must at least have something to delete !
 
60
        # We must at least have something to delete !
61
61
        if len(self.tids_todelete) > 0:
62
 
            tasklist=[]
 
62
            tasklist = []
63
63
            self.update_tags = []
64
64
            for tid in self.tids_todelete:
65
65
 
94
94
                                  "Deleting a task cannot be undone, "
95
95
                                  "and will delete the following tasks: ",
96
96
                                  singular)
97
 
            cdlabel2.set_label(ngettext("Are you sure you want to delete this "
98
 
                                       "task?",
99
 
                                       "Are you sure you want to delete these "
100
 
                                       "tasks?",
101
 
                                       singular))
 
97
            cdlabel2.set_label(ngettext("Are you sure you want to delete this"
 
98
                                        " task?",
 
99
                                        "Are you sure you want to delete "
 
100
                                        "these tasks?",
 
101
                                        singular))
102
102
 
103
103
            cdlabel3.set_label(ngettext("Keep selected task",
104
104
                                        "Keep selected tasks",
105
 
                                       singular))
 
105
                                        singular))
106
106
            cdlabel4.set_label(ngettext("Permanently remove task",
107
 
                                       "Permanently remove tasks",
108
 
                                       singular))
 
107
                                        "Permanently remove tasks",
 
108
                                        singular))
109
109
            label_text = label_text[0:label_text.find(":") + 1]
110
110
 
111
 
            #we don't want to end with just one task that doesn't fit the
 
111
            # we don't want to end with just one task that doesn't fit the
112
112
            # screen and a line saying "And one more task", so we go a
113
113
            # little over our limit
114
114
            missing_titles_count = len(tasklist) - self.MAXIMUM_TIDS_TO_SHOW