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

gtklib: fix encoding of 'Save As' dialog title

In case of using Windows native dialog, the title
string must be local encoding.

Changeset 43e87ee73cab

Parent f3d138570120

by Yuki KODAMA

Changes to one file · Browse files at 43e87ee73cab Showing diff from parent f3d138570120 Diff from another changeset...

Change 1 of 3 Show Entire File hggtk/​gtklib.py Stacked
 
10
11
12
13
 
14
15
16
 
198
199
200
201
 
202
203
204
 
208
209
210
211
212
213
214
215
216
 
 
 
 
217
218
219
 
10
11
12
 
13
14
15
16
 
198
199
200
 
201
202
203
204
 
208
209
210
 
 
 
 
 
 
211
212
213
214
215
216
217
@@ -10,7 +10,7 @@
 import pango    from thgutil.i18n import _ -from thgutil import paths +from thgutil import paths, hglib    from hggtk import hgtk   @@ -198,7 +198,7 @@
  Flags=win32con.OFN_EXPLORER,   File=self.FileName,   DefExt='py', - Title=self.Title, + Title=hglib.fromutf(self.Title),   Filter="",   CustomFilter="",   FilterIndex=1) @@ -208,12 +208,10 @@
  return False     def runCompatible(self): - file_save = gtk.FileChooserDialog(self.Title,None, - gtk.FILE_CHOOSER_ACTION_SAVE - , (gtk.STOCK_CANCEL - , gtk.RESPONSE_CANCEL - , gtk.STOCK_SAVE - , gtk.RESPONSE_OK)) + file_save = gtk.FileChooserDialog(self.Title, None, + gtk.FILE_CHOOSER_ACTION_SAVE, + (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, + gtk.STOCK_SAVE, gtk.RESPONSE_OK))   file_save.set_do_overwrite_confirmation(True)   file_save.set_default_response(gtk.RESPONSE_OK)   file_save.set_current_folder(self.InitialDir)