Fix ComboBox error in the FileChooserDialog.

This commit is contained in:
Romain Failliot 2016-07-04 21:56:17 -04:00
parent 70b030acb9
commit 721a8d04fe
1 changed files with 2 additions and 1 deletions

View File

@ -717,7 +717,7 @@ def norm_encoding(e):
class EncodingMenu(gtk.HBox): class EncodingMenu(gtk.HBox):
def __init__(self, prefs, autodetect=False): def __init__(self, prefs, autodetect=False):
gtk.HBox.__init__(self) gtk.HBox.__init__(self)
self.combobox = combobox = gtk.combo_box_new_text() self.combobox = combobox = gtk.ComboBoxText.new()
self.encodings = prefs.getEncodings()[:] self.encodings = prefs.getEncodings()[:]
for e in self.encodings: for e in self.encodings:
combobox.append_text(e) combobox.append_text(e)
@ -6741,6 +6741,7 @@ class FileChooserDialog(gtk.FileChooserDialog):
gtk.FileChooserDialog.__init__(self, title, parent, action, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, accept, gtk.RESPONSE_OK)) gtk.FileChooserDialog.__init__(self, title, parent, action, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, accept, gtk.RESPONSE_OK))
self.prefs = prefs self.prefs = prefs
hbox = gtk.HBox() hbox = gtk.HBox()
hbox.set_border_width(5)
label = gtk.Label(_('Encoding: ')) label = gtk.Label(_('Encoding: '))
hbox.pack_start(label, False, False, 0) hbox.pack_start(label, False, False, 0)
label.show() label.show()