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

gdialog: fix UTF-8 error in message dialogs

Changeset 7946187e1b6b

Parent b2cdc4ec5a31

by TK Soh

Changes to one file · Browse files at 7946187e1b6b Showing diff from parent b2cdc4ec5a31 Diff from another changeset...

Change 1 of 3 Show Entire File hggtk/​gdialog.py Stacked
 
30
31
32
 
33
34
35
 
43
44
45
46
47
 
 
48
49
50
 
52
53
54
55
 
56
57
58
59
 
60
61
62
63
64
65
66
 
67
68
69
 
30
31
32
33
34
35
36
 
44
45
46
 
 
47
48
49
50
51
 
53
54
55
 
56
57
58
59
 
60
61
62
63
64
65
66
 
67
68
69
70
@@ -30,6 +30,7 @@
 from shlib import shell_notify, set_tortoise_icon, Settings  from thgconfig import ConfigDialog  from gtklib import MessageDialog +from hglib import toutf      class SimpleMessage(MessageDialog): @@ -43,8 +44,8 @@
  def __init__(self, title, message, parent):   SimpleMessage.__init__(self, parent, gtk.DIALOG_MODAL,   gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE) - self.set_title(title) - self.set_markup('<b>' + message + '</b>') + self.set_title(toutf(title)) + self.set_markup('<b>' + toutf(message) + '</b>')    class Confirm(SimpleMessage):   """Dialog returns gtk.RESPONSE_YES or gtk.RESPONSE_NO @@ -52,18 +53,18 @@
  def __init__(self, title, files, parent, primary=None):   SimpleMessage.__init__(self, parent, gtk.DIALOG_MODAL,   gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO) - self.set_title('Confirm ' + title) + self.set_title(toutf('Confirm ' + title))   if primary is None:   primary = title + ' file' + ((len(files) > 1 and 's') or '') + '?'   primary = '<b>' + primary + '</b>' - self.set_markup(primary) + self.set_markup(toutf(primary))   message = ''   for i, file in enumerate(files):   message += ' ' + file + '\n'   if i == 9:   message += ' ...\n'   break - self.format_secondary_text(message) + self.format_secondary_text(toutf(message))      class GDialog(gtk.Window):