Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

bookmark: 'Set Current Mark' dialog does not need 2nd input field

Due to merge with another bookmark.py change, the 'Set Current Mark'
dialog was showing a useless 2nd input field. This eliminates it.

Changeset e8413dc51ce9

Parent 6cd92f95a0af

by Paul Molodowitch

Changes to one file · Browse files at e8413dc51ce9 Showing diff from parent 6cd92f95a0af Diff from another changeset...

 
72
73
74
75
76
77
78
79
80
81
82
83
84
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
 
87
88
89
 
93
94
95
96
 
 
97
98
99
 
72
73
74
 
 
 
 
 
 
 
 
 
 
 
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
 
97
98
99
 
100
101
102
103
104
@@ -72,18 +72,22 @@
  table.add_row(label, self._bookmarklistbox, padding=False)     ## add entry - trackcurrent = self.repo.ui.configbool('bookmarks', 'track.current') - entry = gtk.Entry() - if type == TYPE_ADDREMOVE: - self._rev_input = entry - entry.set_width_chars(12) - entry.set_text(rev) - label = _('Revision:') - elif type == TYPE_RENAME: - self._name_input = entry - label = _('New Name:') - table.add_row(label, entry, padding=False) + if type == TYPE_CURRENT: + entry = None + else: + entry = gtk.Entry() + if type == TYPE_ADDREMOVE: + self._rev_input = entry + entry.set_width_chars(12) + entry.set_text(rev) + label = _('Revision:') + elif type == TYPE_RENAME: + self._name_input = entry + label = _('New Name:') + table.add_row(label, entry, padding=False) +   # Option to make new bookmark the active one + trackcurrent = self.repo.ui.configbool('bookmarks', 'track.current')   if type == TYPE_ADDREMOVE and trackcurrent:   check = gtk.CheckButton(_('Make new bookmark current'))   self.opt_newcurrent = check @@ -93,7 +97,8 @@
  # signal handlers   self.connect('response', self.dialog_response)   self._bookmark_input.connect('activate', self.entry_activated, type) - entry.connect('activate', self.entry_activated, type) + if entry: + entry.connect('activate', self.entry_activated, type)   if type == TYPE_ADDREMOVE:   self._bookmark_input.connect('changed', self.bookmark_changed)   if trackcurrent: