Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.4rc1, 0.4rc2, and 0.4rc3

hggtk/clone: ellipsize long source paths on drop-down list

Changeset dcd907aac480

Parent c2119bec5f90

by TK Soh

Changes to one file · Browse files at dcd907aac480 Showing diff from parent c2119bec5f90 Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​clone.py Stacked
 
13
14
15
 
16
17
18
 
82
83
84
 
85
86
87
88
 
 
 
 
 
 
 
 
89
90
91
 
13
14
15
16
17
18
19
 
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
@@ -13,6 +13,7 @@
 import os  import sys  import gtk +import pango  from dialog import question_dialog, error_dialog, info_dialog  from mercurial import hg, ui, cmdutil, util  from mercurial.i18n import _ @@ -82,10 +83,19 @@
  lbl.set_property("width-chars", ewidth)   lbl.set_alignment(0, 0.5)   + # create drop-down list for source paths   self._srclist = gtk.ListStore(str)   self._srclistbox = gtk.ComboBoxEntry(self._srclist, 0)   self._src_input = self._srclistbox.get_child()   self._src_input.set_text(self._src_path) + + # replace the drop-down widget so we can modify it's properties + self._srclistbox.clear() + cell = gtk.CellRendererText() + cell.set_property('ellipsize', pango.ELLIPSIZE_MIDDLE) + self._srclistbox.pack_start(cell) + self._srclistbox.add_attribute(cell, 'text', 0) +   self._btn_src_browse = gtk.Button("Browse...")   self._btn_src_browse.connect('clicked', self._btn_src_clicked)   srcbox.pack_start(lbl, False, False)