utf8-migration-tool-0.5.7/ 0000755 0000000 0000000 00000000000 11753324465 012253 5 ustar utf8-migration-tool-0.5.7/glade/ 0000755 0000000 0000000 00000000000 10442763136 013323 5 ustar utf8-migration-tool-0.5.7/glade/wizard_login.glade 0000644 0000000 0000000 00000033562 10216111230 016777 0 ustar
window1GTK_WINDOW_TOPLEVELGTK_WIN_POS_NONEFalseTrueFalseTrueFalseFalseGDK_WINDOW_TYPE_HINT_NORMALGDK_GRAVITY_NORTH_WESTTrue6TrueFalse0TrueTrueLogin configurationFalseFalseGTK_JUSTIFY_LEFTTrueTrue0.50.500PANGO_ELLIPSIZE_NONE-1False00FalseFalseTrueYour current locale FalseFalseGTK_JUSTIFY_LEFTFalseFalse0.50.500PANGO_ELLIPSIZE_NONE-1False00FalseFalseTrue33False55TrueLocaleFalseFalseGTK_JUSTIFY_LEFTFalseFalse00.500PANGO_ELLIPSIZE_NONE-1False00112fillTrueEncodingFalseFalseGTK_JUSTIFY_LEFTFalseFalse00.500PANGO_ELLIPSIZE_NONE-1False00123fillTruelblCurrentLocaleFalseFalseGTK_JUSTIFY_LEFTFalseFalse00.500PANGO_ELLIPSIZE_NONE-1False01212fillTruelblCurrentEncodingFalseFalseGTK_JUSTIFY_LEFTFalseFalse00.500PANGO_ELLIPSIZE_NONE-1False01223fillTrueCurrentFalseFalseGTK_JUSTIFY_LEFTFalseFalse00.500PANGO_ELLIPSIZE_NONE-1False01201fillTrueNewFalseFalseGTK_JUSTIFY_LEFTFalseFalse00.500PANGO_ELLIPSIZE_NONE-1False02301fillTrueFalse0TruelblNewEncodingFalseFalseGTK_JUSTIFY_LEFTFalseFalse00.500PANGO_ELLIPSIZE_NONE-1False00FalseFalse2323fillfillTrueFalse0TrueFalseTrue0TrueTruelblNewLocaleFalseFalseGTK_JUSTIFY_LEFTFalseFalse00.500PANGO_ELLIPSIZE_NONE-1False00FalseFalse2312fillfill0TrueTrueGTK_PACK_END
utf8-migration-tool-0.5.7/glade/wizard_convertfiles.gladep 0000644 0000000 0000000 00000000405 10216401600 020543 0 ustar
FALSE
utf8-migration-tool-0.5.7/glade/wizard_welcome.glade 0000644 0000000 0000000 00000004601 10443003247 017324 0 ustar
window1GTK_WINDOW_TOPLEVELGTK_WIN_POS_NONEFalseTrueFalseTrueFalseFalseGDK_WINDOW_TYPE_HINT_NORMALGDK_GRAVITY_NORTH_WESTTrue6TrueFalse0TrueTrueWelcome to the Debian UTF-8 Migration tool
This wizard will guide you through the required steps to help you convert your system from your legacy locale to UTF-8.
Note that the second step might take some time, as it needs to scan the whole of your home directory for file names which need to be converted.FalseFalseGTK_JUSTIFY_LEFTTrueTrue0.50.500PANGO_ELLIPSIZE_NONE-1False00FalseFalse
utf8-migration-tool-0.5.7/glade/wizard_welcome.gladep 0000644 0000000 0000000 00000000405 10202426326 017502 0 ustar
FALSE
utf8-migration-tool-0.5.7/glade/wizard_login.gladep 0000644 0000000 0000000 00000000405 10216111230 017145 0 ustar
FALSE
utf8-migration-tool-0.5.7/glade/wizard.gladep 0000644 0000000 0000000 00000000336 10202232342 015763 0 ustar
utf8-migration-tool-0.5.7/glade/wizard_convertfiles.glade 0000644 0000000 0000000 00000010430 10216401600 020362 0 ustar
window1GTK_WINDOW_TOPLEVELGTK_WIN_POS_NONEFalseTrueFalseTrueFalseFalseGDK_WINDOW_TYPE_HINT_NORMALGDK_GRAVITY_NORTH_WESTTrue6TrueFalse0TrueTrueFile name conversionFalseFalseGTK_JUSTIFY_LEFTTrueTrue0.50.500PANGO_ELLIPSIZE_NONE-1False00FalseFalseTrueA number of your files have legacy names. They need to be renamed to work correctly with an UTF-8 localeFalseFalseGTK_JUSTIFY_LEFTTrueFalse0.50.500PANGO_ELLIPSIZE_NONE-1False00FalseFalseTrueTrueGTK_POLICY_AUTOMATICGTK_POLICY_AUTOMATICGTK_SHADOW_INGTK_CORNER_TOP_LEFTTrueTrueTrueFalseFalseTrueFalseFalseFalse0TrueTrue
utf8-migration-tool-0.5.7/glade/wizard.glade 0000644 0000000 0000000 00000016452 10202232342 015611 0 ustar
GTK_WINDOW_TOPLEVELGTK_WIN_POS_CENTERFalseTrueFalseTrueFalseFalseGDK_WINDOW_TYPE_HINT_DIALOGGDK_GRAVITY_NORTH_WESTTrueTrueFalse0TrueGDK_EXPOSURE_MASKTrueFalseTrueFalse00FalseTrueTrueFalse0TrueTrueFalse6TrueFalse0TrueThis should be a huge titleTrueTrueGTK_JUSTIFY_LEFTFalseFalse0.50.566PANGO_ELLIPSIZE_NONE-1False00FalseFalseTruegtk-refresh410660TrueTrue0FalseTrue6TrueTrueFalse500250True00.5GTK_SHADOW_OUTTrueFalse00TrueTrue6TrueGTK_BUTTONBOX_DEFAULT_STYLE0TrueTrueTruegtk-go-backTrueGTK_RELIEF_NORMALTrueTrueTrueTruegtk-go-forwardTrueGTK_RELIEF_NORMALTrue0FalseFalseGTK_PACK_END0TrueTrue
utf8-migration-tool-0.5.7/hook 0000644 0000000 0000000 00000000320 10443005566 013122 0 ustar Name: UTF-8 Migration Tool
Priority: Medium
Command: /usr/bin/utf8migrationtool
Terminal: False
Description: UTF-8 locale migration tool
This wizard upgrades legacy system locales to their UTF-8 equivalent.
utf8-migration-tool-0.5.7/pylib/ 0000755 0000000 0000000 00000000000 10442762676 013376 5 ustar utf8-migration-tool-0.5.7/pylib/configure.py 0000644 0000000 0000000 00000000064 10202432220 015676 0 ustar
gladedir = '/usr/share/utf8-migration-tool/glade'
utf8-migration-tool-0.5.7/pylib/gdmConfigParser.py 0000644 0000000 0000000 00000001451 10211470034 016775 0 ustar import ConfigParser
class gdmConfigParser(ConfigParser.RawConfigParser):
def write(self, fp):
"""Write an .ini-format representation of the configuration state."""
if self._defaults:
fp.write("[%s]\n" % DEFAULTSECT)
for (key, value) in self._defaults.items():
fp.write("%s=%s\n" % (key, str(value).replace('\n', '\n\t')))
fp.write("\n")
for section in self._sections:
fp.write("[%s]\n" % section)
for (key, value) in self._sections[section].items():
if key != "__name__":
fp.write("%s=%s\n" %
(key, str(value).replace('\n', '\n\t')))
fp.write("\n")
def optionxform(self, optionstr):
return optionstr.capitalize()
utf8-migration-tool-0.5.7/pylib/wizard/ 0000755 0000000 0000000 00000000000 10602210130 014641 5 ustar utf8-migration-tool-0.5.7/pylib/wizard/save.py 0000644 0000000 0000000 00000031211 10201160266 016160 0 ustar # -*- Mode: Python; test-case-name: flumotion.test.test_wizard -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# Flumotion - a streaming media server
# Copyright (C) 2004,2005 Fluendo, S.L. (www.fluendo.com). All rights reserved.
# This file may be distributed and/or modified under the terms of
# the GNU General Public License version 2 as published by
# the Free Software Foundation.
# This file is distributed without any warranty; without even the implied
# warranty of merchantability or fitness for a particular purpose.
# See "LICENSE.GPL" in the source distribution for more information.
# Licensees having purchased or holding a valid Flumotion Advanced
# Streaming Server license may use this file in accordance with the
# Flumotion Advanced Streaming Server Commercial License Agreement.
# See "LICENSE.Flumotion" in the source distribution for more information.
# Headers in this file shall remain intact.
from flumotion.common import log
from flumotion.wizard import enums
class Component:
def __init__(self, name, type, properties={}, worker=None):
log.debug('Creating component %s (%s) worker=%r' % (
name, type, worker))
self.name = name
self.type = type
self.props = properties
self.worker = worker
self.eaters = []
self.feeders = []
def __repr__(self):
return '' % self.name
def addEater(self, component):
self.eaters.append(component)
def addFeeder(self, component):
self.feeders.append(component)
def link(self, component):
self.feeders.append(component)
component.addEater(self)
def getFeeders(self):
s = []
for source in self.feeders:
if source.type == 'firewire':
if self.name in ('video-encoder', 'video-overlay'):
feed = 'video'
else:
feed = 'audio'
s.append('%s:%s' % (source.name, feed))
else:
s.append(source.name)
return s
def toXML(self):
if self.worker:
extra = ' worker="%s"' % self.worker
else:
extra = ''
s = ' \n' % (self.name,
self.type,
extra)
# XXX: Handle eaters properly
if self.type == 'firewire':
s += ' audio\n'
s += ' video\n'
else:
s += ' default\n'
for sourceName in self.getFeeders():
s += " %s\n" % sourceName
if self.props:
s += " \n"
property_names = self.props.keys()
property_names.sort()
for name in property_names:
value = self.props[name]
s += " <%s>%s%s>\n" % (name, value, name)
s += " \n"
return s
def printTree(self, indent=1):
print indent * '*', self.name, self.type, \
tuple([f.name for f in self.feeders]) or ''
for eater in self.eaters:
eater.printTree(indent+1)
class WizardSaver:
def __init__(self, wizard):
self.wizard = wizard
def getVideoSource(self):
options = self.wizard.get_step_options('Source')
source = options['video']
video_step = self.wizard[source.step]
if hasattr(video_step, 'worker'):
props = video_step.get_component_properties()
worker = video_step.worker
else:
props = {}
worker = self.wizard['Source'].worker
return Component('video-source', source.component_type, props, worker)
def getVideoOverlay(self, show_logo):
# At this point we already know that we should overlay something
step = self.wizard['Overlay']
properties = step.get_component_properties()
if show_logo:
properties['fluendo_logo'] = True
encoding_options = self.wizard.get_step_options('Encoding')
if (encoding_options['format'] == enums.EncodingFormat.Ogg or
encoding_options['video'] == enums.EncodingVideo.Theora):
properties['xiph_logo'] = True
license_options = self.wizard.get_step_options('Content License')
if license_options['license'] == enums.LicenseType.CC:
properties['cc_logo'] = True
return Component('video-overlay', 'overlay', properties, step.worker)
def getVideoEncoder(self):
options = self.wizard.get_step_options('Encoding')
encoder = options['video']
encoder_step = self.wizard[encoder.step]
return Component('video-encoder', encoder.component_type,
encoder_step.get_component_properties(),
encoder_step.worker)
def getAudioSource(self, video_source):
options = self.wizard.get_step_options('Source')
source = options['audio']
# If we selected firewire and have selected video
# and the selected video is Firewire,
# return the source
if (source == enums.AudioDevice.Firewire and video_source and
options['video'] == enums.VideoDevice.Firewire):
return video_source
props = {}
audio_step = self.wizard[source.step]
if hasattr(audio_step, 'worker'):
props = audio_step.get_component_properties()
worker = audio_step.worker
else:
worker = self.wizard['Source'].worker
return Component('audio-source', source.component_type, props, worker)
def getAudioEncoder(self):
options = self.wizard.get_step_options('Encoding')
encoder = options['audio']
if encoder == enums.EncodingAudio.Mulaw:
props = {}
# FIXME
worker = None
else:
encoder_step = self.wizard[encoder.step]
props = encoder_step.get_component_properties()
worker = encoder_step.worker
return Component('audio-encoder', encoder.component_type, props, worker)
def getMuxer(self, name):
options = self.wizard.get_step_options('Encoding')
step = self.wizard['Encoding']
muxer = options['format']
return Component('multiplexer-' + name, muxer.component_type,
worker=step.worker)
def handleVideo(self, components):
overlay_options = self.wizard.get_step_options('Overlay')
has_overlay = overlay_options['show_logo'] or \
overlay_options['show_text']
video_source = self.getVideoSource()
components.append(video_source)
video_overlay = None
video_encoder = self.getVideoEncoder()
if has_overlay:
video_overlay = self.getVideoOverlay(overlay_options['show_logo'])
components.append(video_overlay)
if video_overlay is not None:
video_overlay.link(video_source)
video_encoder.link(video_overlay)
else:
video_encoder.link(video_source)
components.append(video_encoder)
return video_encoder, video_source
def handleAudio(self, components, video_source):
audio_source = self.getAudioSource(video_source)
# In case of firewire component, which can already be there
if not audio_source in components:
components.append(audio_source)
audio_encoder = self.getAudioEncoder()
components.append(audio_encoder)
audio_encoder.link(audio_source)
return audio_encoder
def handleConsumers(self, components, audio_encoder, video_encoder):
cons_options = self.wizard.get_step_options('Consumption')
has_audio = self.wizard.get_step_option('Source', 'has_audio')
has_video = self.wizard.get_step_option('Source', 'has_video')
audio_muxer = None
if has_audio:
audio_muxer = self.getMuxer('audio')
components.append(audio_muxer)
audio_muxer.link(audio_encoder)
video_muxer = None
if has_video:
video_muxer = self.getMuxer('video')
components.append(video_muxer)
video_muxer.link(video_encoder)
steps = []
both_muxer = None
if has_audio and has_video:
both_muxer = self.getMuxer('audio-video')
components.append(both_muxer)
both_muxer.link(video_encoder)
both_muxer.link(audio_encoder)
if cons_options['http']:
if cons_options['http_audio_video']:
steps.append(('http_audio_video', 'http-audio-video',
'http-streamer',
'HTTP Streamer (audio & video)', both_muxer))
if cons_options['http_audio']:
steps.append(('http_audio', 'http-audio', 'http-streamer',
'HTTP Streamer (audio only)', audio_muxer))
if cons_options['http_video']:
steps.append(('http_video', 'http-video', 'http-streamer',
'HTTP Streamer (video only)', video_muxer))
if cons_options['disk']:
if cons_options['disk_audio_video']:
steps.append(('disk_audio_video', 'disk-audio-video',
'disker', 'Disk (audio & video)',
both_muxer))
if cons_options['disk_audio']:
steps.append(('disk_audio', 'disk-audio', 'disker',
'Disk (audio only)', audio_muxer))
if cons_options['disk_video']:
steps.append(('disk_video', 'disk-video', 'disker',
'Disk (video only)', video_muxer))
elif has_video and not has_audio:
if cons_options['http']:
steps.append(('http_video', 'http-video', 'http-streamer',
'HTTP Streamer (video only)', video_muxer))
if cons_options['disk']:
steps.append(('disk_video', 'disk-video', 'disker',
'Disk (video only)', video_muxer))
elif has_audio and not has_video:
if cons_options['http']:
steps.append(('http_audio', 'http-audio', 'http-streamer',
'HTTP Streamer (audio only)', audio_muxer))
if cons_options['disk']:
steps.append(('disk_audio', 'disk-audio', 'disker',
'Disk (audio only)', audio_muxer))
else:
raise AssertionError
for key, name, type, step_name, muxer in steps:
if not cons_options.has_key(key):
continue
step = self.wizard[step_name]
consumer = Component(name, type, step.get_component_properties(),
step.worker)
consumer.link(muxer)
components.append(consumer)
# Removed unused ones
if audio_muxer and not audio_muxer.eaters:
components.remove(audio_muxer)
if video_muxer and not video_muxer.eaters:
components.remove(video_muxer)
if both_muxer and not both_muxer.eaters:
components.remove(both_muxer)
def getComponents(self):
source_options = self.wizard.get_step_options('Source')
has_video = source_options['has_video']
has_audio = source_options['has_audio']
components = []
video_encoder = None
video_source = None
if has_video:
video_encoder, video_source = self.handleVideo(components)
# Must do audio after video, in case of a firewire audio component
# is selected together with a firewire video component
audio_encoder = None
if has_audio:
audio_encoder = self.handleAudio(components, video_source)
self.handleConsumers(components, audio_encoder, video_encoder)
return components
def getXML(self):
components = self.getComponents()
s = '\n'
s += ' \n'
for component in components:
s += component.toXML()
s += ' \n'
s += '\n'
return s
utf8-migration-tool-0.5.7/pylib/wizard/steps.py 0000644 0000000 0000000 00000012710 10602210130 016352 0 ustar # -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
# U8MG - an utf8 migration tool
#
# Copyright (C) 2005 Tollef Fog Heen
#
# Wizards taken from flumotion,
# Copyright (C) 2004,2005 Fluendo, S.L. (www.fluendo.com). All rights reserved.
# This file may be distributed and/or modified under the terms of
# the GNU General Public License version 2 as published by
# the Free Software Foundation.
# This file is distributed without any warranty; without even the implied
# warranty of merchantability or fitness for a particular purpose.
# See "LICENSE.GPL" in the source distribution for more information.
import gtk, os, gobject
import wizard
def findMatchingLocales(search, encoding = None):
f = open("/usr/share/i18n/SUPPORTED")
ret = []
for line in f.readlines():
(l, e) = line.strip().split(" ")
if search in l and (e == encoding or encoding is None):
ret.append(line.split(" ")[0].strip())
return ret
class Welcome(wizard.WizardStep):
step_name = 'Welcome'
glade_file = 'wizard_welcome.glade'
section = 'Welcome'
section_name = 'Welcome'
icon = 'wizard.png'
has_worker = False
def get_next(self):
return 'Login'
wizard.register_step(Welcome)
class Login(wizard.WizardStep):
step_name = 'Login'
glade_file = 'wizard_login.glade'
section = 'Login'
section_name = 'Login'
icon = 'wizard.png'
has_worker = False
currentLocale = ""
currentEncoding = ""
newLocale = ""
newEncoding = ""
def getNewLocale(self):
if self.currentLocale == 'C':
return self.cbNewLocale.get_model()[self.cbNewLocale.get_active()][0]
else:
return self.lblNewLocale.get_text()
def get_next(self):
return "FileNameConversion"
def before_show(self):
if self.currentEncoding == 'UTF-8':
self.lblLocaleInfo.set_label("Your login configuration is already UTF-8 enabled")
self.tblLocaleInfo.hide()
self.lblCurrentLocale.set_label(self.currentLocale)
self.lblCurrentEncoding.set_label(self.currentEncoding)
self.lblNewLocale.set_label(self.newLocale)
self.lblNewEncoding.set_label(self.newEncoding)
if self.currentLocale == 'C':
self.lblNewLocale.hide()
self.cbNewLocale.set_model(gtk.ListStore(gobject.TYPE_STRING))
for t in findMatchingLocales("en_", encoding = "UTF-8"):
print t
self.cbNewLocale.get_model().append(row=[t])
cell = gtk.CellRendererText()
self.cbNewLocale.pack_start(cell, True)
self.cbNewLocale.add_attribute(cell, 'text', 0)
self.cbNewLocale.set_active(0)
self.cbNewLocale.show()
else:
self.lblNewLocale.show()
self.cbNewLocale.hide()
wizard.register_step(Login)
class FileNameConversion(wizard.WizardStep):
step_name = 'FileNameConversion'
glade_file = 'wizard_convertfiles.glade'
section = 'Convert file names'
section_name = 'Convert file names'
icon = 'wizard.png'
last_step = True
has_worker = False
model = gtk.ListStore(str, str, str)
column = gtk.TreeViewColumn("File name")
currentEncoding = ""
def __init__(self, *params):
super(FileNameConversion, self).__init__(params)
self.renderer = gtk.CellRendererText()
self.column.pack_start(self.renderer, True)
self.column.set_attributes(self.renderer, text=2)
self.renderer.set_property('editable', True)
def edited_cb(self, cell, path, new_text, user_data):
self.model[path][1] = new_text
return
def before_show(self):
filenames = []
for root, dirs, files in os.walk(os.path.expanduser('~'), topdown=False):
for f in files+dirs:
try:
unicode(f, "utf-8")
except UnicodeDecodeError:
try:
filenames.append((root+"/"+f,
root+"/"+unicode(f, self.currentEncoding).encode('utf-8'),
unicode(root+"/"+f, self.currentEncoding)))
except UnicodeDecodeError:
# Sane fallback
filenames.append((root+"/"+f,
root+"/"+unicode(f, "iso8859-1").encode('utf-8'),
unicode(root+"/"+f, "iso8859-1")))
self.set_files(filenames)
if len(filenames) == 0:
self.lblConvertFilesMessage.set_text("All your files have UTF-8 compatible names. No renames needed.")
self.scrolledwindow1.hide()
else:
self.tvFileNames.set_model(self.model)
self.tvFileNames.append_column(self.column)
self.tvFileNames.show_all()
self.scrolledwindow1.set_resize_mode(gtk.RESIZE_IMMEDIATE)
self.scrolledwindow1.resize_children()
self.renderer.connect("edited", self.edited_cb, self.model)
def set_files(self, files):
for f in files:
self.model.append(f)
def get_files(self):
files = []
treeiter = self.model.get_iter_first()
while treeiter is not None:
files.append(self.model.get(treeiter, 0, 1))
treeiter = self.model.iter_next(treeiter)
return files
def get_next(self):
return None
wizard.register_step(FileNameConversion)
utf8-migration-tool-0.5.7/pylib/wizard/__init__.py 0000644 0000000 0000000 00000001140 10201160717 016760 0 ustar # -*- Mode: Python; -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# U8MG - an utf8 migration tool
#
# Copyright (C) 2005 Tollef Fog Heen
#
# Wizards taken from flumotion,
# Copyright (C) 2004,2005 Fluendo, S.L. (www.fluendo.com). All rights reserved.
# This file may be distributed and/or modified under the terms of
# the GNU General Public License version 2 as published by
# the Free Software Foundation.
# This file is distributed without any warranty; without even the implied
# warranty of merchantability or fitness for a particular purpose.
# See "LICENSE.GPL" in the source distribution for more information.
utf8-migration-tool-0.5.7/pylib/wizard/wizard.py 0000644 0000000 0000000 00000037747 10545315552 016561 0 ustar # -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# U8MG - an utf8 migration tool
#
# Copyright (C) 2005 Tollef Fog Heen
#
# Wizards taken from flumotion,
# Copyright (C) 2004,2005 Fluendo, S.L. (www.fluendo.com). All rights reserved.
# This file may be distributed and/or modified under the terms of
# the GNU General Public License version 2 as published by
# the Free Software Foundation.
# This file is distributed without any warranty; without even the implied
# warranty of merchantability or fitness for a particular purpose.
# See "LICENSE.GPL" in the source distribution for more information.
import os
import sets
import gobject
import gtk
import gtk.gdk
import gtk.glade
import configure
def escape(text):
return text.replace('&', '&')
class Stack(list):
push = list.append
def peek(self):
return self[-1]
class WizardStep(object):
step_name = None # Subclass sets this
glade_file = None # Subclass sets this
icon = 'placeholder.png'
widget_prefixes = { gtk.ComboBox : 'combobox',
gtk.CheckButton : 'checkbutton',
gtk.Entry : 'entry',
gtk.SpinButton : 'spinbutton',
gtk.RadioButton : 'radiobutton' }
def __init__(self, wizard):
self.wizard = wizard
self.widget = None
self.visited = False
self.load_glade()
def __repr__(self):
return '' % self.step_name
def load_glade(self):
glade_filename = os.path.join(configure.gladedir, self.glade_file)
self.wtree = gtk.glade.XML(glade_filename)
windows = []
self.widgets = self.wtree.get_widget_prefix('')
for widget in self.widgets:
# So we can access the step from inside the widget
widget.set_data('wizard-step', self)
if isinstance(widget, gtk.Window):
if widget.get_property('visible'):
raise AssertionError('window for %r is visible' % self)
widget.hide()
windows.append(widget)
continue
name = widget.get_name()
if hasattr(self, name):
raise AssertionError("There is already an attribute called %s in %r" % (name, self))
setattr(self, name, widget)
if len(windows) != 1:
raise AssertionError("only one window per glade file allowed, got %r in %r" % (
windows, self))
self.window = windows[0]
child = self.window.get_children()[0]
self.window.remove(child)
self.widget = child
# And at last, connect signals.
self.wtree.signal_autoconnect(self)
def get_component_properties(self):
return self.wizard.get_step_state(self)
def get_main_widget(self):
return self.widget
def get_state(self):
state_dict = {}
for widget in self.widgets:
name = widget.get_name()
prefix = self.widget_prefixes.get(widget.__class__, None)
if not prefix:
continue
try:
key = name.split('_', 1)[1]
except IndexError:
continue
state_dict[key] = widget
return state_dict
def get_name(self):
return self.step_name
def get_sidebar_name(self):
return getattr(self, 'sidebar_name', self.step_name)
def get_section(self):
return getattr(self, 'section', '')
def get_next(self):
"""
@returns name of next step
@rtype string
This is called when the user presses next in the wizard,
A subclass must implement this"""
raise NotImplementedError
def activated(self):
"""Called just before the step is shown, so the step can
do some logic, eg setup the default state
This can be implemented in a subclass"""
def deactivated(self):
"""Called after the user pressed next
This can be implemented in a subclass"""
def setup(self):
"""This is called after the step is constructed, to be able to
do some initalization time logic in the steps.
This can be implemented in a subclass."""
def before_show(self):
"""This is called just before we show the widget, everything
is created and in place
This can be implemented in a subclass."""
def worker_changed(self):
pass
class Wizard(gobject.GObject):
__gsignals__ = {
'finished' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE,
())
}
def __init__(self):
self.__gobject_init__()
self.wtree = gtk.glade.XML(os.path.join(configure.gladedir, 'wizard.glade'))
for widget in self.wtree.get_widget_prefix(''):
setattr(self, widget.get_name(), widget)
self.wtree.signal_autoconnect(self)
self._use_main = True
self.steps = []
self.stack = Stack()
self.current_step = None
self._last_worker = 0 # combo id last worker from step to step
self._worker_box = None # gtk.Widget containing worker combobox
def debug(self, string):
pass
def __getitem__(self, stepname):
for item in self.steps:
if item.get_name() == stepname:
return item
else:
raise KeyError
def __len__(self):
return len(self.steps)
def error_dialog(self, message):
"""
Show an error message dialog.
@param message the message to display.
@param parent the gtk.Window parent window.
@param response whether the error dialog should go away after response.
returns: the error dialog.
"""
d = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL,
gtk.MESSAGE_ERROR, gtk.BUTTONS_OK,
message)
d.connect("response", lambda self, response: self.destroy())
d.show_all()
return d
def get_step_option(self, stepname, option):
state = self.get_step_options(stepname)
return state[option]
def get_step_options(self, stepname):
step = self[stepname]
return self.get_step_state(step)
def get_step_state(self, step):
state = step.get_state()
dict = {}
for key, widget in state.items():
dict[key] = widget.get_state()
return dict
def block_next(self, block):
self.button_next.set_sensitive(not block)
def block_prev(self, block):
self.button_prev.set_sensitive(not block)
def add_step(self, step_class, initial=False):
# If we don't have step_name set, count it as a base class
name = step_class.step_name
if name == None:
return
#if self.steps.has_key(name):
# raise TypeError("%s added twice" % name)
step = step_class(self)
self.steps.append(step)
if step.__dict__.has_key('get_state'):
state = self.get_step_state(step)
assert type(state) == dict
assert state, state
step.setup()
if initial:
self.stack.push(step)
def set_step(self, step):
# Remove previous step
map(self.content_area.remove, self.content_area.get_children())
# Add current
widget = step.get_main_widget()
self.content_area.add(widget)
# self.content_area.set_child_packing(widget, False, True, 0, 0)
self._append_workers(step)
#FIX icon_filename = os.path.join(configure.imagedir, 'wizard', step.icon)
#FIX self.image_icon.set_from_file(icon_filename)
self.label_title.set_markup('' + escape(step.get_name()) + '')
if self.current_step:
self.current_step.deactivated()
self.current_step = step
self.update_sidebar(step)
self.update_buttons(has_next=True)
self._setup_worker(step)
step.before_show()
self.debug('showing step %r' % step)
widget.show()
step.activated()
def _combobox_worker_changed(self, combobox, step):
self._last_worker = combobox.get_active()
self._setup_worker(step)
step.worker_changed()
def _append_workers(self, step):
# called for each new page to put in the worker drop down box
# if the step needs a worker
self.combobox_worker = None
return
# Horizontal, under step
hbox = gtk.HBox()
self.content_area.pack_end(hbox, False, False)
hbox.set_border_width(6)
hbox.show()
frame = gtk.Frame('Worker')
hbox.pack_end(frame, False, False, 0)
frame.show()
# Internal, so we can add border width
box = gtk.HBox()
frame.add(box)
box.set_border_width(6)
box.show()
self.combobox_worker = gtk.combo_box_new_text()
box.pack_start(self.combobox_worker, False, False, 6)
self.combobox_worker.connect('changed',
self._combobox_worker_changed, step)
self.combobox_worker.show()
def show_previous(self):
step = self.stack.pop()
self._setup_worker(step)
prev_step = self.stack.peek()
self.set_step(prev_step)
self._set_worker_from_step(prev_step)
self.update_buttons(has_next=True)
def _setup_worker(self, step):
# get name of active worker
if self.combobox_worker:
model = self.combobox_worker.get_model()
iter = self.combobox_worker.get_active_iter()
if iter:
text = model.get(iter, 0)[0]
self.debug('%r setting worker to %s' % (step, text))
step.worker = text
return
self.debug('%r no worker set' % step)
def _set_worker_from_step(self, step):
if not hasattr(step, 'worker'):
return
model = self.combobox_worker.get_model()
current_text = step.worker
for row in model:
text = model.get(row.iter, 0)[0]
if current_text == text:
self.combobox_worker.set_active_iter(row.iter)
break
def show_next(self):
next = self.current_step.get_next()
if not next:
self.finish(save=True)
return
self._setup_worker(self.current_step)
try:
next_step = self[next]
except KeyError:
raise TypeError("Wizard step %s is missing" % `next`)
next_step.visited = True
self.stack.push(next_step)
self.set_step(next_step)
has_next = not hasattr(next_step, 'last_step')
self.update_buttons(has_next)
def update_buttons(self, has_next):
# update the forward and next buttons
# has_next: whether or not there is a next step
if len(self.stack) == 1:
self.button_prev.set_sensitive(False)
else:
self.button_prev.set_sensitive(True)
# XXX: Use the current step, not the one on the top of the stack
if has_next:
self.button_next.set_label(gtk.STOCK_GO_FORWARD)
else:
# use APPLY, just like in gnomemeeting
self.button_next.set_label(gtk.STOCK_APPLY)
def _sidebar_clean(self):
# First remove the old the VBox if we can find one
parent = self.vbox_sidebar.get_parent()
if parent:
parent.remove(self.vbox_sidebar)
else:
parent = self.eventbox_sidebar
self.vbox_sidebar = gtk.VBox()
self.vbox_sidebar.set_border_width(5)
self.vbox_sidebar.set_size_request(200, -1)
parent.add(self.vbox_sidebar)
def _sidebar_add_placeholder(self):
# Placeholder label, which expands vertically
ph = gtk.Label()
ph.show()
self.vbox_sidebar.pack_start(ph)
def _sidebar_add_step(self, step, name, active, padding):
hbox = gtk.HBox(0, False)
hbox.show()
text = escape(name)
button = gtk.Button('')
label = button.get_children()[0]
label.set_padding(padding, 0)
label.set_alignment(0, 0.5)
button.set_relief(gtk.RELIEF_NONE)
hbox.pack_start(button, True, True)
self.vbox_sidebar.pack_start(hbox, False, False)
if not step:
steps = [step for step in self.steps
if getattr(step, 'section_name', '') == name]
assert len(steps) == 1
step = steps[0]
def button_clicked_cb(button, step):
self.set_step(step)
if step:
button.connect('clicked', button_clicked_cb, step)
else:
button.connect('clicked', button_clicked_cb, steps[0])
current = self.current_step
if current == step:
button.set_sensitive(False)
if not active and not step.visited:
markup = '%s' % name
button.set_sensitive(False)
else:
markup = '%s' % (name)
button.set_property('can_focus', False)
label.set_markup(markup)
button.show()
return button
def _sidebar_add_substeps(self, section):
filtered_steps = [step for step in self.steps
if (step.get_section() == section and
step.visited == True and
not hasattr(step, 'section_name'))]
for step in filtered_steps:
label = step.get_sidebar_name()
self._sidebar_add_step(step, label, True, 20)
def update_sidebar(self, step):
current = step.get_section()
self._sidebar_clean()
sidebar_steps = ('Welcome',
'Login')
active = True
for stepname in sidebar_steps:
self._sidebar_add_step(None, stepname, active, 10)
if current == stepname:
self._sidebar_add_substeps(stepname)
self._sidebar_add_placeholder()
active = False
else:
continue
self.vbox_sidebar.show()
def on_wizard_delete_event(self, wizard, event):
self.finish(self._use_main, save=False)
def on_button_prev_clicked(self, button):
self.show_previous()
def on_button_next_clicked(self, button):
self.show_next()
def finish(self, main=True, save=True):
if save:
self.emit('finished')
if self._use_main:
try:
gtk.main_quit()
except RuntimeError:
pass
def hide(self):
self.window.hide()
def run(self, interactive, main=True):
self._use_main = main
if not self.stack:
raise TypeError("need an initial step")
self.set_step(self.stack.peek())
if not interactive:
while self.current_step.get_next():
self.show_next()
return self.finish(False)
self.window.show()
if not self._use_main:
return
try:
gtk.main()
except KeyboardInterrupt:
pass
def load_steps(self):
global _steps
import steps
self.add_step(_steps[0], initial=True)
for step_class in _steps[1:]:
self.add_step(step_class)
return dict
#gobject.type_register(Wizard)
_steps = []
def register_step(klass):
global _steps
_steps.append(klass)
def get_steps():
global _steps
return _steps
utf8-migration-tool-0.5.7/TODO 0000644 0000000 0000000 00000000247 10202436430 012726 0 ustar
- Add progrss before scanning home directory, and don't stop updating
the display. May need threading?
- Allow removing stuff from list?
- How to handle dotfiles?
utf8-migration-tool-0.5.7/debian/ 0000755 0000000 0000000 00000000000 11753324465 013475 5 ustar utf8-migration-tool-0.5.7/debian/compat 0000644 0000000 0000000 00000000002 11232023251 014650 0 ustar 5
utf8-migration-tool-0.5.7/debian/control 0000644 0000000 0000000 00000001247 11753324076 015102 0 ustar Source: utf8-migration-tool
Section: misc
Priority: optional
Maintainer: Debian QA Group
Build-Depends: debhelper (>= 5.0.37.2), cdbs (>= 0.4.43),
python-support (>= 0.3.2), python-dev (>= 2.3.5-11)
Build-Depends-Indep: python-gtk2-dev
Standards-Version: 3.9.3
Package: utf8-migration-tool
Architecture: all
Depends: python-gtk2 (>= 2.4.0), python-glade2, ${misc:Depends},
${python:Depends}, ${shlibs:Depends}
Recommends: x-display-manager
Description: Debian UTF-8 migration wizard
This wizard upgrades legacy system locales to their UTF-8
equivalent. It also informs users whenever files in their
home directory still utilize legacy encodings.
utf8-migration-tool-0.5.7/debian/stamp-autotools-files 0000644 0000000 0000000 00000000000 11232023251 017636 0 ustar utf8-migration-tool-0.5.7/debian/install 0000644 0000000 0000000 00000000416 11232023251 015044 0 ustar utf8migrationtool usr/bin
utf8migrationtool.desktop usr/share/applications
glade/*.glade usr/share/utf8-migration-tool/glade
pylib/*.py usr/share/utf8-migration-tool/pylib
pylib/wizard/*.py usr/share/utf8-migration-tool/pylib/wizard
hook var/lib/update-notifier/user.d
utf8-migration-tool-0.5.7/debian/changelog 0000644 0000000 0000000 00000012324 11753324076 015347 0 ustar utf8-migration-tool (0.5.7) unstable; urgency=low
* QA upload
- Bump Standards-Version to 3.9.3 (no other changes)
- Update manpage, patch by Bastien Scher (Closes: #416584)
-- Ricardo Mones Sat, 12 May 2012 01:55:31 +0200
utf8-migration-tool (0.5.6) unstable; urgency=low
* QA upload
- Changed maintainer to QA group
- Bumped Standards-Version to 3.8.2 (no other changes required)
- Changed recommends to the x-display-manager virtual package
instead an incomplete display manager list
- Split long lines of dependencies
-- Ricardo Mones Thu, 23 Jul 2009 13:35:09 +0200
utf8-migration-tool (0.5.5) unstable; urgency=low
* The "This Package Desperatly Needs a New Maintainer" release.
* Fixed Lintian issues:
W: package-uses-deprecated-debhelper-compat-version
W: copyright-refers-to-versionless-license-file
* Bumped Standards-Version to 3.8.0 (no change required).
-- Martin-Éric Racine Fri, 24 Apr 2009 20:40:17 +0300
utf8-migration-tool (0.5.4) unstable; urgency=low
* Fixed Lintian issues:
I: utf8-migration-tool: desktop-entry-contains-encoding-key
W: utf8-migration-tool: desktop-entry-invalid-category
-- Martin-Éric Racine Thu, 13 Sep 2007 13:43:31 +0300
utf8-migration-tool (0.5.3) unstable; urgency=low
* Merged patch by Nicolas François to separately rename directories
and files (Closes: #415873).
-- Martin-Éric Racine Tue, 27 Mar 2007 15:40:34 +0300
utf8-migration-tool (0.5.2) unstable; urgency=high
* Fixed typo that resulted in RC bug (Closes: #406966).
-- Martin-Éric Racine Mon, 15 Jan 2007 19:40:39 +0200
utf8-migration-tool (0.5.1) unstable; urgency=low
* Merged pedantic regex rule by Nicolas François (see #405968 thread).
-- Martin-Éric Racine Fri, 12 Jan 2007 15:38:14 +0200
utf8-migration-tool (0.5.0) unstable; urgency=low
* Merged comprehensive patch by Nicolas François:
- Strip encodings and modifiers as necessary:
* The original encoding is only used as a conversion variable for
the file renaming step and otherwise stripped (Closes: #405967).
* The modifier is preserved except for @euro (Closes: #405968).
- Warn the user when no locale is set, or when the current locale is
not supported by the system libraries, and exit (Closes: #405878).
- Do not fail if ~/.dmrc is missing (Closes: #405879).
- Detect failure when renaming files.
* Moved display manager Depends to Recommends (handled by dmrc patch).
TODO: figure out how to upgrade systems without any display manager.
This requires upgrading environment variables, in the initialization
scripts of the login shell. This is difficult, because there are too
many shells we need to support (Debian uses bash but users sometimes
prefer tcsh or zsh) and every shell has several possible files where
the environment variables can reside.
* Upgraded source to Standards-Version 3.7.2 (no change required).
* Removed Tollef from Uploaders at his request.
-- Martin-Éric Racine Tue, 9 Jan 2007 12:21:51 +0200
utf8-migration-tool (0.4.3) unstable; urgency=low
* Fixed "Anglicisme in French menu translation" (Closes: #405892).
* Migrated Tollef to his Debian address in debian/control.
* Inverted the Maintainer and Uploaders content.
-- Martin-Éric Racine Sun, 7 Jan 2007 16:29:11 +0200
utf8-migration-tool (0.4.2) unstable; urgency=low
* Added Depends: gdm | kdm | wdm, as suggested by Osamu Aoki.
Should fix the issue reported by Alexander Patrakov in #374997.
* TODO:
Add support for special cases such as Russian KOI8-R and for
locales migrating from the @euro variant (see #374997).
Patches are welcome!
-- Martin-Éric Racine Sun, 7 Jan 2007 01:23:18 +0200
utf8-migration-tool (0.4.1) unstable; urgency=low
* Merged patch by Vincent Bernat to remove hard-coded GTK theme.
* First upload to Debian (Closes: #374997):
- Upgraded build scripts to CDBS.
- Added missing dependencies.
- Added myself to Uploaders.
- Created desktop menu.
- Created manual page.
-- Martin-Éric Racine Sat, 30 Dec 2006 01:30:52 +0200
utf8-migration-tool (0.3) hoary; urgency=low
* Enable sane handling of C locale upgrades by giving a list of en_*
locales as those are the ones matching C closest.
* Don't say that we need to convert any file names when all the file
names are already UTF8 compatible.
-- Tollef Fog Heen Thu, 17 Mar 2005 23:18:00 +0100
utf8-migration-tool (0.2) hoary; urgency=low
* Fix configuration writer to not add spaces around equal sign.
* Handle C locales a bit more sanely (that is, err out with an error
message for now.)
* Rename directories before the files contained in them.
-- Tollef Fog Heen Wed, 2 Mar 2005 22:18:16 +0100
utf8-migration-tool (0.1.1) hoary; urgency=low
* Build-depend on python.
-- Colin Watson Mon, 28 Feb 2005 23:12:22 +0000
utf8-migration-tool (0.1) hoary; urgency=low
* Initial release
-- Tollef Fog Heen Wed, 9 Feb 2005 16:40:21 +0100
utf8-migration-tool-0.5.7/debian/rules 0000755 0000000 0000000 00000000553 11232023251 014535 0 ustar #!/usr/bin/make -f
#
# CDBS debian/rules for upgrade-system
# Martin-Eric Racine
#
DEB_PYTHON_SYSTEM = pysupport
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/python-distutils.mk
DEB_PYTHON_SETUP_CMD := pylib/configure.py
common-binary-post-install-indep:: list-missing
#EOF
utf8-migration-tool-0.5.7/debian/copyright 0000644 0000000 0000000 00000001502 11232023251 015403 0 ustar UTF-8 Migration Tool --- A tool to migrate a Debian system to UTF-8
Copyright:
(C) 2005 Tollef Fog Heen
License:
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
On Debian systems, the complete text of the GNU General Public License
can be found in .
utf8-migration-tool-0.5.7/debian/pycompat 0000644 0000000 0000000 00000000002 11232023251 015221 0 ustar 2
utf8-migration-tool-0.5.7/debian/manpages 0000644 0000000 0000000 00000000024 11232023251 015164 0 ustar utf8migrationtool.1
utf8-migration-tool-0.5.7/README 0000644 0000000 0000000 00000001010 10201406107 013100 0 ustar UTF-8 Migration tool
This is a tool to migrate a user or the whole system from whatever
legacy encoding it is currently using, to another UTF-8. Migration
consists of multiple steps, some of which are system-wide, some which
are per-user:
System-wide:
- make sure the locale is generated
- change the language in pam's environment file
- change the GDM language (in /etc/default/gdm)
Per-user:
- change language in the user's DM session
(the name in .dmrc is unqualified (nb_NO, nb_NO.UTF-8)
- convert file names
utf8-migration-tool-0.5.7/utf8migrationtool 0000644 0000000 0000000 00000007401 10552736164 015675 0 ustar #!/usr/bin/python
import sys, locale, os, gtk, gobject
try:
locale.setlocale(locale.LC_ALL, '')
except:
pass
sys.path.append("/usr/share/utf8-migration-tool/pylib")
import configure
from wizard.wizard import Wizard
from gdmConfigParser import gdmConfigParser
w = Wizard()
w.load_steps()
section = "Desktop"
option = "Language"
dmrclocale = ""
def findEncoding(locale):
f = open("/usr/share/i18n/SUPPORTED")
for line in f.readlines():
if line.split(" ")[0] == locale:
return line.split(" ")[1].strip()
print "Locale '%s' does not exist in /usr/share/i18n/SUPPORTED."%locale
return None
def getconfig():
config = gdmConfigParser()
try:
config.readfp(open(os.path.expanduser('~/.dmrc')))
except :
print "Error while reading ~/.dmrc:", sys.exc_info()[1]
print "Continuing anyway."
return config
dmrc = getconfig()
currentEncoding = ""
if not dmrc.has_section(section):
dmrc.add_section(section)
if not dmrc.has_option(section, option):
loc = "%s.%s"
dmrc.set(section, option, locale.getlocale(locale.LC_MESSAGES)[0])
currentEncoding = locale.getlocale(locale.LC_MESSAGES)[1]
dmrclocale = dmrc.get(section, option)
if currentEncoding == "" or currentEncoding == None:
currentEncoding = findEncoding(dmrclocale)
if currentEncoding != None:
currentEncoding = currentEncoding.upper()
if currentEncoding == "" or currentEncoding == None:
dialog = gtk.MessageDialog(
parent = None,
flags = gtk.DIALOG_DESTROY_WITH_PARENT,
type = gtk.MESSAGE_INFO,
buttons = gtk.BUTTONS_OK,
message_format = "Your current encoding was not found, or you are using the C locale. Please pick a supported language from /usr/share/i18n/SUPPORTED and log in again.")
dialog.set_title('No UTF8 equivalent locale')
dialog.connect('response', lambda dialog, response: sys.exit(1))
dialog.show()
gtk.main()
w['Login'].currentLocale = dmrclocale
w['Login'].currentEncoding = currentEncoding
w['FileNameConversion'].currentEncoding = currentEncoding
# If the current encoding is not UTF-8, append .UTF-8 to the current
# locale (and remove the locale's codeset or modifier first).
# Also, if the current encoding is UTF-8, but if according to
# /usr/share/i18n/SUPPORTED, the current locale is not UTF-8, append the
# .UTF-8 suffix. The latter can happen when the current locale is guessed
# with getlocale().
if currentEncoding != "UTF-8" or findEncoding(dmrclocale) != "UTF-8":
import sre
match = sre.match("^([^.@]*)(\.[^@]*)?(@.*)?$", w['Login'].currentLocale)
w['Login'].newLocale = match.group(1) + ".UTF-8"
if match.group(3) and match.group(3) != "@euro":
w['Login'].newLocale += match.group(3)
else:
w['Login'].newLocale = w['Login'].currentLocale
w['Login'].newEncoding = "UTF-8"
def change_setup(self, user_data):
w = user_data
try:
dmrc.set(section, option, w['Login'].getNewLocale())
f = open(os.path.expanduser('~/.dmrc'), "w")
dmrc.write(f)
f.close()
except:
print "Error while writing the new ~/.dmrc:", sys.exc_info()[1]
for (oldfile, newfile) in w["FileNameConversion"].get_files():
# FIXME: rename all the files?
# or only the selected ones?
if os.path.exists(newfile):
print "'%s' already exists. Do not rename '%s' to '%s'."%(newfile, oldfile, newfile)
else:
try:
os.rename(oldfile, newfile)
except:
print "Cannot rename '%s' to '%s': %s"%(oldfile,
newfile,
sys.exc_info()[1])
w.connect("finished", change_setup, w)
w.run(True, main=True)
utf8-migration-tool-0.5.7/COPYING.GPL 0000644 0000000 0000000 00000043110 10202430400 013675 0 ustar GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
utf8-migration-tool-0.5.7/utf8migrationtool.desktop 0000644 0000000 0000000 00000000411 10672211650 017326 0 ustar [Desktop Entry]
Name=UTF-8 Migration Tool
Name[fr]=Outil de migration UTF-8
Comment=UTF-8 Migration Wizard
Comment[fr]=Assistant de migration UTF-8
Exec=utf8migrationtool
Terminal=false
Type=Application
Icon=applications-system
Categories=GNOME;GTK;System;Utility;
utf8-migration-tool-0.5.7/utf8migrationtool.1 0000644 0000000 0000000 00000001556 11753323344 016035 0 ustar .TH "utf8migrationtool" "1" "February 9th 2005" "http://archive.ubuntu.com/ubuntu/pool/main/u/utf8-migration-tool/" "Debian GNU/Linux"
.SH "NAME"
utf8migrationtool \- UTF\-8 locale migration tool
.SH "DESCRIPTION"
.BR utf8migrationtool
is a wizard that simplifies upgrading a Debian system
towards UTF\-8 locales.
.PP
First it updates the login configuration (in ~/.dmrc) so the default locale
uses UTF-8 encoding, then it checks every filename under the user's home
directory and converts it to UTF-8 if needed. Note that it only affects
filenames, not file contents.
.SH OPTIONS
None.
.SH "USAGE"
.BR utf8migrationtool
is run from the Desktop Environment's menu.
.SH "AUTHORS"
Tollef Fog Heen created the utility in 2005.
.PP
Martin\-Eric Racine wrote this manual page and
the desktop menu in 2006.
.SH "SEE ALSO"
.BR locale (1).