Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

commit: move message history label inside combo box

A bit of magic to save some H space in the branch/qnew/history bar.
At dialog startup, put 'recent commit history...' in the combo box.
When the combo is activated, load the real history into it.

Changeset 155419bf203a

Parent a7cacdf9595c

by Steve Borho

Changes to one file · Browse files at 155419bf203a Showing diff from parent a7cacdf9595c Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​commit.py Stacked
 
114
115
116
 
 
 
 
117
118
119
120
121
122
123
124
125
126
127
128
129
130
 
136
137
138
 
139
140
141
142
143
144
145
 
146
147
148
149
150
151
152
153
154
155
156
157
158
 
 
 
 
 
159
160
161
162
163
164
165
166
 
114
115
116
117
118
119
120
121
122
123
124
 
125
126
127
128
129
 
130
131
132
 
138
139
140
141
142
143
144
145
146
147
 
148
149
150
151
152
153
 
 
 
154
155
156
157
158
159
160
161
162
163
164
165
166
 
 
167
168
169
@@ -114,17 +114,19 @@
  buf.set_text(model[index][1])   buf.set_modified(False)   + def _first_msg_popdown(self, combo, shown): + combo.disconnect(self.popupid) + self._update_recent_messages() +   def _update_recent_messages(self, msg=None):   if msg is not None:   self._mru_messages.add(msg)   self.settings.write() -   liststore = self.msg_cbbox.get_model()   liststore.clear()   for msg in self._mru_messages:   sumline = msg.split("\n")[0]   liststore.append([sumline, msg]) - #self.msg_cbbox.set_active(-1)     def get_body(self):   status_body = GStatus.get_body(self) @@ -136,31 +138,32 @@
  label = gtk.Label(_('Branch: '))   mbox.pack_start(label, False, False, 2)   self.branchentry = gtk.Entry() + self.branchentry.set_width_chars(12)   mbox.pack_start(self.branchentry, False, False, 2)     if hasattr(self.repo, 'mq'):   label = gtk.Label('QNew: ')   mbox.pack_start(label, False, False, 2)   self.qnew_name = gtk.Entry() - self.qnew_name.set_width_chars(6) + self.qnew_name.set_width_chars(12)   self.qnew_name.connect('changed', self._qnew_changed)   mbox.pack_start(self.qnew_name, False, False, 2)   else:   self.qnew_name = None   - label = gtk.Label(_('Recent Commit Messages: ')) - mbox.pack_start(label, False, False, 2) - self.msg_cbbox = gtk.combo_box_new_text()   liststore = gtk.ListStore(str, str)   self.msg_cbbox = gtk.ComboBox(liststore)   cell = gtk.CellRendererText()   self.msg_cbbox.pack_start(cell, True)   self.msg_cbbox.add_attribute(cell, 'text', 0) + liststore.append([_('Recent Commit Messages...'), '']) + self.msg_cbbox.set_active(0) + self.popupid = self.msg_cbbox.connect('notify::popup-shown', + self._first_msg_popdown) + self.msg_cbbox.connect('changed', self.changed_cb)   mbox.pack_start(self.msg_cbbox)   vbox.pack_start(mbox, False, False)   self._mru_messages = self.settings.mrul('recent_messages') - self._update_recent_messages() - self.msg_cbbox.connect('changed', self.changed_cb)     frame = gtk.Frame()   frame.set_shadow_type(gtk.SHADOW_ETCHED_IN)