Allow to translate title of ColorSelectionDialog

This commit is contained in:
Cédric Krier committed 2012-02-22 11:02:06 +01:00
1 parent 17b1cac21d
commit 3b18e6f8dd
1 file changed
+5 -1
@@ -491,7 +491,11 @@ class RichTextBox(TextBox):
if tag in ['foreground', 'background']:
# Deactivate focus_out to not lose selection
self.focus_out = False
dialog = gtk.ColorSelectionDialog("Select a color %s" % tag)
labels = {
'foreground': _('Select a foreground color'),
'background': _('Select a background color'),
}
dialog = gtk.ColorSelectionDialog(labels[tag])
dialog.set_transient_for(get_toplevel_window())
dialog.set_resizable(False)
dialog.colorsel.set_has_palette(True)